All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/22] Replace community.general.zypper
@ 2024-04-12 17:46 cel
  2024-04-12 17:46 ` [RFC PATCH 01/22] blktests: Replace the use of community.general.zypper cel
                   ` (23 more replies)
  0 siblings, 24 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

mcgrof@kernel.org reports:
> 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
-- 
2.44.0


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [RFC PATCH 01/22] blktests: Replace the use of community.general.zypper
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 17:46 ` [RFC PATCH 02/22] bootlinux: Replace the use of the community.general.zypper module cel
                   ` (22 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 .../blktests/tasks/install-deps/suse/main.yml | 27 ++++++-------------
 1 file changed, 8 insertions(+), 19 deletions(-)

diff --git a/playbooks/roles/blktests/tasks/install-deps/suse/main.yml b/playbooks/roles/blktests/tasks/install-deps/suse/main.yml
index 876c9761562e..22c92539bfba 100644
--- a/playbooks/roles/blktests/tasks/install-deps/suse/main.yml
+++ b/playbooks/roles/blktests/tasks/install-deps/suse/main.yml
@@ -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
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 02/22] bootlinux: Replace the use of the community.general.zypper module
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
  2024-04-12 17:46 ` [RFC PATCH 01/22] blktests: Replace the use of community.general.zypper cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 17:46 ` [RFC PATCH 03/22] btrfs_progs: " cel
                   ` (21 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

The lack of a disable_recommends parameter might be a problem.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 playbooks/roles/bootlinux/tasks/install-deps/suse/main.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/playbooks/roles/bootlinux/tasks/install-deps/suse/main.yml b/playbooks/roles/bootlinux/tasks/install-deps/suse/main.yml
index 559da7bf2dde..d3c02fb34193 100644
--- a/playbooks/roles/bootlinux/tasks/install-deps/suse/main.yml
+++ b/playbooks/roles/bootlinux/tasks/install-deps/suse/main.yml
@@ -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
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 03/22] btrfs_progs: Replace the use of the community.general.zypper module
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
  2024-04-12 17:46 ` [RFC PATCH 01/22] blktests: Replace the use of community.general.zypper cel
  2024-04-12 17:46 ` [RFC PATCH 02/22] bootlinux: Replace the use of the community.general.zypper module cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 17:46 ` [RFC PATCH 04/22] build-qemu: " cel
                   ` (20 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

And correct a copy-and-paste error.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 playbooks/roles/btrfs_progs/tasks/install-deps/suse/main.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/playbooks/roles/btrfs_progs/tasks/install-deps/suse/main.yml b/playbooks/roles/btrfs_progs/tasks/install-deps/suse/main.yml
index 4fe2a4806266..ae230b88d277 100644
--- a/playbooks/roles/btrfs_progs/tasks/install-deps/suse/main.yml
+++ b/playbooks/roles/btrfs_progs/tasks/install-deps/suse/main.yml
@@ -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
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 04/22] build-qemu: Replace the use of the community.general.zypper module
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
                   ` (2 preceding siblings ...)
  2024-04-12 17:46 ` [RFC PATCH 03/22] btrfs_progs: " cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 17:46 ` [RFC PATCH 05/22] create_partition: " cel
                   ` (19 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 playbooks/roles/build_qemu/tasks/install-deps/suse/main.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/playbooks/roles/build_qemu/tasks/install-deps/suse/main.yml b/playbooks/roles/build_qemu/tasks/install-deps/suse/main.yml
index c96ada98594d..e9ff529b8ba3 100644
--- a/playbooks/roles/build_qemu/tasks/install-deps/suse/main.yml
+++ b/playbooks/roles/build_qemu/tasks/install-deps/suse/main.yml
@@ -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
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 05/22] create_partition: Replace the use of the community.general.zypper module
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
                   ` (3 preceding siblings ...)
  2024-04-12 17:46 ` [RFC PATCH 04/22] build-qemu: " cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 17:46 ` [RFC PATCH 06/22] cxl: " cel
                   ` (18 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 .../roles/create_partition/tasks/install-deps/suse/main.yml     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/playbooks/roles/create_partition/tasks/install-deps/suse/main.yml b/playbooks/roles/create_partition/tasks/install-deps/suse/main.yml
index 55518c5f44fd..a616712e1a38 100644
--- a/playbooks/roles/create_partition/tasks/install-deps/suse/main.yml
+++ b/playbooks/roles/create_partition/tasks/install-deps/suse/main.yml
@@ -55,7 +55,7 @@
 - name: Install partition creation base tools
   become: yes
   become_method: sudo
-  zypper:
+  ansible.builtin.package:
     name:
       - xfsprogs
       - e2fsprogs
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 06/22] cxl: Replace the use of the community.general.zypper module
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
                   ` (4 preceding siblings ...)
  2024-04-12 17:46 ` [RFC PATCH 05/22] create_partition: " cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 17:46 ` [RFC PATCH 07/22] devconfig: " cel
                   ` (17 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

The lack of the replacefiles parameter might be a problem.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 playbooks/roles/cxl/tasks/install-deps/suse/main.yml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/playbooks/roles/cxl/tasks/install-deps/suse/main.yml b/playbooks/roles/cxl/tasks/install-deps/suse/main.yml
index 50eb51bf13a0..b80662235a2a 100644
--- a/playbooks/roles/cxl/tasks/install-deps/suse/main.yml
+++ b/playbooks/roles/cxl/tasks/install-deps/suse/main.yml
@@ -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
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 07/22] devconfig: Replace the use of the community.general.zypper module
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
                   ` (5 preceding siblings ...)
  2024-04-12 17:46 ` [RFC PATCH 06/22] cxl: " cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 17:46 ` [RFC PATCH 08/22] kotd-rev-kernel: " cel
                   ` (16 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 .../tasks/install-deps/suse/main.yml          | 31 ++++++++++---------
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/playbooks/roles/devconfig/tasks/install-deps/suse/main.yml b/playbooks/roles/devconfig/tasks/install-deps/suse/main.yml
index 5c7233709463..60ddf5b4f128 100644
--- a/playbooks/roles/devconfig/tasks/install-deps/suse/main.yml
+++ b/playbooks/roles/devconfig/tasks/install-deps/suse/main.yml
@@ -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
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 08/22] kotd-rev-kernel: Replace the use of the community.general.zypper module
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
                   ` (6 preceding siblings ...)
  2024-04-12 17:46 ` [RFC PATCH 07/22] devconfig: " cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 17:46 ` [RFC PATCH 09/22] fstests: " cel
                   ` (15 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

The lack of the allow_vendor_change, disable_recommends,
force_resolution, and force parameters might be a problem.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 .../roles/devconfig/tasks/kotd-rev-kernel/suse/main.yml     | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/playbooks/roles/devconfig/tasks/kotd-rev-kernel/suse/main.yml b/playbooks/roles/devconfig/tasks/kotd-rev-kernel/suse/main.yml
index a0c78d974dfe..f73939f166ed 100644
--- a/playbooks/roles/devconfig/tasks/kotd-rev-kernel/suse/main.yml
+++ b/playbooks/roles/devconfig/tasks/kotd-rev-kernel/suse/main.yml
@@ -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' ]
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 09/22] fstests: Replace the use of the community.general.zypper module
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
                   ` (7 preceding siblings ...)
  2024-04-12 17:46 ` [RFC PATCH 08/22] kotd-rev-kernel: " cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 17:46 ` [RFC PATCH 10/22] fstests_prep_localhost: Replace the use of the community.general zypper module cel
                   ` (14 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 .../fstests/tasks/install-deps/suse/main.yml  | 27 ++++++-------------
 1 file changed, 8 insertions(+), 19 deletions(-)

diff --git a/playbooks/roles/fstests/tasks/install-deps/suse/main.yml b/playbooks/roles/fstests/tasks/install-deps/suse/main.yml
index 951dfc66fb6c..892f32465c0a 100644
--- a/playbooks/roles/fstests/tasks/install-deps/suse/main.yml
+++ b/playbooks/roles/fstests/tasks/install-deps/suse/main.yml
@@ -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
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 10/22] fstests_prep_localhost: Replace the use of the community.general zypper module
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
                   ` (8 preceding siblings ...)
  2024-04-12 17:46 ` [RFC PATCH 09/22] fstests: " cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 17:46 ` [RFC PATCH 11/22] install-menuconfig-deps: Replace the use of the community.general.zypper module cel
                   ` (13 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 .../fstests_prep_localhost/tasks/install-deps/suse/main.yml     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/playbooks/roles/fstests_prep_localhost/tasks/install-deps/suse/main.yml b/playbooks/roles/fstests_prep_localhost/tasks/install-deps/suse/main.yml
index 83e5d2598eb8..a180dd92f7ec 100644
--- a/playbooks/roles/fstests_prep_localhost/tasks/install-deps/suse/main.yml
+++ b/playbooks/roles/fstests_prep_localhost/tasks/install-deps/suse/main.yml
@@ -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
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 11/22] install-menuconfig-deps: Replace the use of the community.general.zypper module
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
                   ` (9 preceding siblings ...)
  2024-04-12 17:46 ` [RFC PATCH 10/22] fstests_prep_localhost: Replace the use of the community.general zypper module cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 17:46 ` [RFC PATCH 12/22] install_systemd_journal: " cel
                   ` (12 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 .../install-menuconfig-deps/tasks/install-deps/suse/main.yml   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/playbooks/roles/install-menuconfig-deps/tasks/install-deps/suse/main.yml b/playbooks/roles/install-menuconfig-deps/tasks/install-deps/suse/main.yml
index 701c27c14194..63d44395f7df 100644
--- a/playbooks/roles/install-menuconfig-deps/tasks/install-deps/suse/main.yml
+++ b/playbooks/roles/install-menuconfig-deps/tasks/install-deps/suse/main.yml
@@ -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
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 12/22] install_systemd_journal: Replace the use of the community.general.zypper module
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
                   ` (10 preceding siblings ...)
  2024-04-12 17:46 ` [RFC PATCH 11/22] install-menuconfig-deps: Replace the use of the community.general.zypper module cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 17:46 ` [RFC PATCH 13/22] install_systemd_timesyncd: " cel
                   ` (11 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 .../tasks/install-deps/suse/main.yml                           | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/playbooks/roles/install_systemd_journal_remote/tasks/install-deps/suse/main.yml b/playbooks/roles/install_systemd_journal_remote/tasks/install-deps/suse/main.yml
index 3cfcb1e6daa8..198dad7bebf4 100644
--- a/playbooks/roles/install_systemd_journal_remote/tasks/install-deps/suse/main.yml
+++ b/playbooks/roles/install_systemd_journal_remote/tasks/install-deps/suse/main.yml
@@ -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
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 13/22] install_systemd_timesyncd: Replace the use of the community.general.zypper module
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
                   ` (11 preceding siblings ...)
  2024-04-12 17:46 ` [RFC PATCH 12/22] install_systemd_journal: " cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 17:46 ` [RFC PATCH 14/22] install_terraform: " cel
                   ` (10 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 .../install_systemd_timesyncd/tasks/install-deps/suse/main.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/playbooks/roles/install_systemd_timesyncd/tasks/install-deps/suse/main.yml b/playbooks/roles/install_systemd_timesyncd/tasks/install-deps/suse/main.yml
index b2baf8e05c9e..6559d5f5d4c0 100644
--- a/playbooks/roles/install_systemd_timesyncd/tasks/install-deps/suse/main.yml
+++ b/playbooks/roles/install_systemd_timesyncd/tasks/install-deps/suse/main.yml
@@ -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
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 14/22] install_terraform: Replace the use of the community.general.zypper module
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
                   ` (12 preceding siblings ...)
  2024-04-12 17:46 ` [RFC PATCH 13/22] install_systemd_timesyncd: " cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 17:46 ` [RFC PATCH 15/22] install_vagrant: " cel
                   ` (9 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 .../roles/install_terraform/tasks/install-deps/suse/main.yml   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/playbooks/roles/install_terraform/tasks/install-deps/suse/main.yml b/playbooks/roles/install_terraform/tasks/install-deps/suse/main.yml
index 374dd4c6cfd2..0b24a06aec5c 100644
--- a/playbooks/roles/install_terraform/tasks/install-deps/suse/main.yml
+++ b/playbooks/roles/install_terraform/tasks/install-deps/suse/main.yml
@@ -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
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 15/22] install_vagrant: Replace the use of the community.general.zypper module
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
                   ` (13 preceding siblings ...)
  2024-04-12 17:46 ` [RFC PATCH 14/22] install_terraform: " cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 17:46 ` [RFC PATCH 16/22] kdc: " cel
                   ` (8 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

The lack of allow-vendor-change and disable_recommends arguments
might be a problem.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 .../install_vagrant/tasks/install-deps/suse/main.yml      | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/playbooks/roles/install_vagrant/tasks/install-deps/suse/main.yml b/playbooks/roles/install_vagrant/tasks/install-deps/suse/main.yml
index 87e228d485c3..a13928e3db70 100644
--- a/playbooks/roles/install_vagrant/tasks/install-deps/suse/main.yml
+++ b/playbooks/roles/install_vagrant/tasks/install-deps/suse/main.yml
@@ -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
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 16/22] kdc: Replace the use of the community.general.zypper module
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
                   ` (14 preceding siblings ...)
  2024-04-12 17:46 ` [RFC PATCH 15/22] install_vagrant: " cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 17:46 ` [RFC PATCH 17/22] krb5: " cel
                   ` (7 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 playbooks/roles/kdc/tasks/install-deps/suse/main.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/playbooks/roles/kdc/tasks/install-deps/suse/main.yml b/playbooks/roles/kdc/tasks/install-deps/suse/main.yml
index d0fd019f90b5..c063563a9444 100644
--- a/playbooks/roles/kdc/tasks/install-deps/suse/main.yml
+++ b/playbooks/roles/kdc/tasks/install-deps/suse/main.yml
@@ -2,7 +2,7 @@
 - name: Install kdc dependencies
   become: yes
   become_method: sudo
-  zypper:
+  ansible.builtin.package:
     name:
       - krb5
       - krb5-client
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 17/22] krb5: Replace the use of the community.general.zypper module
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
                   ` (15 preceding siblings ...)
  2024-04-12 17:46 ` [RFC PATCH 16/22] kdc: " cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 17:46 ` [RFC PATCH 18/22] ktls: " cel
                   ` (6 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

The lack of a force_resolution parameter might be a problem.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 playbooks/roles/krb5/tasks/install-deps/suse/main.yml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/playbooks/roles/krb5/tasks/install-deps/suse/main.yml b/playbooks/roles/krb5/tasks/install-deps/suse/main.yml
index b01ac53293d3..cb7f16257436 100644
--- a/playbooks/roles/krb5/tasks/install-deps/suse/main.yml
+++ b/playbooks/roles/krb5/tasks/install-deps/suse/main.yml
@@ -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
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 18/22] ktls: Replace the use of the community.general.zypper module
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
                   ` (16 preceding siblings ...)
  2024-04-12 17:46 ` [RFC PATCH 17/22] krb5: " cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 17:46 ` [RFC PATCH 19/22] libvirt_user: " cel
                   ` (5 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 playbooks/roles/ktls/tasks/install-deps/suse/main.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/playbooks/roles/ktls/tasks/install-deps/suse/main.yml b/playbooks/roles/ktls/tasks/install-deps/suse/main.yml
index ce5935154038..9b89cf8244fe 100644
--- a/playbooks/roles/ktls/tasks/install-deps/suse/main.yml
+++ b/playbooks/roles/ktls/tasks/install-deps/suse/main.yml
@@ -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
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 19/22] libvirt_user: Replace the use of the community.general.zypper module
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
                   ` (17 preceding siblings ...)
  2024-04-12 17:46 ` [RFC PATCH 18/22] ktls: " cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 17:46 ` [RFC PATCH 20/22] nfsd: " cel
                   ` (4 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 playbooks/roles/libvirt_user/tasks/install-deps/suse/main.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/playbooks/roles/libvirt_user/tasks/install-deps/suse/main.yml b/playbooks/roles/libvirt_user/tasks/install-deps/suse/main.yml
index 69d62e7b0ad3..82b3d619374b 100644
--- a/playbooks/roles/libvirt_user/tasks/install-deps/suse/main.yml
+++ b/playbooks/roles/libvirt_user/tasks/install-deps/suse/main.yml
@@ -2,7 +2,7 @@
 - name: Install libvirt / kvm dependencies
   become: yes
   become_method: sudo
-  zypper:
+  ansible.builtin.package:
     name:
       - libvirt
       - libvirt-daemon
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 20/22] nfsd: Replace the use of the community.general.zypper module
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
                   ` (18 preceding siblings ...)
  2024-04-12 17:46 ` [RFC PATCH 19/22] libvirt_user: " cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 17:46 ` [RFC PATCH 21/22] pynfs: " cel
                   ` (3 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

Also de-duplicate the logic that builds the nfsd_packages list.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 .../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

diff --git a/playbooks/roles/nfsd/tasks/install-deps/debian/main.yml b/playbooks/roles/nfsd/tasks/install-deps/debian/main.yml
deleted file mode 100644
index 2a2b7899055a..000000000000
--- a/playbooks/roles/nfsd/tasks/install-deps/debian/main.yml
+++ /dev/null
@@ -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' ]
diff --git a/playbooks/roles/nfsd/tasks/install-deps/redhat/main.yml b/playbooks/roles/nfsd/tasks/install-deps/redhat/main.yml
deleted file mode 100644
index d5d25c205f6e..000000000000
--- a/playbooks/roles/nfsd/tasks/install-deps/redhat/main.yml
+++ /dev/null
@@ -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
diff --git a/playbooks/roles/nfsd/tasks/install-deps/suse/main.yml b/playbooks/roles/nfsd/tasks/install-deps/suse/main.yml
deleted file mode 100644
index 5bda13c9e605..000000000000
--- a/playbooks/roles/nfsd/tasks/install-deps/suse/main.yml
+++ /dev/null
@@ -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
diff --git a/playbooks/roles/nfsd/tasks/main.yml b/playbooks/roles/nfsd/tasks/main.yml
index fe5f6919864d..3118b72c88dd 100644
--- a/playbooks/roles/nfsd/tasks/main.yml
+++ b/playbooks/roles/nfsd/tasks/main.yml
@@ -1,15 +1,39 @@
 ---
-- name: Debian-specific setup
-  ansible.builtin.include_tasks: roles/nfsd/tasks/install-deps/debian/main.yml
-  when: ansible_os_family == 'Debian'
+- name: Set 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'
+  tags: vars
 
-- name: SuSE-specific setup
-  ansible.builtin.include_tasks: roles/nfsd/tasks/install-deps/suse/main.yml
-  when: ansible_os_family == 'Suse'
+- name: Determine the fsprogs package needed for "{{ nfsd_export_fstype }}"
+  ansible.builtin.set_fact:
+    fsprogs: "{{ fstype_userspace_progs[nfsd_export_fstype] | default() }}"
 
-- name: Red Hat-specific setup
-  ansible.builtin.include_tasks: roles/nfsd/tasks/install-deps/redhat/main.yml
-  when: ansible_os_family == 'RedHat'
+- name: Add fsprogs dependencies to the nfsd_packages list
+  ansible.builtin.set_fact:
+    nfsd_packages: "{{ nfsd_packages + [fsprogs] }}"
+  when:
+    - fsprogs is defined
+    - fsprogs
+
+- name: Add krb5 dependencies to the nfsd packages list
+  ansible.builtin.set_fact:
+    nfsd_packages: "{{ nfsd_packages + krb5_packages }}"
+  when: kdevops_krb5_enable|bool
+
+- name: Install dependencies for nfsd
+  become: true
+  become_flags: 'su - -c'
+  become_method: ansible.builtin.sudo
+  ansible.builtin.package:
+    name: "{{ nfsd_packages }}"
+    state: present
 
 - name: Generate /etc/nfs.conf
   become: yes
diff --git a/playbooks/roles/nfsd/vars/Debian.yml b/playbooks/roles/nfsd/vars/Debian.yml
index d8aa50bcdd9b..59351e762cfd 100644
--- a/playbooks/roles/nfsd/vars/Debian.yml
+++ b/playbooks/roles/nfsd/vars/Debian.yml
@@ -5,6 +5,9 @@ nfsd_packages:
   - nfs-kernel-server
   - policycoreutils
 
+krb5_packages:
+  - gssproxy
+
 fstype_userspace_progs:
   btrfs: btrfs-progs
   ext4: e2fsprogs
diff --git a/playbooks/roles/nfsd/vars/RedHat.yml b/playbooks/roles/nfsd/vars/RedHat.yml
index 091c827c777d..c66c9168786a 100644
--- a/playbooks/roles/nfsd/vars/RedHat.yml
+++ b/playbooks/roles/nfsd/vars/RedHat.yml
@@ -6,6 +6,8 @@ nfsd_packages:
   - policycoreutils
   - python3-policycoreutils
 
+krb5_packages: []
+
 fstype_userspace_progs:
   btrfs: btrfs-progs
   ext4: e2fsprogs
diff --git a/playbooks/roles/nfsd/vars/Suse.yml b/playbooks/roles/nfsd/vars/Suse.yml
index 786e5f81ece5..c28f97d6a0c0 100644
--- a/playbooks/roles/nfsd/vars/Suse.yml
+++ b/playbooks/roles/nfsd/vars/Suse.yml
@@ -4,6 +4,10 @@ nfsd_packages:
   - nfs-utils
   - policycoreutils
 
+krb5_packages:
+  - gssproxy
+  - libverto-libev1
+
 fstype_userspace_progs:
   btrfs: btrfsprogs
   ext4: e2fsprogs
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 21/22] pynfs: Replace the use of the community.general.zypper module
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
                   ` (19 preceding siblings ...)
  2024-04-12 17:46 ` [RFC PATCH 20/22] nfsd: " cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 17:46 ` [RFC PATCH 22/22] selftests: " cel
                   ` (2 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 playbooks/roles/pynfs/tasks/install-deps/suse/main.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/playbooks/roles/pynfs/tasks/install-deps/suse/main.yml b/playbooks/roles/pynfs/tasks/install-deps/suse/main.yml
index b62bbcc07c4d..657dd7e0e170 100644
--- a/playbooks/roles/pynfs/tasks/install-deps/suse/main.yml
+++ b/playbooks/roles/pynfs/tasks/install-deps/suse/main.yml
@@ -2,7 +2,7 @@
 - name: Install build dependencies for pynfs
   become: yes
   become_method: sudo
-  zypper:
+  ansible.builtin.package:
     name:
       - gcc
       - git-core
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 22/22] selftests: Replace the use of the community.general.zypper module
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
                   ` (20 preceding siblings ...)
  2024-04-12 17:46 ` [RFC PATCH 21/22] pynfs: " cel
@ 2024-04-12 17:46 ` cel
  2024-04-12 18:30 ` [RFC PATCH 00/22] Replace community.general.zypper Luis Chamberlain
  2024-04-17 16:50 ` Chuck Lever III
  23 siblings, 0 replies; 36+ messages in thread
