From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0EE518E76B for ; Sat, 19 Oct 2024 10:38:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729334341; cv=none; b=GzETArj86uQR85RMpRMkn2S2ZmwWBMg6Hs3k/SG9dRqaBwt4FcDDRMQRnJRK8u62NaG30NqKKeErw2U02oCYo7tAefAeWDxergZ4roN8hmSHrH92FvDQ9SCbssTSGQglp3x4inacYKFLRiUgvpvtSKbpqJJ8tqdHdkY+K8XlFlE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729334341; c=relaxed/simple; bh=sesZuOkC2J7X4g2oWBevtVf2GYC17xLuoPhrecP6Hn8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: In-Reply-To:Content-Type:Content-Disposition; b=cz0N9ia0c4jPanzcXPx2Qi9hbI8cxK/30squjrH43oQfdzg/y++Me364rVzf9eyxkYr1aPR9AweR7txvewy5ej/zWuKS7+Him9Eyoc8MgaE6oTz4shrlLc+ZVLCLdxLbuiCR4+nntu84IbPm7/Lj5v3FKZf+g1MVtkkul/NZlYo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=MmQyO9DM; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="MmQyO9DM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729334338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fi8TTdedbJBRDEX4Dp+M5toEU5oAzUDWnNOAkYGl7Mk=; b=MmQyO9DMq5R8cGku7qpiTe+P+nadmAcOdDQRyCuiJqpTJ0CwOYvJEchzreEg5LVoR5rY14 e7m5yn+WVJsGd7TXTTPSlKPZ11ssbxNTveoRcLhml9V6LJeB+3oGq3qdoKiWWUXo/NRpu4 rOQz4cQm7sN0GWjhWqDZOlaDdJk8Fkk= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-140-qwb7tg8eP7aKlmwVNMfyBw-1; Sat, 19 Oct 2024 06:38:54 -0400 X-MC-Unique: qwb7tg8eP7aKlmwVNMfyBw-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DE9A2195609D; Sat, 19 Oct 2024 10:38:52 +0000 (UTC) Received: from aion.redhat.com (unknown [10.22.80.82]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1339419560A3; Sat, 19 Oct 2024 10:38:52 +0000 (UTC) Received: by aion.redhat.com (Postfix, from userid 1000) id 5204921BF0B; Sat, 19 Oct 2024 06:38:50 -0400 (EDT) Date: Sat, 19 Oct 2024 06:38:50 -0400 From: Scott Mayhew To: cel@kernel.org Cc: kdevops@lists.linux.dev, Chuck Lever Subject: Re: [PATCH] pynfs: Enable codeready-builder in AWS Message-ID: References: <20241018214454.1882565-1-cel@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20241018214454.1882565-1-cel@kernel.org> X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/mixed; boundary="RxAwCnJyyL1ePvlc" Content-Disposition: inline --RxAwCnJyyL1ePvlc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, 18 Oct 2024, cel@kernel.org wrote: > From: Chuck Lever > > Running "make pynfs" against an AWS EC2 instance fails with: > > Error: No matching repo to modify: codeready-builder-for-rhel-9-x86_64-rpms. > > Adjust the logic in > playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml to try > to sketch in what we might need for running the pynfs in the > cloud. > > Signed-off-by: Chuck Lever > --- > .../pynfs/tasks/install-deps/redhat/main.yml | 51 ++++++++++++++----- > 1 file changed, 38 insertions(+), 13 deletions(-) > > diff --git a/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml b/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml > index f4aee14c5430..5f377eed436f 100644 > --- a/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml > +++ b/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml > @@ -1,24 +1,49 @@ > --- > -- name: Enable the CodeReady repo > - become: yes > - command: /usr/bin/dnf config-manager --enable codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rpms > +# name: Display all variables > +# debug: > +# var=vars > + > +- name: Select the CodeReady repo to enable > + ansible.builtin.set_fact: > + nfsd_codeready_repo: "codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-rhui-rpms" > when: > - - ansible_distribution == 'RedHat' > + - kdevops_enable_terraform > + - kdevops_terraform_provider == "aws" > + - ansible_distribution == "RedHat" When I tested your patch I got: ---8<--- TASK [pynfs : Select the CodeReady repo to enable] ******************************************************************************************************************************************************************************************* fatal: [kdevops-pynfs-rhel-9-kotd-nfsd]: FAILED! => {} MSG: The conditional check 'kdevops_enable_terraform' failed. The error was: error while evaluating conditional (kdevops_enable_terraform): 'kdevops_enable_terraform' is undefined. 'kdevops_enable_terraform' is undefined The error appears to be in '/home/buildbot/git/kdevops-pynfs-rhel-9-kotd/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml': line 6, column 3, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: - name: Select the CodeReady repo to enable ^ here ---8<--- So I added "kdevops_enable_terraform: False" to playbooks/roles/pynfs/defaults/main.yml. > + > +- name: Select the CodeReady repo to enable > + ansible.builtin.set_fact: > + nfsd_codeready_repo: "codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rpms" > + when: > + - not kdevops_enable_terraform > + - ansible_distribution == "RedHat" > + - not devconfig_custom_yum_repofile > + > +- name: Select the CodeReady repo to enable > + ansible.builtin.set_fact: > + nfsd_codeready_repo: "crb" > + when: > + - not kdevops_enable_terraform > + - ansible_distribution == "CentOS" > - not devconfig_custom_yum_repofile > > - name: Enable the CodeReady repo > - become: yes > - command: /usr/bin/dnf config-manager --enable crb > - when: > - - ansible_distribution == 'CentOS' > - - not devconfig_custom_yum_repofile > + become: true > + become_method: ansible.builtin.sudo > + ansible.builtin.command: > + argv: > + - "/usr/bin/dnf" > + - "config-manager" > + - "--enable" > + - "{{ nfsd_codeready_repo }}" And then here (I thought I sent an email about this last night but I can't find it in my sent folder): ---8<--- TASK [pynfs : Enable the CodeReady repo] ***************************************************************************************************************************************************************************************************** fatal: [kdevops-pynfs-rhel-9-kotd-nfsd]: FAILED! => {} MSG: The task includes an option with an undefined variable. The error was: 'nfsd_codeready_repo' is undefined. 'nfsd_codeready_repo' is undefined The error appears to be in '/home/buildbot/git/kdevops-pynfs-rhel-9-kotd/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml': line 30, column 3, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: - name: Enable the CodeReady repo ^ here ---8<--- This task needs when clause: when: - not devconfig_custom_yum_repofile -Scott > > - name: Install build dependencies for pynfs > - become: yes > - become_method: sudo > - yum: > - update_cache: yes > + become: true > + become_method: ansible.builtin.sudo > + ansible.builtin.yum: > + update_cache: true > name: "{{ packages }}" > + state: present > retries: 3 > delay: 5 > register: result > -- > 2.46.1 > > --RxAwCnJyyL1ePvlc Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="fixup.patch" diff --git a/playbooks/roles/pynfs/defaults/main.yml b/playbooks/roles/pynfs/defaults/main.yml index de09583..67ecd84 100644 --- a/playbooks/roles/pynfs/defaults/main.yml +++ b/playbooks/roles/pynfs/defaults/main.yml @@ -5,5 +5,6 @@ # We default to not run tests. kdevops_run_pynfs: False pynfs_pnfs_block: False +kdevops_enable_terraform: False pynfs_data: "{{ data_path }}/pynfs" diff --git a/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml b/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml index 5f377ee..0211072 100644 --- a/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml +++ b/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml @@ -36,6 +36,8 @@ - "config-manager" - "--enable" - "{{ nfsd_codeready_repo }}" + when: + - not devconfig_custom_yum_repofile - name: Install build dependencies for pynfs become: true --RxAwCnJyyL1ePvlc--