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 1171E142916 for ; Wed, 24 Apr 2024 22:00:33 +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=1713996035; cv=none; b=AKFcy1FQJ7tS+uHKEljITeaIHPYMHOOeXFKJgQ2Sa6z9dRxHLrhzhxRkchxz/dv4RzG67CoWs2aO+8qKZccxYJuzTBBtHzQOB1zD8X41dgz0iLMaZlCzJtj5/PS7YZjRX/BkLwcBCpAjTODZI34uKTgmFOYrN4FAyD0RxzGRwk0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713996035; c=relaxed/simple; bh=8rstCfDWDOWQ5rv2cqbJ3UFVp4TSYJ7dHQVGS05JHmo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: In-Reply-To:Content-Type:Content-Disposition; b=Ukmy2WiRtjCKRXgPrakxW+gBewTMyJ05YBPJgIYI3tU1tvovLYjiWsRY+Rz1yKh19dPmtezpDiJr8NRf7nVuOa6dm2Z5ytXQTHaZtnptTFHc+fcrd0TnsdRRmnQvpzJ9XYaDFxaNJVMQBEqzekJg5bf6B864IXqeybA75jTU/Aw= 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=Vtucahn9; 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="Vtucahn9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713996033; 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=CxGYxM3t+Zg8XT0mBr9pV5alhxrYpJT90WkVpKm9JtI=; b=Vtucahn9gi5Ge+tTAaLtubvQyrAD4khX/aPSoXgInv7qTosbXpPf2gT1Wis/o0+1t4CP55 +FNtonmd6DWMnlE+F02oRUbeNy6tO8NOGAizs/EJ09/6L4qe+kahuqtePwaWdUXj8B+L8j wlUgFYxLwBEpQlLa8W0km0Ir+gPxOZw= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-90-nD_FSf1sNWu3iCUXNYpP8A-1; Wed, 24 Apr 2024 18:00:30 -0400 X-MC-Unique: nD_FSf1sNWu3iCUXNYpP8A-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 707F41C05145; Wed, 24 Apr 2024 22:00:30 +0000 (UTC) Received: from aion.redhat.com (unknown [10.22.16.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 602265C78B; Wed, 24 Apr 2024 22:00:30 +0000 (UTC) Received: by aion.redhat.com (Postfix, from userid 1000) id 0746C149845; Wed, 24 Apr 2024 18:00:30 -0400 (EDT) Date: Wed, 24 Apr 2024 18:00:29 -0400 From: Scott Mayhew To: Chuck Lever Cc: kdevops@lists.linux.dev Subject: Re: [PATCH 2/2] nfstest: fix another RHEL 8-ism Message-ID: References: <20240424211511.2619637-1-smayhew@redhat.com> <20240424211511.2619637-2-smayhew@redhat.com> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, 24 Apr 2024, Chuck Lever wrote: > On Wed, Apr 24, 2024 at 05:15:11PM -0400, Scott Mayhew wrote: > > RHEL 8 doesn't have the python-unversioned-command package. So we'll > > install python-unversioned-command on RHEL/CentOS 9 and higher, and on > > RHEL/CentOS 8 and lower we'll set up the /usr/bin/python symlink via > > the 'alternatives' command. > > > > I'm not doing any special checking on Fedora, which has had the > > python-unversioned-command package since F29. I'm assuming anyone using > > kdevops to run nfstest on Fedora is going to be using a much more recent > > version. > > It seems like other workflows have python dependencies like this. > Would it be better to put this logic in a common role? Actually it depends on whether any of those workflows are using commands like 'python somescript.py'. On a quick scan, I don't see anything. But if there were, they could probably just be changed to use 'python3 somescript.py' (is anyone using python2 any more?). The original nfstest patches that you posted had a step that was doing 'python setup.py build', and that's what I was tripping on, which prompted me to suggest installing the python-unversioned-command package. But in the patches that you committed, you're just running nfstest directly from the git dir (which BTW is the way I've always run nfstest manually in the past). So I don't think we even need the python-unversioned-command package any more, and maybe we can just yank it. I'll do some testing. -Scott > > > > Signed-off-by: Scott Mayhew > > --- > > playbooks/roles/nfstest/tasks/main.yml | 19 +++++++++++++++++++ > > playbooks/roles/nfstest/vars/RedHat.yml | 1 - > > 2 files changed, 19 insertions(+), 1 deletion(-) > > > > diff --git a/playbooks/roles/nfstest/tasks/main.yml b/playbooks/roles/nfstest/tasks/main.yml > > index 1ccd247..d0f7d18 100644 > > --- a/playbooks/roles/nfstest/tasks/main.yml > > +++ b/playbooks/roles/nfstest/tasks/main.yml > > @@ -23,6 +23,14 @@ > > - 'vars' > > tags: vars > > > > +- name: Add python-unversioned-command to list of nfstest packages > > + ansible.builtin.set_fact: > > + nfstest_packages: "{{ nfstest_packages + ['python-unversioned-command'] }}" > > + when: > > + - ansible_facts['os_family']|lower == 'redhat' > > + - ansible_facts['distribution_major_version'] | int >= 9 > > + tags: vars > > + > > - name: Install dependencies for nfstest > > become: true > > become_flags: 'su - -c' > > @@ -32,6 +40,17 @@ > > state: present > > tags: nfstest > > > > +- name: Set /usr/bin/python symlink > > + become: true > > + become_flags: 'su - -c' > > + become_method: ansible.builtin.sudo > > + ansible.builtin.shell: > > + cmd: alternatives --set python /usr/bin/python3 > > + when: > > + - ansible_facts['os_family']|lower == 'redhat' > > + - ansible_facts['distribution_major_version'] | int <= 8 > > + tags: nfstest > > + > > - name: Create the /data mount point on the target nodes > > ansible.builtin.include_role: > > name: create_data_partition > > diff --git a/playbooks/roles/nfstest/vars/RedHat.yml b/playbooks/roles/nfstest/vars/RedHat.yml > > index a14c20e..76adc4d 100644 > > --- a/playbooks/roles/nfstest/vars/RedHat.yml > > +++ b/playbooks/roles/nfstest/vars/RedHat.yml > > @@ -1,6 +1,5 @@ > > --- > > nfstest_packages: > > - nfs-utils > > - - python-unversioned-command > > - tcpdump > > - git-core > > -- > > 2.44.0 > > > > > > -- > Chuck Lever >