From: cel @ 2024-04-12 17:46 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 playbooks/roles/selftests/tasks/install-deps/suse/main.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/playbooks/roles/selftests/tasks/install-deps/suse/main.yml b/playbooks/roles/selftests/tasks/install-deps/suse/main.yml
index 57e8ee365d87..35971c09f7e6 100644
--- a/playbooks/roles/selftests/tasks/install-deps/suse/main.yml
+++ b/playbooks/roles/selftests/tasks/install-deps/suse/main.yml
@@ -44,7 +44,7 @@
 - name: Install every single selftest build dependencies
   become: yes
   become_method: sudo
-  zypper:
+  ansible.builtin.package:
     name:
       - git-core
       - gcc
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 00/22] Replace community.general.zypper
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
                   ` (21 preceding siblings ...)
  2024-04-12 17:46 ` [RFC PATCH 22/22] selftests: " cel
@ 2024-04-12 18:30 ` Luis Chamberlain
  2024-04-15 14:39   ` Chuck Lever III
  2024-04-17 16:50 ` Chuck Lever III
  23 siblings, 1 reply; 36+ messages in thread
From: Luis Chamberlain @ 2024-04-12 18:30 UTC (permalink / raw)
  To: cel, Goldwyn Rodrigues, Anthony Iliopoulos; +Cc: kdevops, Chuck Lever

Goldwyn, Anthony,

anyone on your end willing to review this?

 Luis

On Fri, Apr 12, 2024 at 01:46:33PM -0400, cel@kernel.org wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
> 
> mcgrof@kernel.org reports:
> > 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
> -- 
> 2.44.0
> 
> 

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 00/22] Replace community.general.zypper
  2024-04-12 18:30 ` [RFC PATCH 00/22] Replace community.general.zypper Luis Chamberlain
