Replace community.general.zypper
cover Replace community.general.zypper
From: Chuck Lever <[email protected]>
[email protected] reports:
Quoted 7 lines
So on a fresh new debian testing system I noticed we will have to install also now:
ansible-galaxy collection install ansible.posix --> due to our ansible.cfg stdout_callback=debug ansible-galaxy collection install community.general --> due to zypper !
Otherwise we get obscure errors.
This series surgically replaces the use of the zypper module to mitigate the dependency on the community.general collection.
There are a few spots where some extra arguments were used. Those spots need some review/testing attention. None of this has been tested yet, this post is just for comments / thinking out loud.
Chuck Lever (22):
blktests: Replace the use of community.general.zypper
bootlinux: Replace the use of the community.general.zypper module
btrfs_progs: Replace the use of the community.general.zypper module
build-qemu: Replace the use of the community.general.zypper module
create_partition: Replace the use of the community.general.zypper
module
cxl: Replace the use of the community.general.zypper module
devconfig: Replace the use of the community.general.zypper module
kotd-rev-kernel: Replace the use of the community.general.zypper
module
fstests: Replace the use of the community.general.zypper module
fstests_prep_localhost: Replace the use of the community.general
zypper module
install-menuconfig-deps: Replace the use of the
community.general.zypper module
install_systemd_journal: Replace the use of the
community.general.zypper module
install_systemd_timesyncd: Replace the use of the
community.general.zypper module
install_terraform: Replace the use of the community.general.zypper
module
install_vagrant: Replace the use of the community.general.zypper
module
kdc: Replace the use of the community.general.zypper module
krb5: Replace the use of the community.general.zypper module
ktls: Replace the use of the community.general.zypper module
libvirt_user: Replace the use of the community.general.zypper module
nfsd: Replace the use of the community.general.zypper module
pynfs: Replace the use of the community.general.zypper module
selftests: Replace the use of the community.general.zypper module
.../blktests/tasks/install-deps/suse/main.yml | 27 ++++-------- .../tasks/install-deps/suse/main.yml | 4 +- .../tasks/install-deps/suse/main.yml | 4 +- .../tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 2 +- .../cxl/tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 31 +++++++------- .../tasks/kotd-rev-kernel/suse/main.yml | 6 +-- .../fstests/tasks/install-deps/suse/main.yml | 27 ++++-------- .../tasks/install-deps/suse/main.yml | 2 +- .../tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 8 ++-- .../kdc/tasks/install-deps/suse/main.yml | 2 +- .../krb5/tasks/install-deps/suse/main.yml | 3 +- .../ktls/tasks/install-deps/suse/main.yml | 4 +- .../tasks/install-deps/suse/main.yml | 2 +- .../nfsd/tasks/install-deps/debian/main.yml | 36 ---------------- .../nfsd/tasks/install-deps/redhat/main.yml | 33 --------------- .../nfsd/tasks/install-deps/suse/main.yml | 34 --------------- playbooks/roles/nfsd/tasks/main.yml | 42 +++++++++++++++---- playbooks/roles/nfsd/vars/Debian.yml | 3 ++ playbooks/roles/nfsd/vars/RedHat.yml | 2 + playbooks/roles/nfsd/vars/Suse.yml | 4 ++ .../pynfs/tasks/install-deps/suse/main.yml | 2 +- .../tasks/install-deps/suse/main.yml | 2 +- 28 files changed, 102 insertions(+), 196 deletions(-) delete mode 100644 playbooks/roles/nfsd/tasks/install-deps/debian/main.yml delete mode 100644 playbooks/roles/nfsd/tasks/install-deps/redhat/main.yml delete mode 100644 playbooks/roles/nfsd/tasks/install-deps/suse/main.yml
base-commit: 9f538b3b87d15eebf60ead16c666ab7e433a5075
Signature · 1 line
2.44.0
RFC PATCH 1/22 blktests: Replace the use of community.general.zypper
From: Chuck Lever <[email protected]>
--- .../blktests/tasks/install-deps/suse/main.yml | 27 ++++++------------- 1 file changed, 8 insertions(+), 19 deletions(-)
playbooks/roles/blktests/tasks/install-deps/suse/main.yml +8 -19
@@ -66,18 +66,7 @@ - name: Install NVMe tools become: yes become_method: sudo - zypper: - name: - - nvme-cli - state: present - when: - - repos_present|bool - - not lacks_nvme_utils|bool - -- name: Install NVMe tools - become: yes - become_method: sudo - zypper: + ansible.builtin.package: name: - nvme-cli state: present
@@ -88,7 +77,7 @@ - name: Install build dependencies for blktests become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - bison - flex
@@ -133,7 +122,7 @@ - name: Install tumblweed packages become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - libgdbm6 - dbench
@@ -144,7 +133,7 @@ - name: Install leap packages become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - libgdbm4 - dbench
@@ -156,7 +145,7 @@ - name: Install libgdbm4 become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - libgdbm4 state: present
@@ -169,7 +158,7 @@ - name: Install autoconf-archive for building nbd become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - autoconf-archive state: present
@@ -214,7 +203,7 @@ - name: Install dbench when needed become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - dbench state: present
@@ -234,7 +223,7 @@ - name: Install build dependencies for nbd become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - glib2-devel state: present
Signature · 1 line
2.44.0
RFC PATCH 2/22 bootlinux: Replace the use of the community.general.zypper module
In reply to [email protected]From: Chuck Lever <[email protected]>
The lack of a disable_recommends parameter might be a problem.
--- playbooks/roles/bootlinux/tasks/install-deps/suse/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
playbooks/roles/bootlinux/tasks/install-deps/suse/main.yml +2 -2
@@ -2,7 +2,7 @@ - name: Install Linux kernel build dependencies for SUSE sources become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - bison - flex
@@ -27,4 +27,4 @@ - portmap - hwinfo - open-iscsi - disable_recommends: no + state: present
Signature · 1 line
2.44.0
RFC PATCH 3/22 btrfs_progs: Replace the use of the community.general.zypper module
In reply to [email protected]From: Chuck Lever <[email protected]>
And correct a copy-and-paste error.
--- playbooks/roles/btrfs_progs/tasks/install-deps/suse/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
playbooks/roles/btrfs_progs/tasks/install-deps/suse/main.yml +2 -2
@@ -5,10 +5,10 @@ is_leap: '{{ "Leap" in ansible_distribution }}' is_tumbleweed: '{{ "openSUSE Tumbleweed" == ansible_distribution }}' -- name: Install qemu build dependencies +- name: Install btrfs-progs build dependencies become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - e2fsprogs-devel - libblkid-devel
Signature · 1 line
2.44.0
RFC PATCH 4/22 build-qemu: Replace the use of the community.general.zypper module
In reply to [email protected]From: Chuck Lever <[email protected]>
--- playbooks/roles/build_qemu/tasks/install-deps/suse/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
playbooks/roles/build_qemu/tasks/install-deps/suse/main.yml +2 -1
@@ -8,7 +8,7 @@ - name: Install QEMU build dependencies become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - acpica - alsa-devel
@@ -415,5 +415,6 @@ - xorgproto-devel - xz-devel - zlib-devel + state: present when: - is_tumbleweed
Signature · 1 line
2.44.0
RFC PATCH 5/22 create_partition: Replace the use of the community.general.zypper module
In reply to [email protected]From: Chuck Lever <[email protected]>
--- .../roles/create_partition/tasks/install-deps/suse/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
playbooks/roles/create_partition/tasks/install-deps/suse/main.yml +1 -1
@@ -55,7 +55,7 @@ - name: Install partition creation base tools become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - xfsprogs - e2fsprogs
Signature · 1 line
2.44.0
RFC PATCH 6/22 cxl: Replace the use of the community.general.zypper module
In reply to [email protected]From: Chuck Lever <[email protected]>
The lack of the replacefiles parameter might be a problem.
--- playbooks/roles/cxl/tasks/install-deps/suse/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
playbooks/roles/cxl/tasks/install-deps/suse/main.yml +1 -2
@@ -55,7 +55,7 @@ - name: Install build dependencies for ndctl become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - git-core - meson
@@ -77,6 +77,5 @@ - libtraceevent-devel - libtracefs-devel state: present - replacefiles: true when: - repos_present|bool
Signature · 1 line
2.44.0
RFC PATCH 7/22 devconfig: Replace the use of the community.general.zypper module
In reply to [email protected]From: Chuck Lever <[email protected]>
--- .../tasks/install-deps/suse/main.yml | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-)
playbooks/roles/devconfig/tasks/install-deps/suse/main.yml +16 -15
@@ -231,9 +231,8 @@ - name: Do full upgrade become: yes become_method: sudo - zypper: - state: dist-upgrade - name: '*' + ansible.builtin.command: + cmd: "zypper dist-upgrade '*'" when: - repos_will_be_added|bool - devconfig_try_upgrade|bool
@@ -249,7 +248,7 @@ - name: Install nvme tools become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - nvme-cli state: present
@@ -261,7 +260,7 @@ - name: Install fio when possible become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - fio state: present
@@ -273,7 +272,7 @@ - name: Install git-core when possible become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - git-core state: present
@@ -285,7 +284,7 @@ - name: Install git when possible become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - git state: present
@@ -297,7 +296,7 @@ - name: Install xfsdump when possible become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - xfsdump state: present
@@ -309,7 +308,7 @@ - name: Install packages on newer distro when possible become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - bison - libaio-devel
@@ -324,7 +323,7 @@ - name: Install packages not available on sle11 or sle10 become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - dump - flex
@@ -340,7 +339,7 @@ - name: Install packages we typically care about become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - e2fsprogs - xfsprogs
@@ -383,7 +382,7 @@ - name: Install snmp become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - net-snmp when:
@@ -432,7 +431,7 @@ - name: Install kdump become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - kdump when:
@@ -539,9 +538,10 @@ - name: Install systemd-journal-remote become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - systemd-journal-remote + state: present when: - devconfig_enable_systemd_journal_remote|bool - repos_will_be_added|bool
@@ -550,9 +550,10 @@ - name: Install systemd-timesyncd become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - systemd-timesyncd + state: present when: - devconfig_enable_systemd_timesyncd|bool - repos_will_be_added|bool
Signature · 1 line
2.44.0
RFC PATCH 8/22 kotd-rev-kernel: Replace the use of the community.general.zypper module
In reply to [email protected]From: Chuck Lever <[email protected]>
The lack of the allow_vendor_change, disable_recommends, force_resolution, and force parameters might be a problem.
--- .../roles/devconfig/tasks/kotd-rev-kernel/suse/main.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
playbooks/roles/devconfig/tasks/kotd-rev-kernel/suse/main.yml +1 -5
@@ -82,15 +82,11 @@ - name: Install kotd become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - kernel-default update_cache: yes - allow_vendor_change: yes - disable_recommends: no - force_resolution: yes state: latest - force: yes when: - devconfig_enable_kotd|bool tags: [ 'kotd' ]
Signature · 1 line
2.44.0
RFC PATCH 9/22 fstests: Replace the use of the community.general.zypper module
In reply to [email protected]From: Chuck Lever <[email protected]>
--- .../fstests/tasks/install-deps/suse/main.yml | 27 ++++++------------- 1 file changed, 8 insertions(+), 19 deletions(-)
playbooks/roles/fstests/tasks/install-deps/suse/main.yml +8 -19
@@ -77,18 +77,7 @@ - name: Install nvme tools become: yes become_method: sudo - zypper: - name: - - nvme-cli - state: present - when: - - repos_present|bool - - not lacks_nvme_utils|bool - -- name: Install nvme tools - become: yes - become_method: sudo - zypper: + ansible.builtin.package: name: - nvme-cli state: present
@@ -99,7 +88,7 @@ - name: Install build dependencies for fstests become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - bison - flex
@@ -142,7 +131,7 @@ - name: Install indent when we have it become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - indent state: present
@@ -153,7 +142,7 @@ - name: Install tumblweed packages become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - libgdbm6 - dbench
@@ -164,7 +153,7 @@ - name: Install leap packages become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - libgdbm4 - dbench
@@ -176,7 +165,7 @@ - name: Install sle15 sp2 and sp3 packages become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - libgdbm4 state: present
@@ -220,7 +209,7 @@ - name: Install dbench for sles15-sp2 become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - dbench state: present
@@ -230,7 +219,7 @@ - name: Install nfs-utils become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - nfs-utils state: present
Signature · 1 line
2.44.0
RFC PATCH 10/22 fstests_prep_localhost: Replace the use of the community.general zypper module
In reply to [email protected]From: Chuck Lever <[email protected]>
--- .../fstests_prep_localhost/tasks/install-deps/suse/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
playbooks/roles/fstests_prep_localhost/tasks/install-deps/suse/main.yml +1 -1
@@ -35,7 +35,7 @@ - name: Install local dependencies for fstests command and control become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - python3-junit-xml - python3-pip
Signature · 1 line
2.44.0
RFC PATCH 11/22 install-menuconfig-deps: Replace the use of the community.general.zypper module
In reply to [email protected]From: Chuck Lever <[email protected]>
--- .../install-menuconfig-deps/tasks/install-deps/suse/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
playbooks/roles/install-menuconfig-deps/tasks/install-deps/suse/main.yml +2 -1
@@ -9,7 +9,7 @@ - name: Install kdevops generic dependencies become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - gcc - make
@@ -19,5 +19,6 @@ - bc - sed - ncurses-devel + state: present when: - is_tumbleweed
Signature · 1 line
2.44.0
RFC PATCH 12/22 install_systemd_journal: Replace the use of the community.general.zypper module
In reply to [email protected]From: Chuck Lever <[email protected]>
--- .../tasks/install-deps/suse/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
playbooks/roles/install_systemd_journal_remote/tasks/install-deps/suse/main.yml +2 -1
@@ -2,9 +2,10 @@ - name: Install systemd-journal-remote become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - systemd-journal-remote + state: present when: - devconfig_enable_systemd_journal_remote|bool tags: journal
Signature · 1 line
2.44.0
RFC PATCH 13/22 install_systemd_timesyncd: Replace the use of the community.general.zypper module
In reply to [email protected]From: Chuck Lever <[email protected]>
--- .../install_systemd_timesyncd/tasks/install-deps/suse/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
playbooks/roles/install_systemd_timesyncd/tasks/install-deps/suse/main.yml +2 -1
@@ -2,9 +2,10 @@ - name: Install systemd-timesyncd become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - systemd-timesyncd + state: present when: - devconfig_enable_systemd_timesyncd|bool tags: timesyncd
Signature · 1 line
2.44.0
RFC PATCH 14/22 install_terraform: Replace the use of the community.general.zypper module
In reply to [email protected]From: Chuck Lever <[email protected]>
--- .../roles/install_terraform/tasks/install-deps/suse/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
playbooks/roles/install_terraform/tasks/install-deps/suse/main.yml +2 -1
@@ -33,9 +33,10 @@ - name: Install vagrant and vagrant-libvirt from your tumbleweed repository become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - terraform + state: present when: - not force_install_zip|bool - not force_install_if_present|bool
Signature · 1 line
2.44.0
RFC PATCH 15/22 install_vagrant: Replace the use of the community.general.zypper module
In reply to [email protected]From: Chuck Lever <[email protected]>
The lack of allow-vendor-change and disable_recommends arguments might be a problem.
--- .../install_vagrant/tasks/install-deps/suse/main.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
playbooks/roles/install_vagrant/tasks/install-deps/suse/main.yml +3 -5
@@ -31,13 +31,11 @@ - name: Install vagrant and vagrant-libvirt from opensuse repository become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - vagrant - vagrant-libvirt - extra_args: '--allow-vendor-change' state: latest - disable_recommends: no when: - not force_install_zip|bool - not force_install_if_present|bool
@@ -47,7 +45,7 @@ - name: Install vagrant and vagrant-libvirt from your tumbleweed repository become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - vagrant - vagrant-libvirt
@@ -89,7 +87,7 @@ - name: Install vagrant-libvirt build dependencies become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - qemu - libvirt
Signature · 1 line
2.44.0
RFC PATCH 16/22 kdc: Replace the use of the community.general.zypper module
In reply to [email protected]From: Chuck Lever <[email protected]>
--- playbooks/roles/kdc/tasks/install-deps/suse/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
playbooks/roles/kdc/tasks/install-deps/suse/main.yml +1 -1
@@ -2,7 +2,7 @@ - name: Install kdc dependencies become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - krb5 - krb5-client
Signature · 1 line
2.44.0
RFC PATCH 17/22 krb5: Replace the use of the community.general.zypper module
In reply to [email protected]From: Chuck Lever <[email protected]>
The lack of a force_resolution parameter might be a problem.
--- playbooks/roles/krb5/tasks/install-deps/suse/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
playbooks/roles/krb5/tasks/install-deps/suse/main.yml +1 -2
@@ -2,13 +2,12 @@ - name: Install krb5 dependencies become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - krb5 - krb5-client - kernel-default state: present - force_resolution: true - name: Reboot system to make the new kernel and modules take effect become: yes
Signature · 1 line
2.44.0
RFC PATCH 18/22 ktls: Replace the use of the community.general.zypper module
In reply to [email protected]From: Chuck Lever <[email protected]>
--- playbooks/roles/ktls/tasks/install-deps/suse/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
playbooks/roles/ktls/tasks/install-deps/suse/main.yml +2 -2
@@ -2,8 +2,8 @@ - name: Install ktls dependencies become: yes become_method: sudo - zypper: - state: present + ansible.builtin.package: name: - python3-cryptography - ktls-utils + state: present
Signature · 1 line
2.44.0
RFC PATCH 19/22 libvirt_user: Replace the use of the community.general.zypper module
In reply to [email protected]From: Chuck Lever <[email protected]>
--- playbooks/roles/libvirt_user/tasks/install-deps/suse/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
playbooks/roles/libvirt_user/tasks/install-deps/suse/main.yml +1 -1
@@ -2,7 +2,7 @@ - name: Install libvirt / kvm dependencies become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - libvirt - libvirt-daemon
Signature · 1 line
2.44.0
RFC PATCH 20/22 nfsd: Replace the use of the community.general.zypper module
In reply to [email protected]From: Chuck Lever <[email protected]>
Also de-duplicate the logic that builds the nfsd_packages list.
--- .../nfsd/tasks/install-deps/debian/main.yml | 36 ---------------- .../nfsd/tasks/install-deps/redhat/main.yml | 33 --------------- .../nfsd/tasks/install-deps/suse/main.yml | 34 --------------- playbooks/roles/nfsd/tasks/main.yml | 42 +++++++++++++++---- playbooks/roles/nfsd/vars/Debian.yml | 3 ++ playbooks/roles/nfsd/vars/RedHat.yml | 2 + playbooks/roles/nfsd/vars/Suse.yml | 4 ++ 7 files changed, 42 insertions(+), 112 deletions(-) delete mode 100644 playbooks/roles/nfsd/tasks/install-deps/debian/main.yml delete mode 100644 playbooks/roles/nfsd/tasks/install-deps/redhat/main.yml delete mode 100644 playbooks/roles/nfsd/tasks/install-deps/suse/main.yml
playbooks/roles/nfsd/tasks/install-deps/debian/main.yml deleted +0 -36
@@ -1,36 +0,0 @@ ---- -- name: Get OS-specific variables - ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', params) }}" - vars: - params: - files: - - '{{ansible_distribution}}.yml' - - '{{ansible_os_family}}.yml' - - default.yml - paths: - - 'vars' - -- name: Determine which fsprogs package is needed for "{{ nfsd_export_fstype }}" - set_fact: - fsprogs: "{{ fstype_userspace_progs[nfsd_export_fstype] | default() }}" - -- name: Add {{ fsprogs }} to the nfsd packages list - set_fact: - nfsd_packages: "{{ nfsd_packages + [fsprogs] }}" - when: - - fsprogs is defined - - fsprogs - -- name: Add gssproxy to the nfsd packages list - set_fact: - nfsd_packages: "{{ nfsd_packages + ['gssproxy'] }}" - when: kdevops_krb5_enable|bool - -- name: Install nfsd dependencies - become: yes - become_method: sudo - apt: - name: "{{ nfsd_packages }}" - state: present - update_cache: yes - tags: [ 'pynfs', 'deps' ]
playbooks/roles/nfsd/tasks/install-deps/redhat/main.yml deleted +0 -33
@@ -1,33 +0,0 @@ ---- -- name: Get OS-specific variables - ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', params) }}" - vars: - params: - files: - - '{{ansible_distribution}}.yml' - - '{{ansible_os_family}}.yml' - - default.yml - paths: - - 'vars' - -- name: Determine which fsprogs package is needed for "{{ nfsd_export_fstype }}" - set_fact: - fsprogs: "{{ fstype_userspace_progs[nfsd_export_fstype] | default() }}" - -- name: Add {{ fsprogs }} to the nfsd packages list - set_fact: - nfsd_packages: "{{ nfsd_packages + [fsprogs] }}" - when: - - fsprogs is defined - - fsprogs - -- name: Install nfsd dependencies - become: yes - become_method: sudo - yum: - update_cache: yes - name: "{{ nfsd_packages }}" - retries: 3 - delay: 5 - register: result - until: result.rc == 0
playbooks/roles/nfsd/tasks/install-deps/suse/main.yml deleted +0 -34
@@ -1,34 +0,0 @@ ---- -- name: Get OS-specific variables - ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', params) }}" - vars: - params: - files: - - '{{ansible_distribution}}.yml' - - '{{ansible_os_family}}.yml' - - default.yml - paths: - - 'vars' - -- name: Determine which fsprogs package is needed for "{{ nfsd_export_fstype }}" - set_fact: - fsprogs: "{{ fstype_userspace_progs[nfsd_export_fstype] | default() }}" - -- name: Add {{ fsprogs }} to the nfsd packages list - set_fact: - nfsd_packages: "{{ nfsd_packages + [fsprogs] }}" - when: - - fsprogs is defined - - fsprogs - -- name: Add additional packages needed for krb5 to the nfsd packages list - set_fact: - nfsd_packages: "{{ nfsd_packages + ['gssproxy', 'libverto-libev1'] }}" - when: kdevops_krb5_enable|bool - -- name: Install nfsd dependencies - become: yes - become_method: sudo - zypper: - name: "{{ nfsd_packages }}" - state: present
playbooks/roles/nfsd/tasks/main.yml +33 -9
48 lines not on this page · raw message
playbooks/roles/nfsd/vars/Debian.yml +3 -0
@@ -5,6 +5,9 @@ nfsd_packages: - nfs-kernel-server - policycoreutils +krb5_packages: + - gssproxy + fstype_userspace_progs: btrfs: btrfs-progs ext4: e2fsprogs
playbooks/roles/nfsd/vars/RedHat.yml +2 -0
@@ -6,6 +6,8 @@ nfsd_packages: - policycoreutils - python3-policycoreutils +krb5_packages: [] + fstype_userspace_progs: btrfs: btrfs-progs ext4: e2fsprogs
playbooks/roles/nfsd/vars/Suse.yml +4 -0
@@ -4,6 +4,10 @@ nfsd_packages: - nfs-utils - policycoreutils +krb5_packages: + - gssproxy + - libverto-libev1 + fstype_userspace_progs: btrfs: btrfsprogs ext4: e2fsprogs
Signature · 1 line
2.44.0
RFC PATCH 21/22 pynfs: Replace the use of the community.general.zypper module
In reply to [email protected]From: Chuck Lever <[email protected]>
--- playbooks/roles/pynfs/tasks/install-deps/suse/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
playbooks/roles/pynfs/tasks/install-deps/suse/main.yml +1 -1
@@ -2,7 +2,7 @@ - name: Install build dependencies for pynfs become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - gcc - git-core
Signature · 1 line
2.44.0
RFC PATCH 22/22 selftests: Replace the use of the community.general.zypper module
In reply to [email protected]From: Chuck Lever <[email protected]>
--- playbooks/roles/selftests/tasks/install-deps/suse/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
playbooks/roles/selftests/tasks/install-deps/suse/main.yml +1 -1
@@ -44,7 +44,7 @@ - name: Install every single selftest build dependencies become: yes become_method: sudo - zypper: + ansible.builtin.package: name: - git-core - gcc
Signature · 1 line
2.44.0
Goldwyn, Anthony,
anyone on your end willing to review this?
Luis
Quoted 90 lines · On Fri, Apr 12, 2024 at 01:46:33PM -0400, [email protected] wrote:
From: Chuck Lever <[email protected]>
[email protected] reports:
Quoted 7 lines
So on a fresh new debian testing system I noticed we will have to install also now:
ansible-galaxy collection install ansible.posix --> due to our ansible.cfg stdout_callback=debug ansible-galaxy collection install community.general --> due to zypper !
Otherwise we get obscure errors.
This series surgically replaces the use of the zypper module to mitigate the dependency on the community.general collection.
There are a few spots where some extra arguments were used. Those spots need some review/testing attention. None of this has been tested yet, this post is just for comments / thinking out loud.
Chuck Lever (22):
blktests: Replace the use of community.general.zypper
bootlinux: Replace the use of the community.general.zypper module
btrfs_progs: Replace the use of the community.general.zypper module
build-qemu: Replace the use of the community.general.zypper module
create_partition: Replace the use of the community.general.zypper
module
cxl: Replace the use of the community.general.zypper module
devconfig: Replace the use of the community.general.zypper module
kotd-rev-kernel: Replace the use of the community.general.zypper
module
fstests: Replace the use of the community.general.zypper module
fstests_prep_localhost: Replace the use of the community.general
zypper module
install-menuconfig-deps: Replace the use of the
community.general.zypper module
install_systemd_journal: Replace the use of the
community.general.zypper module
install_systemd_timesyncd: Replace the use of the
community.general.zypper module
install_terraform: Replace the use of the community.general.zypper
module
install_vagrant: Replace the use of the community.general.zypper
module
kdc: Replace the use of the community.general.zypper module
krb5: Replace the use of the community.general.zypper module
ktls: Replace the use of the community.general.zypper module
libvirt_user: Replace the use of the community.general.zypper module
nfsd: Replace the use of the community.general.zypper module
pynfs: Replace the use of the community.general.zypper module
selftests: Replace the use of the community.general.zypper module.../blktests/tasks/install-deps/suse/main.yml | 27 ++++-------- .../tasks/install-deps/suse/main.yml | 4 +- .../tasks/install-deps/suse/main.yml | 4 +- .../tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 2 +- .../cxl/tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 31 +++++++------- .../tasks/kotd-rev-kernel/suse/main.yml | 6 +-- .../fstests/tasks/install-deps/suse/main.yml | 27 ++++-------- .../tasks/install-deps/suse/main.yml | 2 +- .../tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 8 ++-- .../kdc/tasks/install-deps/suse/main.yml | 2 +- .../krb5/tasks/install-deps/suse/main.yml | 3 +- .../ktls/tasks/install-deps/suse/main.yml | 4 +- .../tasks/install-deps/suse/main.yml | 2 +- .../nfsd/tasks/install-deps/debian/main.yml | 36 ---------------- .../nfsd/tasks/install-deps/redhat/main.yml | 33 --------------- .../nfsd/tasks/install-deps/suse/main.yml | 34 --------------- playbooks/roles/nfsd/tasks/main.yml | 42 +++++++++++++++---- playbooks/roles/nfsd/vars/Debian.yml | 3 ++ playbooks/roles/nfsd/vars/RedHat.yml | 2 + playbooks/roles/nfsd/vars/Suse.yml | 4 ++ .../pynfs/tasks/install-deps/suse/main.yml | 2 +- .../tasks/install-deps/suse/main.yml | 2 +- 28 files changed, 102 insertions(+), 196 deletions(-) delete mode 100644 playbooks/roles/nfsd/tasks/install-deps/debian/main.yml delete mode 100644 playbooks/roles/nfsd/tasks/install-deps/redhat/main.yml delete mode 100644 playbooks/roles/nfsd/tasks/install-deps/suse/main.ymlbase-commit:
9f538b3b87d15eebf60ead16c666ab7e433a5075Signature · 1 line
2.44.0
I've been able to test some of this series with OpenSuSE 15.3. Found and fixed one bug. I've pushed the result to:
https://github.com/chucklever/kdevops/tree/replace-zypper-module
However it looks like the fstests workflow hasn't been tested on SuSE for quite some time.
OpenSuSE doesn't like the group name "123456-fsgqa" (and probably the user name is rejected too, but kdevops tries the group first, and that's where the workflow fails).
TASK [fstests : Run fstests using ./oscheck.sh --print-start --journal {{ fstests_journal }} --print-done --test-section {{ fstests_section }} {{ oscheck_extra_args }} {{ all_limit_tests }}] ***
fatal: [cel-tmpfs-default]: FAILED! => {
"censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result",
"changed": true
}
...ignoring
Then when the test completes, the workflows/fstests/results directory is empty.
Quoted 99 lines · Luis Chamberlain
Goldwyn, Anthony,
anyone on your end willing to review this?
Luis
Quoted 90 lines · On Fri, Apr 12, 2024 at 01:46:33PM -0400, [email protected] wrote:
From: Chuck Lever <[email protected]>
[email protected] reports:
Quoted 7 lines
So on a fresh new debian testing system I noticed we will have to install also now:
ansible-galaxy collection install ansible.posix --> due to our ansible.cfg stdout_callback=debug ansible-galaxy collection install community.general --> due to zypper !
Otherwise we get obscure errors.
This series surgically replaces the use of the zypper module to mitigate the dependency on the community.general collection.
There are a few spots where some extra arguments were used. Those spots need some review/testing attention. None of this has been tested yet, this post is just for comments / thinking out loud.
Chuck Lever (22):
blktests: Replace the use of community.general.zypper
bootlinux: Replace the use of the community.general.zypper module
btrfs_progs: Replace the use of the community.general.zypper module
build-qemu: Replace the use of the community.general.zypper module
create_partition: Replace the use of the community.general.zypper
module
cxl: Replace the use of the community.general.zypper module
devconfig: Replace the use of the community.general.zypper module
kotd-rev-kernel: Replace the use of the community.general.zypper
module
fstests: Replace the use of the community.general.zypper module
fstests_prep_localhost: Replace the use of the community.general
zypper module
install-menuconfig-deps: Replace the use of the
community.general.zypper module
install_systemd_journal: Replace the use of the
community.general.zypper module
install_systemd_timesyncd: Replace the use of the
community.general.zypper module
install_terraform: Replace the use of the community.general.zypper
module
install_vagrant: Replace the use of the community.general.zypper
module
kdc: Replace the use of the community.general.zypper module
krb5: Replace the use of the community.general.zypper module
ktls: Replace the use of the community.general.zypper module
libvirt_user: Replace the use of the community.general.zypper module
nfsd: Replace the use of the community.general.zypper module
pynfs: Replace the use of the community.general.zypper module
selftests: Replace the use of the community.general.zypper module.../blktests/tasks/install-deps/suse/main.yml | 27 ++++-------- .../tasks/install-deps/suse/main.yml | 4 +- .../tasks/install-deps/suse/main.yml | 4 +- .../tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 2 +- .../cxl/tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 31 +++++++------- .../tasks/kotd-rev-kernel/suse/main.yml | 6 +-- .../fstests/tasks/install-deps/suse/main.yml | 27 ++++-------- .../tasks/install-deps/suse/main.yml | 2 +- .../tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 8 ++-- .../kdc/tasks/install-deps/suse/main.yml | 2 +- .../krb5/tasks/install-deps/suse/main.yml | 3 +- .../ktls/tasks/install-deps/suse/main.yml | 4 +- .../tasks/install-deps/suse/main.yml | 2 +- .../nfsd/tasks/install-deps/debian/main.yml | 36 ---------------- .../nfsd/tasks/install-deps/redhat/main.yml | 33 --------------- .../nfsd/tasks/install-deps/suse/main.yml | 34 --------------- playbooks/roles/nfsd/tasks/main.yml | 42 +++++++++++++++---- playbooks/roles/nfsd/vars/Debian.yml | 3 ++ playbooks/roles/nfsd/vars/RedHat.yml | 2 + playbooks/roles/nfsd/vars/Suse.yml | 4 ++ .../pynfs/tasks/install-deps/suse/main.yml | 2 +- .../tasks/install-deps/suse/main.yml | 2 +- 28 files changed, 102 insertions(+), 196 deletions(-)delete mode 100644
playbooks/roles/nfsd/tasks/install-deps/debian/main.ymldelete mode 100644playbooks/roles/nfsd/tasks/install-deps/redhat/main.ymldelete mode 100644playbooks/roles/nfsd/tasks/install-deps/suse/main.ymlbase-commit:
9f538b3b87d15eebf60ead16c666ab7e433a5075Signature · 1 line
2.44.0
--
Chuck Lever
Quoted 4 lines · Chuck Lever III
I've been able to test some of this series with OpenSuSE 15.3. Found and fixed one bug. I've pushed the result to:
Quoted 8 lines
https://github.com/chucklever/kdevops/tree/replace-zypper-module
However it looks like the fstests workflow hasn't been tested on SuSE for quite some time.
OpenSuSE doesn't like the group name "123456-fsgqa" (and probably the user name is rejected too, but kdevops tries the group first, and that's where the workflow fails).
I am able to add users without any issue here. I don't think that is the problem here.
# useradd -m 123456-fsgqa
opensuse tries to make the group of the same name as user. Adding "-g " to the useradd command should resolve this issue.
Quoted 11 lines
TASK [fstests : Run fstests using ./oscheck.sh --print-start --journal {{
fstests_journal}} --print-done --test-section {{fstests_section}} {{oscheck_extra_args}} {{all_limit_tests}}] ***
fatal: [cel-tmpfs-default]: FAILED! => {
"censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result",
"changed": true
}
...ignoringThen when the test completes, the workflows/fstests/results directory is empty.
Signature · 1 line
Goldwyn
Quoted 7 lines · Goldwyn Rodrigues
Quoted 6 lines · Chuck Lever III
I've been able to test some of this series with OpenSuSE 15.3. Found and fixed one bug. I've pushed the result to:
https://github.com/chucklever/kdevops/tree/replace-zypper-module
Quoted 8 lines
Quoted 6 lines
However it looks like the fstests workflow hasn't been tested on SuSE for quite some time.
OpenSuSE doesn't like the group name "123456-fsgqa" (and probably the user name is rejected too, but kdevops tries the group first, and that's where the workflow fails).
I am able to add users without any issue here.
Is "here" on an OpenSuSE 15.3 system? I did log into the test system and try "groupadd" directly, and it failed in the same way.
Quoted 6 lines
I don't think that is
the problem here.# useradd -m 123456-fsgqaopensuse tries to make the group of the same name as user. Adding "-g " to the useradd command should resolve this issue.
The Ansible script is adding the new groups first before the users. So, I wonder if we just combine those two steps in the script, that will fix it...?
Signature · 1 line
Chuck Lever
Quoted 12 lines · Chuck Lever
Quoted 10 lines · Goldwyn Rodrigues
Quoted 9 lines · Chuck Lever III
I've been able to test some of this series with OpenSuSE 15.3. Found and fixed one bug. I've pushed the result to:
https://github.com/chucklever/kdevops/tree/replace-zypper-module
However it looks like the fstests workflow hasn't been tested on SuSE for quite some time.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
OpenSuSE doesn't like the group name "123456-fsgqa" (and probably the user name is rejected too, but kdevops tries the group first, and that's where the workflow fails).
I am able to add users without any issue here.
Is "here" on an OpenSuSE 15.3 system? I did log into the test system and try "groupadd" directly, and it failed in the same way.
openSUSE Tumbleweed, but I am sure nothing has changed since openSUSE 15.3 I am able to add the group 123456-fsgqa. However, if you have added a 123456-fsgqa *user* before it may fail. What is the error message you get?
Also what is the output of:
# grep fsgqa /etc/group /etc/passwd
Quoted 6 lines
Quoted 6 lines
I don't think that is
the problem here.# useradd -m 123456-fsgqa
Quoted 6 lines
Quoted 2 lines
opensuse tries to make the group of the same name as user. Adding "-g " to the useradd command should resolve this issue.
The Ansible script is adding the new groups first before the users. So, I wonder if we just combine those two steps in the script, that will fix it...?
Maybe asking to use fsgqa group should do the trick. I see it being done for fsgqa user.
opensuse creates a new group with the same name when a new user is added, so I assume the user/group is already present.
Signature · 1 line
Goldwyn
Quoted 23 lines · Goldwyn Rodrigues
Quoted 18 lines · Chuck Lever
Quoted 15 lines · Goldwyn Rodrigues
Quoted 4 lines · Chuck Lever III
I've been able to test some of this series with OpenSuSE 15.3. Found and fixed one bug. I've pushed the result to:
Quoted 8 lines
https://github.com/chucklever/kdevops/tree/replace-zypper-module
However it looks like the fstests workflow hasn't been tested on SuSE for quite some time.
OpenSuSE doesn't like the group name "123456-fsgqa" (and probably the user name is rejected too, but kdevops tries the group first, and that's where the workflow fails).
I am able to add users without any issue here.
Quoted 7 lines
Quoted 2 lines
Is "here" on an OpenSuSE 15.3 system? I did log into the test system and try "groupadd" directly, and it failed in the same way.
openSUSE Tumbleweed, but I am sure nothing has changed since openSUSE 15.3 I am able to add the group 123456-fsgqa. However, if you have added a 123456-fsgqa *user* before it may fail. What is the error message you get?
TASK [fstests : Add missing groups for fstests] ************************************************************************************************
changed: [cel-tmpfs-default] => (item=Ensuring the group sys exists)
failed: [cel-tmpfs-default] (item=Ensuring the group 123456-fsgqa exists) => {
"ansible_loop_var": "item",
"changed": false,
"item": "123456-fsgqa",
"name": "123456-fsgqa"
}MSG:
groupadd: '123456-fsgqa' is not a valid group name
I logged in at the time, and tried by hand:
cel-tmpfs-default:~ # groupadd 123456-fsgqa
groupadd: '123456-fsgqa' is not a valid group name cel-tmpfs-default:~ #
Quoted 3 lines
Also what is the output of:
# grep fsgqa /etc/group /etc/passwd
That system is in use for other testing, I'll get back to you on that.
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
I don't think that is
the problem here.# useradd -m 123456-fsgqaopensuse tries to make the group of the same name as user. Adding "-g " to the useradd command should resolve this issue.
Quoted 8 lines
Quoted 3 lines
The Ansible script is adding the new groups first before the users. So, I wonder if we just combine those two steps in the script, that will fix it...?
Maybe asking to use fsgqa group should do the trick. I see it being done for fsgqa user.
opensuse creates a new group with the same name when a new user is added, so I assume the user/group is already present.
The purpose of 123456-fsgqa is for generic/381 (IIRC) which tests xfs's ability to deal with user and group names that start with a digit.
--
Chuck Lever
Quoted 42 lines · Chuck Lever III
Quoted 23 lines · Goldwyn Rodrigues
Quoted 18 lines · Chuck Lever
Quoted 15 lines · Goldwyn Rodrigues
Quoted 4 lines · Chuck Lever III
I've been able to test some of this series with OpenSuSE 15.3. Found and fixed one bug. I've pushed the result to:
Quoted 8 lines
https://github.com/chucklever/kdevops/tree/replace-zypper-module
However it looks like the fstests workflow hasn't been tested on SuSE for quite some time.
OpenSuSE doesn't like the group name "123456-fsgqa" (and probably the user name is rejected too, but kdevops tries the group first, and that's where the workflow fails).
I am able to add users without any issue here.
Quoted 7 lines
Quoted 2 lines
Is "here" on an OpenSuSE 15.3 system? I did log into the test system and try "groupadd" directly, and it failed in the same way.
openSUSE Tumbleweed, but I am sure nothing has changed since openSUSE 15.3 I am able to add the group 123456-fsgqa. However, if you have added a 123456-fsgqa *user* before it may fail. What is the error message you get?
TASK [fstests : Add missing groups for fstests] ************************************************************************************************
changed: [cel-tmpfs-default] => (item=Ensuring the group sys exists)
failed: [cel-tmpfs-default] (item=Ensuring the group 123456-fsgqa exists) => {"ansible_loop_var": "item", "changed": false, "item": "123456-fsgqa", "name": "123456-fsgqa" }MSG:
Quoted 7 lines
groupadd: '123456-fsgqa' is not a valid group name
I logged in at the time, and tried by hand:
cel-tmpfs-default:~ # groupadd 123456-fsgqa
groupadd: '123456-fsgqa' is not a valid group name cel-tmpfs-default:~ #
The issue is that SLE is using shadow v4.8, and it doesn't allow user/group names starting with digits. This was later on relaxed via shadow upstream commit cfc981df2afc ("shadow: use relaxed usernames") which was released in v4.13. This is why this works in TW.
I had a local old kdevops patch that did "useradd --badnames -U" to bypass the check for SLE.
Regards,
Anthony
Quoted 55 lines · Anthony Iliopoulos
Quoted 42 lines · Chuck Lever III
Quoted 23 lines · Goldwyn Rodrigues
Quoted 18 lines · Chuck Lever
Quoted 15 lines · Goldwyn Rodrigues
Quoted 4 lines · Chuck Lever III
I've been able to test some of this series with OpenSuSE 15.3. Found and fixed one bug. I've pushed the result to:
Quoted 8 lines
https://github.com/chucklever/kdevops/tree/replace-zypper-module
However it looks like the fstests workflow hasn't been tested on SuSE for quite some time.
OpenSuSE doesn't like the group name "123456-fsgqa" (and probably the user name is rejected too, but kdevops tries the group first, and that's where the workflow fails).
I am able to add users without any issue here.
Quoted 7 lines
Quoted 2 lines
Is "here" on an OpenSuSE 15.3 system? I did log into the test system and try "groupadd" directly, and it failed in the same way.
openSUSE Tumbleweed, but I am sure nothing has changed since openSUSE 15.3 I am able to add the group 123456-fsgqa. However, if you have added a 123456-fsgqa *user* before it may fail. What is the error message you get?
TASK [fstests : Add missing groups for fstests] ************************************************************************************************
changed: [cel-tmpfs-default] => (item=Ensuring the group sys exists)
failed: [cel-tmpfs-default] (item=Ensuring the group 123456-fsgqa exists) => {
"ansible_loop_var": "item",
"changed": false,
"item": "123456-fsgqa",
"name": "123456-fsgqa"
}MSG:
Quoted 7 lines
groupadd: '123456-fsgqa' is not a valid group name
I logged in at the time, and tried by hand:
cel-tmpfs-default:~ # groupadd 123456-fsgqa
groupadd: '123456-fsgqa' is not a valid group name cel-tmpfs-default:~ #
Quoted 7 lines
The issue is that SLE is using shadow v4.8, and it doesn't allow user/group names starting with digits. This was later on relaxed via shadow upstream commit
cfc981df2afc("shadow: use relaxed usernames") which was released in v4.13. This is why this works in TW.I had a local old kdevops patch that did "useradd --badnames -U" to bypass the check for SLE.
Thanks for the suggestion!
The current playbooks/roles/fstests/tasks/main.yml uses the ansible.builtin.group and ansible.builtin.user modules, neither of which have a "badname" parameter.
I also looked at Fedora's useradd, and it does not have "--badname" either.
We might add some special family-dependent logic here to make this work everywhere, if people think that's worth doing. Shouldn't be too difficult.
Another option is to remove this name, and expunge generic/381.
--
Chuck Lever
Quoted 60 lines · Chuck Lever III
Quoted 60 lines · Anthony Iliopoulos
Quoted 42 lines · Chuck Lever III
Quoted 23 lines · Goldwyn Rodrigues
Quoted 18 lines · Chuck Lever
Quoted 15 lines · Goldwyn Rodrigues
Quoted 4 lines · Chuck Lever III
I've been able to test some of this series with OpenSuSE 15.3. Found and fixed one bug. I've pushed the result to:
Quoted 8 lines
https://github.com/chucklever/kdevops/tree/replace-zypper-module
However it looks like the fstests workflow hasn't been tested on SuSE for quite some time.
OpenSuSE doesn't like the group name "123456-fsgqa" (and probably the user name is rejected too, but kdevops tries the group first, and that's where the workflow fails).
I am able to add users without any issue here.
Quoted 7 lines
Quoted 2 lines
Is "here" on an OpenSuSE 15.3 system? I did log into the test system and try "groupadd" directly, and it failed in the same way.
openSUSE Tumbleweed, but I am sure nothing has changed since openSUSE 15.3 I am able to add the group 123456-fsgqa. However, if you have added a 123456-fsgqa *user* before it may fail. What is the error message you get?
TASK [fstests : Add missing groups for fstests] ************************************************************************************************
changed: [cel-tmpfs-default] => (item=Ensuring the group sys exists)
failed: [cel-tmpfs-default] (item=Ensuring the group 123456-fsgqa exists) => {
"ansible_loop_var": "item",
"changed": false,
"item": "123456-fsgqa",
"name": "123456-fsgqa"
}MSG:
Quoted 7 lines
groupadd: '123456-fsgqa' is not a valid group name
I logged in at the time, and tried by hand:
cel-tmpfs-default:~ # groupadd 123456-fsgqa
groupadd: '123456-fsgqa' is not a valid group name cel-tmpfs-default:~ #The issue is that SLE is using shadow v4.8, and it doesn't allow user/group names starting with digits. This was later on relaxed via shadow upstream commit
cfc981df2afc("shadow: use relaxed usernames") which was released in v4.13. This is why this works in TW.
Quoted 8 lines
Quoted 2 lines
I had a local old kdevops patch that did "useradd --badnames -U" to bypass the check for SLE.
Thanks for the suggestion!
The current
playbooks/roles/fstests/tasks/main.ymluses the ansible.builtin.group and ansible.builtin.user modules, neither of which have a "badname" parameter.
Yes I don't think this was ever implemented in ansible, or at least I don't see anything from a quick look at [1].
The way I had fixed this for SLE was along the lines of:
playbooks/roles/fstests/tasks/main.yml +1 -0
@@ -872,6 +872,7 @@ group: name: "{{ item }}" state: present + command: "useradd --badnames -U {{ item }}" with_items: - sys - 123456-fsgqa
Quoted 2 lines
I also looked at Fedora's useradd, and it does not have "--badname" either.
Which fedora release is that? I can see it in f39 at least, and I think it has been available since f32 which ships shadow-utils v4.8.1 [2] (the --badname(s) option was introduced in shadow v4.8, commit a2cd3e9ef03a).
Likewise for debian, so I suppose all kdevops-supported distros should have this available.
Regards,
Anthony
[1] https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/user.py
[2] https://src.fedoraproject.org/rpms/shadow-utils/blob/f32/f/shadow-utils.spec
Quoted 84 lines · Anthony Iliopoulos
Quoted 60 lines · Chuck Lever III
Quoted 60 lines · Anthony Iliopoulos
Quoted 42 lines · Chuck Lever III
Quoted 23 lines · Goldwyn Rodrigues
Quoted 18 lines · Chuck Lever
Quoted 15 lines · Goldwyn Rodrigues
Quoted 4 lines · Chuck Lever III
I've been able to test some of this series with OpenSuSE 15.3. Found and fixed one bug. I've pushed the result to:
Quoted 8 lines
https://github.com/chucklever/kdevops/tree/replace-zypper-module
However it looks like the fstests workflow hasn't been tested on SuSE for quite some time.
OpenSuSE doesn't like the group name "123456-fsgqa" (and probably the user name is rejected too, but kdevops tries the group first, and that's where the workflow fails).
I am able to add users without any issue here.
Quoted 7 lines
Quoted 2 lines
Is "here" on an OpenSuSE 15.3 system? I did log into the test system and try "groupadd" directly, and it failed in the same way.
openSUSE Tumbleweed, but I am sure nothing has changed since openSUSE 15.3 I am able to add the group 123456-fsgqa. However, if you have added a 123456-fsgqa *user* before it may fail. What is the error message you get?
TASK [fstests : Add missing groups for fstests] ************************************************************************************************
changed: [cel-tmpfs-default] => (item=Ensuring the group sys exists)
failed: [cel-tmpfs-default] (item=Ensuring the group 123456-fsgqa exists) => {
"ansible_loop_var": "item",
"changed": false,
"item": "123456-fsgqa",
"name": "123456-fsgqa"
}MSG:
Quoted 7 lines
groupadd: '123456-fsgqa' is not a valid group name
I logged in at the time, and tried by hand:
cel-tmpfs-default:~ # groupadd 123456-fsgqa
groupadd: '123456-fsgqa' is not a valid group name cel-tmpfs-default:~ #The issue is that SLE is using shadow v4.8, and it doesn't allow user/group names starting with digits. This was later on relaxed via shadow upstream commit
cfc981df2afc("shadow: use relaxed usernames") which was released in v4.13. This is why this works in TW.Quoted 8 lines
Quoted 2 lines
I had a local old kdevops patch that did "useradd --badnames -U" to bypass the check for SLE.
Thanks for the suggestion!
The current
playbooks/roles/fstests/tasks/main.ymluses the ansible.builtin.group and ansible.builtin.user modules, neither of which have a "badname" parameter.Yes I don't think this was ever implemented in ansible, or at least I don't see anything from a quick look at [1].
The way I had fixed this for SLE was along the lines of:
playbooks/roles/fstests/tasks/main.yml +0
-0
playbooks/roles/fstests/tasks/main.yml line 875
Quoted 4 lines
playbooks/roles/fstests/tasks/main.yml +1
-0@@ -872,6 +872,7 @@ group: name: "{{ item }}" state: present + command: "useradd --badnames -U {{ item }}"
This task is supposed to add only the group. A subsequent task adds the corresponding user. To make this work I think we will need to combine these two tasks and then use the command module you have here to run "useradd", which should add both the user and group at the same time. No reason I can think of to add them separately.
Quoted 10 lines
playbooks/roles/fstests/tasks/main.yml +0
-0with_items: - sys - 123456-fsgqaQuoted 3 lines
I also looked at Fedora's useradd, and it does not have "--badname" either.
Which fedora release is that? I can see it in f39 at least, and I think it has been available since f32 which ships shadow-utils v4.8.1 [2] (the --badname(s) option was introduced in shadow v4.8, commit
a2cd3e9ef03a).
I looked on Fedora 38 and now again on 39. groupadd does not have a --badname, but I see that useradd does.
I'll post a patch... if all OS-families do something sensible, then this should be easy to do without any family-specific processing.
Quoted 8 lines
Likewise for debian, so I suppose all kdevops-supported distros should have this available.
Regards,
Anthony[1] https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/user.py
[2] https://src.fedoraproject.org/rpms/shadow-utils/blob/f32/f/shadow-utils.spec
--
Chuck Lever
Quoted 79 lines · Chuck Lever III
Quoted 79 lines · Anthony Iliopoulos
Quoted 60 lines · Chuck Lever III
Quoted 60 lines · Anthony Iliopoulos
Quoted 42 lines · Chuck Lever III
Quoted 23 lines · Goldwyn Rodrigues
Quoted 18 lines · Chuck Lever
Quoted 15 lines · Goldwyn Rodrigues
Quoted 4 lines · Chuck Lever III
I've been able to test some of this series with OpenSuSE 15.3. Found and fixed one bug. I've pushed the result to:
Quoted 8 lines
https://github.com/chucklever/kdevops/tree/replace-zypper-module
However it looks like the fstests workflow hasn't been tested on SuSE for quite some time.
OpenSuSE doesn't like the group name "123456-fsgqa" (and probably the user name is rejected too, but kdevops tries the group first, and that's where the workflow fails).
I am able to add users without any issue here.
Quoted 7 lines
Quoted 2 lines
Is "here" on an OpenSuSE 15.3 system? I did log into the test system and try "groupadd" directly, and it failed in the same way.
openSUSE Tumbleweed, but I am sure nothing has changed since openSUSE 15.3 I am able to add the group 123456-fsgqa. However, if you have added a 123456-fsgqa *user* before it may fail. What is the error message you get?
TASK [fstests : Add missing groups for fstests] ************************************************************************************************
changed: [cel-tmpfs-default] => (item=Ensuring the group sys exists)
failed: [cel-tmpfs-default] (item=Ensuring the group 123456-fsgqa exists) => {
"ansible_loop_var": "item",
"changed": false,
"item": "123456-fsgqa",
"name": "123456-fsgqa"
}MSG:
Quoted 7 lines
groupadd: '123456-fsgqa' is not a valid group name
I logged in at the time, and tried by hand:
cel-tmpfs-default:~ # groupadd 123456-fsgqa
groupadd: '123456-fsgqa' is not a valid group name cel-tmpfs-default:~ #The issue is that SLE is using shadow v4.8, and it doesn't allow user/group names starting with digits. This was later on relaxed via shadow upstream commit
cfc981df2afc("shadow: use relaxed usernames") which was released in v4.13. This is why this works in TW.Quoted 8 lines
Quoted 2 lines
I had a local old kdevops patch that did "useradd --badnames -U" to bypass the check for SLE.
Thanks for the suggestion!
The current
playbooks/roles/fstests/tasks/main.ymluses the ansible.builtin.group and ansible.builtin.user modules, neither of which have a "badname" parameter.Yes I don't think this was ever implemented in ansible, or at least I don't see anything from a quick look at [1].
The way I had fixed this for SLE was along the lines of:
Quoted 16 lines
playbooks/roles/fstests/tasks/main.yml line 875
Quoted 9 lines
playbooks/roles/fstests/tasks/main.yml +1
-0@@ -872,6 +872,7 @@ group: name: "{{ item }}" state: present + command: "useradd --badnames -U {{ item }}"This task is supposed to add only the group. A subsequent task adds the corresponding user. To make this work I think we will need to combine these two tasks and then use the command module you have here to run "useradd", which should add both the user and group at the same time. No reason I can think of to add them separately.
Yes the above diff was just illustrative, in the original local fix I had this was indeed combined in one task (thus useradd -U), also because the --badname option was never available for groupadd.
Quoted 11 lines
Quoted 10 lines
playbooks/roles/fstests/tasks/main.yml +0
-0with_items: - sys - 123456-fsgqaQuoted 3 lines
I also looked at Fedora's useradd, and it does not have "--badname" either.
Which fedora release is that? I can see it in f39 at least, and I think it has been available since f32 which ships shadow-utils v4.8.1 [2] (the --badname(s) option was introduced in shadow v4.8, commit
a2cd3e9ef03a).
Quoted 6 lines
I looked on Fedora 38 and now again on 39. groupadd does not have a --badname, but I see that useradd does.
I'll post a patch... if all OS-families do something sensible, then this should be easy to do without any family-specific processing.
Sure, as long as useradd comes from the shadow-utils package (which is indeed the case for most of the distros), then this will be fine.
Regards,
Anthony
Quoted 84 lines · On Apr 12, 2024, at 1:46 PM, [email protected] wrote:
From: Chuck Lever <[email protected]>
[email protected] reports:
Quoted 7 lines
So on a fresh new debian testing system I noticed we will have to install also now:
ansible-galaxy collection install ansible.posix --> due to our ansible.cfg stdout_callback=debug ansible-galaxy collection install community.general --> due to zypper !
Otherwise we get obscure errors.
This series surgically replaces the use of the zypper module to mitigate the dependency on the community.general collection.
There are a few spots where some extra arguments were used. Those spots need some review/testing attention. None of this has been tested yet, this post is just for comments / thinking out loud.
Chuck Lever (22):
blktests: Replace the use of community.general.zypper
bootlinux: Replace the use of the community.general.zypper module
btrfs_progs: Replace the use of the community.general.zypper module
build-qemu: Replace the use of the community.general.zypper module
create_partition: Replace the use of the community.general.zypper
module
cxl: Replace the use of the community.general.zypper module
devconfig: Replace the use of the community.general.zypper module
kotd-rev-kernel: Replace the use of the community.general.zypper
module
fstests: Replace the use of the community.general.zypper module
fstests_prep_localhost: Replace the use of the community.general
zypper module
install-menuconfig-deps: Replace the use of the
community.general.zypper module
install_systemd_journal: Replace the use of the
community.general.zypper module
install_systemd_timesyncd: Replace the use of the
community.general.zypper module
install_terraform: Replace the use of the community.general.zypper
module
install_vagrant: Replace the use of the community.general.zypper
module
kdc: Replace the use of the community.general.zypper module
krb5: Replace the use of the community.general.zypper module
ktls: Replace the use of the community.general.zypper module
libvirt_user: Replace the use of the community.general.zypper module
nfsd: Replace the use of the community.general.zypper module
pynfs: Replace the use of the community.general.zypper module
selftests: Replace the use of the community.general.zypper module.../blktests/tasks/install-deps/suse/main.yml | 27 ++++-------- .../tasks/install-deps/suse/main.yml | 4 +- .../tasks/install-deps/suse/main.yml | 4 +- .../tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 2 +- .../cxl/tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 31 +++++++------- .../tasks/kotd-rev-kernel/suse/main.yml | 6 +-- .../fstests/tasks/install-deps/suse/main.yml | 27 ++++-------- .../tasks/install-deps/suse/main.yml | 2 +- .../tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 3 +- .../tasks/install-deps/suse/main.yml | 8 ++-- .../kdc/tasks/install-deps/suse/main.yml | 2 +- .../krb5/tasks/install-deps/suse/main.yml | 3 +- .../ktls/tasks/install-deps/suse/main.yml | 4 +- .../tasks/install-deps/suse/main.yml | 2 +- .../nfsd/tasks/install-deps/debian/main.yml | 36 ---------------- .../nfsd/tasks/install-deps/redhat/main.yml | 33 --------------- .../nfsd/tasks/install-deps/suse/main.yml | 34 --------------- playbooks/roles/nfsd/tasks/main.yml | 42 +++++++++++++++---- playbooks/roles/nfsd/vars/Debian.yml | 3 ++ playbooks/roles/nfsd/vars/RedHat.yml | 2 + playbooks/roles/nfsd/vars/Suse.yml | 4 ++ .../pynfs/tasks/install-deps/suse/main.yml | 2 +- .../tasks/install-deps/suse/main.yml | 2 +- 28 files changed, 102 insertions(+), 196 deletions(-)
Quoted 9 lines
delete mode 100644
playbooks/roles/nfsd/tasks/install-deps/debian/main.ymldelete mode 100644playbooks/roles/nfsd/tasks/install-deps/redhat/main.ymldelete mode 100644playbooks/roles/nfsd/tasks/install-deps/suse/main.ymlbase-commit:
9f538b3b87d15eebf60ead16c666ab7e433a5075Signature · 1 line
2.44.0
I've merged the individual patches in this series that made only straightforward substitutions of "package" for "zypper" because that step forward seems relatively harmless.
The more complicated replacements that remain are:
+ bootlinux-install-deps
+ cxl-install-deps
+ devconfig-install-deps
+ kotd-rev-kernel-install-deps
+ install_vagrant-install-deps
+ krb5-install-deps
Quoted 1 line
nfsd-install-deps
I've pushed this to the replace-zypper-module branch in:
https://github.com/chucklever/kdevops/tree/main
--
Chuck Lever