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 B0EB415699A for ; Wed, 24 Apr 2024 21:15:14 +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=1713993316; cv=none; b=kqQ4nU4O1MF8kx+hQ0O2Po/EnNU51Zz3wIu3SNqVurKsHDowt0Qkyyh0LPHzmVa9wdsljrjq5m5W8u7hoadbZSeunZtvZgPKrX1OcOMG42B2cdck9np7BqGf7xbDB/O6QcAaxwfDO+04PgicKRxKAkLIr/JQF5RobnovjNkNHDo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713993316; c=relaxed/simple; bh=UMIitcqK//6FfsdihwmYsjQB+adX5+bzAOMAQLJCZHE=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=O/GSnP4p2jyer9UG922yYrHdghY43N0waLJB4jnnKAvhEQGOZpiKhQoz+bev4HhbiKTflaGpLB4y3RT+MByeE0ypq2E4sooAPup8PbzBhL8U6bD2n0fYOOyh1xjfF5fUjakVRtDMNCtIw3hGluLcGe6IgLElK2yEKkPOAPfM054= 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=HorsEkyT; 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="HorsEkyT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713993313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6N9IpfS3zCpZy/PgmrcZQOlG2YCnvJs0bWS0YlGNcWA=; b=HorsEkyTZSCN7uHKQ0zwR2Jh9iV4QBMWFYoS7k1CCSbsFAZz4ZJOTvE3vozVjI8LcvL+Hq YhMiQ0H6NYCbGZZuEmFWUGcAYb45nOjqxb4cqVR+0LgBTqTObsbxk6fFq3hVhRre9aabo6 gKD+bd2esLlwRztZ4m6OIWaaat9Hd6I= 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-600-inb2dR3JPe2I4E-KB_9DIQ-1; Wed, 24 Apr 2024 17:15:12 -0400 X-MC-Unique: inb2dR3JPe2I4E-KB_9DIQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 DB20A3806710 for ; Wed, 24 Apr 2024 21:15:11 +0000 (UTC) Received: from aion.redhat.com (unknown [10.22.16.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CD82C40C140B for ; Wed, 24 Apr 2024 21:15:11 +0000 (UTC) Received: from aion.redhat.com (localhost [IPv6:::1]) by aion.redhat.com (Postfix) with ESMTP id 6DBE914983D for ; Wed, 24 Apr 2024 17:15:11 -0400 (EDT) From: Scott Mayhew To: kdevops@lists.linux.dev Subject: [PATCH 2/2] nfstest: fix another RHEL 8-ism Date: Wed, 24 Apr 2024 17:15:11 -0400 Message-ID: <20240424211511.2619637-2-smayhew@redhat.com> In-Reply-To: <20240424211511.2619637-1-smayhew@redhat.com> References: <20240424211511.2619637-1-smayhew@redhat.com> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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. 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