@ 2024-04-15 14:39   ` Chuck Lever III
  2024-04-15 20:32     ` Goldwyn Rodrigues
  0 siblings, 1 reply; 36+ messages in thread
From: Chuck Lever III @ 2024-04-15 14:39 UTC (permalink / raw)
  To: Luis Chamberlain
  Cc: Chuck Lever, Goldwyn Rodrigues, Anthony Iliopoulos, kdevops

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.


> On Apr 12, 2024, at 2:30 PM, Luis Chamberlain <mcgrof@kernel.org> wrote:
> 
> Goldwyn, Anthony,
> 
> anyone on your end willing to review this?
> 
> Luis
> 
> On Fri, Apr 12, 2024 at 01:46:33PM -0400, cel@kernel.org wrote:
>> From: Chuck Lever <chuck.lever@oracle.com>
>> 
>> mcgrof@kernel.org reports:
>>> 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
>> -- 
>> 2.44.0
>> 
>> 

--
Chuck Lever



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 00/22] Replace community.general.zypper
  2024-04-15 14:39   ` Chuck Lever III
@ 2024-04-15 20:32     ` Goldwyn Rodrigues
  2024-04-15 21:11       ` Chuck Lever
  0 siblings, 1 reply; 36+ messages in thread
From: Goldwyn Rodrigues @ 2024-04-15 20:32 UTC (permalink / raw)
  To: Chuck Lever III
  Cc: Luis Chamberlain, Chuck Lever, Anthony Iliopoulos, kdevops

On Mon, Apr 15, 2024 at 9:39 AM Chuck Lever III <chuck.lever@oracle.com> wrote:
>
> 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).

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.


>
> 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.
>
-- 
Goldwyn

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 00/22] Replace community.general.zypper
  2024-04-15 20:32     ` Goldwyn Rodrigues
@ 2024-04-15 21:11       ` Chuck Lever
  2024-04-15 21:35         ` Goldwyn Rodrigues
  0 siblings, 1 reply; 36+ messages in thread
From: Chuck Lever @ 2024-04-15 21:11 UTC (permalink / raw)
  To: Goldwyn Rodrigues
  Cc: Luis Chamberlain, Chuck Lever, Anthony Iliopoulos, kdevops

On Mon, Apr 15, 2024 at 03:32:59PM -0500, Goldwyn Rodrigues wrote:
> On Mon, Apr 15, 2024 at 9:39 AM Chuck Lever III <chuck.lever@oracle.com> wrote:
> >
> > 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).
> 
> 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.


> 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.

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...?


-- 
Chuck Lever

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 00/22] Replace community.general.zypper
  2024-04-15 21:11       ` Chuck Lever
@ 2024-04-15 21:35         ` Goldwyn Rodrigues
  2024-04-15 21:41           ` Chuck Lever III
  0 siblings, 1 reply; 36+ messages in thread
From: Goldwyn Rodrigues @ 2024-04-15 21:35 UTC (permalink / raw)
  To: Chuck Lever; +Cc: Luis Chamberlain, Chuck Lever, Anthony Iliopoulos, kdevops

On Mon, Apr 15, 2024 at 4:11 PM Chuck Lever <chuck.lever@oracle.com> wrote:
>
> On Mon, Apr 15, 2024 at 03:32:59PM -0500, Goldwyn Rodrigues wrote:
> > On Mon, Apr 15, 2024 at 9:39 AM Chuck Lever III <chuck.lever@oracle.com> wrote:
> > >
> > > 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).
> >
> > 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

>
>
> > 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.
>
> 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.

-- 
Goldwyn

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 00/22] Replace community.general.zypper
  2024-04-15 21:35         ` Goldwyn Rodrigues
@ 2024-04-15 21:41           ` Chuck Lever III
  2024-04-15 22:38             ` Anthony Iliopoulos
  0 siblings, 1 reply; 36+ messages in thread
From: Chuck Lever III @ 2024-04-15 21:41 UTC (permalink / raw)
  To: Goldwyn Rodrigues
  Cc: Luis Chamberlain, Chuck Lever, Anthony Iliopoulos, kdevops



> On Apr 15, 2024, at 5:35 PM, Goldwyn Rodrigues <rgoldwyn@suse.com> wrote:
> 
> On Mon, Apr 15, 2024 at 4:11 PM Chuck Lever <chuck.lever@oracle.com> wrote:
>> 
>> On Mon, Apr 15, 2024 at 03:32:59PM -0500, Goldwyn Rodrigues wrote:
>>> On Mon, Apr 15, 2024 at 9:39 AM Chuck Lever III <chuck.lever@oracle.com> wrote:
>>>> 
>>>> 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).
>>> 
>>> 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?

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:~ #


> 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.


>>> 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.
>> 
>> 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



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 00/22] Replace community.general.zypper
  2024-04-15 21:41           ` Chuck Lever III
@ 2024-04-15 22:38             ` Anthony Iliopoulos
  2024-04-17 16:57               ` Chuck Lever III
  0 siblings, 1 reply; 36+ messages in thread
From: Anthony Iliopoulos @ 2024-04-15 22:38 UTC (permalink / raw)
  To: Chuck Lever III; +Cc: Goldwyn Rodrigues, Luis Chamberlain, Chuck Lever, kdevops

On Mon, Apr 15, 2024 at 09:41:38PM +0000, Chuck Lever III wrote:
> 
> 
> > On Apr 15, 2024, at 5:35 PM, Goldwyn Rodrigues <rgoldwyn@suse.com> wrote:
> > 
> > On Mon, Apr 15, 2024 at 4:11 PM Chuck Lever <chuck.lever@oracle.com> wrote:
> >> 
> >> On Mon, Apr 15, 2024 at 03:32:59PM -0500, Goldwyn Rodrigues wrote:
> >>> On Mon, Apr 15, 2024 at 9:39 AM Chuck Lever III <chuck.lever@oracle.com> wrote:
> >>>> 
> >>>> 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).
> >>> 
> >>> 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?
> 
> 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:~ #

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

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 00/22] Replace community.general.zypper
  2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
                   ` (22 preceding siblings ...)
  2024-04-12 18:30 ` [RFC PATCH 00/22] Replace community.general.zypper Luis Chamberlain
@ 2024-04-17 16:50 ` Chuck Lever III
  23 siblings, 0 replies; 36+ messages in thread
From: Chuck Lever III @ 2024-04-17 16:50 UTC (permalink / raw)
  To: Chuck Lever; +Cc: kdevops



> On Apr 12, 2024, at 1:46 PM, cel@kernel.org wrote:
> 
> From: Chuck Lever <chuck.lever@oracle.com>
> 
> mcgrof@kernel.org reports:
>> 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
> -- 
> 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
> nfsd-install-deps

I've pushed this to the replace-zypper-module branch in:

https://github.com/chucklever/kdevops/tree/main


--
Chuck Lever



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 00/22] Replace community.general.zypper
  2024-04-15 22:38             ` Anthony Iliopoulos
@ 2024-04-17 16:57               ` Chuck Lever III
  2024-04-17 18:39                 ` Anthony Iliopoulos
  0 siblings, 1 reply; 36+ messages in thread
From: Chuck Lever III @ 2024-04-17 16:57 UTC (permalink / raw)
  To: Anthony Iliopoulos, Luis Chamberlain
  Cc: Goldwyn Rodrigues, Chuck Lever, kdevops



> On Apr 15, 2024, at 6:38 PM, Anthony Iliopoulos <ailiop@suse.com> wrote:
> 
> On Mon, Apr 15, 2024 at 09:41:38PM +0000, Chuck Lever III wrote:
>> 
>> 
>>> On Apr 15, 2024, at 5:35 PM, Goldwyn Rodrigues <rgoldwyn@suse.com> wrote:
>>> 
>>> On Mon, Apr 15, 2024 at 4:11 PM Chuck Lever <chuck.lever@oracle.com> wrote:
>>>> 
>>>> On Mon, Apr 15, 2024 at 03:32:59PM -0500, Goldwyn Rodrigues wrote:
>>>>> On Mon, Apr 15, 2024 at 9:39 AM Chuck Lever III <chuck.lever@oracle.com> wrote:
>>>>>> 
>>>>>> 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).
>>>>> 
>>>>> 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?
>> 
>> 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:~ #
> 
> 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



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 00/22] Replace community.general.zypper
  2024-04-17 16:57               ` Chuck Lever III
@ 2024-04-17 18:39                 ` Anthony Iliopoulos
  2024-04-17 18:48                     ` Chuck Lever III
  0 siblings, 1 reply; 36+ messages in thread
From: Anthony Iliopoulos @ 2024-04-17 18:39 UTC (permalink / raw)
  To: Chuck Lever III; +Cc: Luis Chamberlain, Goldwyn Rodrigues, Chuck Lever, kdevops

On Wed, Apr 17, 2024 at 04:57:23PM +0000, Chuck Lever III wrote:
> 
> 
> > On Apr 15, 2024, at 6:38 PM, Anthony Iliopoulos <ailiop@suse.com> wrote:
> > 
> > On Mon, Apr 15, 2024 at 09:41:38PM +0000, Chuck Lever III wrote:
> >> 
> >> 
> >>> On Apr 15, 2024, at 5:35 PM, Goldwyn Rodrigues <rgoldwyn@suse.com> wrote:
> >>> 
> >>> On Mon, Apr 15, 2024 at 4:11 PM Chuck Lever <chuck.lever@oracle.com> wrote:
> >>>> 
> >>>> On Mon, Apr 15, 2024 at 03:32:59PM -0500, Goldwyn Rodrigues wrote:
> >>>>> On Mon, Apr 15, 2024 at 9:39 AM Chuck Lever III <chuck.lever@oracle.com> wrote:
> >>>>>> 
> >>>>>> 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).
> >>>>> 
> >>>>> 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?
> >> 
> >> 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:~ #
> > 
> > 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.

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:

diff --git a/playbooks/roles/fstests/tasks/main.yml b/playbooks/roles/fstests/tasks/main.yml
index 63531f618b4b..e4cc1fa9bfb6 100644
--- a/playbooks/roles/fstests/tasks/main.yml
+++ b/playbooks/roles/fstests/tasks/main.yml
@@ -872,6 +872,7 @@
   group:
     name: "{{ item }}"
     state: present
+  command: "useradd --badnames -U {{ item }}"
   with_items:
     - sys
     - 123456-fsgqa

> 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

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 00/22] Replace community.general.zypper
@ 2024-04-17 18:48                     ` Chuck Lever III
  0 siblings, 0 replies; 36+ messages in thread
From: Chuck Lever III @ 2024-04-17 18:48 UTC (permalink / raw)
  To: Anthony Iliopoulos
  Cc: Luis Chamberlain, Goldwyn Rodrigues, Chuck Lever, kdevops



> On Apr 17, 2024, at 2:39 PM, Anthony Iliopoulos <ailiop@suse.com> wrote:
> 
> On Wed, Apr 17, 2024 at 04:57:23PM +0000, Chuck Lever III wrote:
>> 
>> 
>>> On Apr 15, 2024, at 6:38 PM, Anthony Iliopoulos <ailiop@suse.com> wrote:
>>> 
>>> On Mon, Apr 15, 2024 at 09:41:38PM +0000, Chuck Lever III wrote:
>>>> 
>>>> 
>>>>> On Apr 15, 2024, at 5:35 PM, Goldwyn Rodrigues <rgoldwyn@suse.com> wrote:
>>>>> 
>>>>> On Mon, Apr 15, 2024 at 4:11 PM Chuck Lever <chuck.lever@oracle.com> wrote:
>>>>>> 
>>>>>> On Mon, Apr 15, 2024 at 03:32:59PM -0500, Goldwyn Rodrigues wrote:
>>>>>>> On Mon, Apr 15, 2024 at 9:39 AM Chuck Lever III <chuck.lever@oracle.com> wrote:
>>>>>>>> 
>>>>>>>> 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).
>>>>>>> 
>>>>>>> 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?
>>>> 
>>>> 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:~ #
>>> 
>>> 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.
> 
> 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:
> 
> diff --git a/playbooks/roles/fstests/tasks/main.yml b/playbooks/roles/fstests/tasks/main.yml
> index 63531f618b4b..e4cc1fa9bfb6 100644
> --- a/playbooks/roles/fstests/tasks/main.yml
> +++ b/playbooks/roles/fstests/tasks/main.yml
> @@ -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.


>   with_items:
>     - sys
>     - 123456-fsgqa
> 
>> 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.


> 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



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 00/22] Replace community.general.zypper
@ 2024-04-17 18:48                     ` Chuck Lever III
  0 siblings, 0 replies; 36+ messages in thread
From: Chuck Lever III @ 2024-04-17 18:48 UTC (permalink / raw)
  To: Anthony Iliopoulos
  Cc: Luis Chamberlain, Goldwyn Rodrigues, Chuck Lever, kdevops



> On Apr 17, 2024, at 2:39 PM, Anthony Iliopoulos <ailiop@suse.com> wrote:
> 
> On Wed, Apr 17, 2024 at 04:57:23PM +0000, Chuck Lever III wrote:
>> 
>> 
>>> On Apr 15, 2024, at 6:38 PM, Anthony Iliopoulos <ailiop@suse.com> wrote:
>>> 
>>> On Mon, Apr 15, 2024 at 09:41:38PM +0000, Chuck Lever III wrote:
>>>> 
>>>> 
>>>>> On Apr 15, 2024, at 5:35 PM, Goldwyn Rodrigues <rgoldwyn@suse.com> wrote:
>>>>> 
>>>>> On Mon, Apr 15, 2024 at 4:11 PM Chuck Lever <chuck.lever@oracle.com> wrote:
>>>>>> 
>>>>>> On Mon, Apr 15, 2024 at 03:32:59PM -0500, Goldwyn Rodrigues wrote:
>>>>>>> On Mon, Apr 15, 2024 at 9:39 AM Chuck Lever III <chuck.lever@oracle.com> wrote:
>>>>>>>> 
>>>>>>>> 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).
>>>>>>> 
>>>>>>> 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?
>>>> 
>>>> 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:~ #
>>> 
>>> 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.
> 
> 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:
> 
> diff --git a/playbooks/roles/fstests/tasks/main.yml b/playbooks/roles/fstests/tasks/main.yml
> index 63531f618b4b..e4cc1fa9bfb6 100644
> --- a/playbooks/roles/fstests/tasks/main.yml
> +++ b/playbooks/roles/fstests/tasks/main.yml
> @@ -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.


>   with_items:
>     - sys
>     - 123456-fsgqa
> 
>> 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.


> 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



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 00/22] Replace community.general.zypper
  2024-04-17 18:48                     ` Chuck Lever III
  (?)
@ 2024-04-17 19:12                     ` Anthony Iliopoulos
  -1 siblings, 0 replies; 36+ messages in thread
From: Anthony Iliopoulos @ 2024-04-17 19:12 UTC (permalink / raw)
  To: Chuck Lever III; +Cc: Luis Chamberlain, Goldwyn Rodrigues, Chuck Lever, kdevops

On Wed, Apr 17, 2024 at 06:48:01PM +0000, Chuck Lever III wrote:
> 
> 
> > On Apr 17, 2024, at 2:39 PM, Anthony Iliopoulos <ailiop@suse.com> wrote:
> > 
> > On Wed, Apr 17, 2024 at 04:57:23PM +0000, Chuck Lever III wrote:
> >> 
> >> 
> >>> On Apr 15, 2024, at 6:38 PM, Anthony Iliopoulos <ailiop@suse.com> wrote:
> >>> 
> >>> On Mon, Apr 15, 2024 at 09:41:38PM +0000, Chuck Lever III wrote:
> >>>> 
> >>>> 
> >>>>> On Apr 15, 2024, at 5:35 PM, Goldwyn Rodrigues <rgoldwyn@suse.com> wrote:
> >>>>> 
> >>>>> On Mon, Apr 15, 2024 at 4:11 PM Chuck Lever <chuck.lever@oracle.com> wrote:
> >>>>>> 
> >>>>>> On Mon, Apr 15, 2024 at 03:32:59PM -0500, Goldwyn Rodrigues wrote:
> >>>>>>> On Mon, Apr 15, 2024 at 9:39 AM Chuck Lever III <chuck.lever@oracle.com> wrote:
> >>>>>>>> 
> >>>>>>>> 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).
> >>>>>>> 
> >>>>>>> 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?
> >>>> 
> >>>> 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:~ #
> >>> 
> >>> 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.
> > 
> > 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:
> > 
> > diff --git a/playbooks/roles/fstests/tasks/main.yml b/playbooks/roles/fstests/tasks/main.yml
> > index 63531f618b4b..e4cc1fa9bfb6 100644
> > --- a/playbooks/roles/fstests/tasks/main.yml
> > +++ b/playbooks/roles/fstests/tasks/main.yml
> > @@ -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.

> >   with_items:
> >     - sys
> >     - 123456-fsgqa
> > 
> >> 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.

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

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2024-04-17 19:12 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-12 17:46 [RFC PATCH 00/22] Replace community.general.zypper cel
2024-04-12 17:46 ` [RFC PATCH 01/22] blktests: Replace the use of community.general.zypper cel
2024-04-12 17:46 ` [RFC PATCH 02/22] bootlinux: Replace the use of the community.general.zypper module cel
2024-04-12 17:46 ` [RFC PATCH 03/22] btrfs_progs: " cel
2024-04-12 17:46 ` [RFC PATCH 04/22] build-qemu: " cel
2024-04-12 17:46 ` [RFC PATCH 05/22] create_partition: " cel
2024-04-12 17:46 ` [RFC PATCH 06/22] cxl: " cel
2024-04-12 17:46 ` [RFC PATCH 07/22] devconfig: " cel
2024-04-12 17:46 ` [RFC PATCH 08/22] kotd-rev-kernel: " cel
2024-04-12 17:46 ` [RFC PATCH 09/22] fstests: " cel
2024-04-12 17:46 ` [RFC PATCH 10/22] fstests_prep_localhost: Replace the use of the community.general zypper module cel
2024-04-12 17:46 ` [RFC PATCH 11/22] install-menuconfig-deps: Replace the use of the community.general.zypper module cel
2024-04-12 17:46 ` [RFC PATCH 12/22] install_systemd_journal: " cel
2024-04-12 17:46 ` [RFC PATCH 13/22] install_systemd_timesyncd: " cel
2024-04-12 17:46 ` [RFC PATCH 14/22] install_terraform: " cel
2024-04-12 17:46 ` [RFC PATCH 15/22] install_vagrant: " cel
2024-04-12 17:46 ` [RFC PATCH 16/22] kdc: " cel
2024-04-12 17:46 ` [RFC PATCH 17/22] krb5: " cel
2024-04-12 17:46 ` [RFC PATCH 18/22] ktls: " cel
2024-04-12 17:46 ` [RFC PATCH 19/22] libvirt_user: " cel
2024-04-12 17:46 ` [RFC PATCH 20/22] nfsd: " cel
2024-04-12 17:46 ` [RFC PATCH 21/22] pynfs: " cel
2024-04-12 17:46 ` [RFC PATCH 22/22] selftests: " cel
2024-04-12 18:30 ` [RFC PATCH 00/22] Replace community.general.zypper Luis Chamberlain
2024-04-15 14:39   ` Chuck Lever III
2024-04-15 20:32     ` Goldwyn Rodrigues
2024-04-15 21:11       ` Chuck Lever
2024-04-15 21:35         ` Goldwyn Rodrigues
2024-04-15 21:41           ` Chuck Lever III
2024-04-15 22:38             ` Anthony Iliopoulos
2024-04-17 16:57               ` Chuck Lever III
2024-04-17 18:39                 ` Anthony Iliopoulos
2024-04-17 18:48                   ` Chuck Lever III
2024-04-17 18:48                     ` Chuck Lever III
2024-04-17 19:12                     ` Anthony Iliopoulos
2024-04-17 16:50 ` Chuck Lever III

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.