All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] fstests: Enable creation of group "123456-fsgqa" on Debian
@ 2024-04-17 19:46 cel
  2024-04-17 19:48 ` Chuck Lever III
  2024-04-19 17:49 ` Luis Chamberlain
  0 siblings, 2 replies; 4+ messages in thread
From: cel @ 2024-04-17 19:46 UTC (permalink / raw)
  To: kdevops; +Cc: ailiop, Chuck Lever

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

While testing fstests on Debian, I encountered:

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

Suggested-by: Anthony Iliopoulos <ailiop@suse.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 playbooks/roles/fstests/tasks/main.yml | 19 ++++++-------------
 1 file changed, 6 insertions(+), 13 deletions(-)

diff --git a/playbooks/roles/fstests/tasks/main.yml b/playbooks/roles/fstests/tasks/main.yml
index 63531f618b4b..b984ff589476 100644
--- a/playbooks/roles/fstests/tasks/main.yml
+++ b/playbooks/roles/fstests/tasks/main.yml
@@ -874,24 +874,15 @@
     state: present
   with_items:
     - sys
-    - 123456-fsgqa
-    - fsgqa
-    - fsgqa2
-    - daemon
-    - nobody
   loop_control:
-    label: "Ensuring the group {{ item }} exists"
+    label: "Ensuring that group {{ item }} exists"
 
-- name: Add missing users if not present
+- name: Add missing users for fstests
   tags: [ 'oscheck', 'fstests', 'install', 'root']
   become: yes
   become_flags: 'su - -c'
   become_method: sudo
-  user:
-    name: "{{ item }}"
-    state: present
-    home: "/home/{{ item }}"
-    group: "{{ item }}"
+  ansible.builtin.command: "useradd --badname -d /home/{{ item }} -U {{ item }}"
   with_items:
     - 123456-fsgqa
     - fsgqa
@@ -899,7 +890,9 @@
     - daemon
     - nobody
   loop_control:
-    label: "Ensuring the user {{ item }} exists"
+    label: "Ensuring that user and group {{ item }} exists"
+  register: useradd_result
+  failed_when: useradd_result.rc != 0 and useradd_result.rc != 9
 
 - name: Verify section name {{ fstests_section }} exists on fstests config file
   vars:

base-commit: 096d2295b30fd72192cec80a234bd2153103b0cd
-- 
2.44.0


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

* Re: [PATCH v1] fstests: Enable creation of group "123456-fsgqa" on Debian
  2024-04-17 19:46 [PATCH v1] fstests: Enable creation of group "123456-fsgqa" on Debian cel
@ 2024-04-17 19:48 ` Chuck Lever III
  2024-04-19 17:49 ` Luis Chamberlain
  1 sibling, 0 replies; 4+ messages in thread
From: Chuck Lever III @ 2024-04-17 19:48 UTC (permalink / raw)
  To: Chuck Lever; +Cc: kdevops, ailiop



> On Apr 17, 2024, at 3:46 PM, cel@kernel.org wrote:
> 
> From: Chuck Lever <chuck.lever@oracle.com>
> 
> While testing fstests on Debian, I encountered:

Whoops. ^Debian^SuSE


> 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
> 
> Suggested-by: Anthony Iliopoulos <ailiop@suse.com>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> playbooks/roles/fstests/tasks/main.yml | 19 ++++++-------------
> 1 file changed, 6 insertions(+), 13 deletions(-)
> 
> diff --git a/playbooks/roles/fstests/tasks/main.yml b/playbooks/roles/fstests/tasks/main.yml
> index 63531f618b4b..b984ff589476 100644
> --- a/playbooks/roles/fstests/tasks/main.yml
> +++ b/playbooks/roles/fstests/tasks/main.yml
> @@ -874,24 +874,15 @@
>     state: present
>   with_items:
>     - sys
> -    - 123456-fsgqa
> -    - fsgqa
> -    - fsgqa2
> -    - daemon
> -    - nobody
>   loop_control:
> -    label: "Ensuring the group {{ item }} exists"
> +    label: "Ensuring that group {{ item }} exists"
> 
> -- name: Add missing users if not present
> +- name: Add missing users for fstests
>   tags: [ 'oscheck', 'fstests', 'install', 'root']
>   become: yes
>   become_flags: 'su - -c'
>   become_method: sudo
> -  user:
> -    name: "{{ item }}"
> -    state: present
> -    home: "/home/{{ item }}"
> -    group: "{{ item }}"
> +  ansible.builtin.command: "useradd --badname -d /home/{{ item }} -U {{ item }}"
>   with_items:
>     - 123456-fsgqa
>     - fsgqa
> @@ -899,7 +890,9 @@
>     - daemon
>     - nobody
>   loop_control:
> -    label: "Ensuring the user {{ item }} exists"
> +    label: "Ensuring that user and group {{ item }} exists"
> +  register: useradd_result
> +  failed_when: useradd_result.rc != 0 and useradd_result.rc != 9
> 
> - name: Verify section name {{ fstests_section }} exists on fstests config file
>   vars:
> 
> base-commit: 096d2295b30fd72192cec80a234bd2153103b0cd
> -- 
> 2.44.0
> 
> 

--
Chuck Lever



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

* Re: [PATCH v1] fstests: Enable creation of group "123456-fsgqa" on Debian
  2024-04-17 19:46 [PATCH v1] fstests: Enable creation of group "123456-fsgqa" on Debian cel
  2024-04-17 19:48 ` Chuck Lever III
@ 2024-04-19 17:49 ` Luis Chamberlain
  2024-04-19 17:54   ` Chuck Lever III
  1 sibling, 1 reply; 4+ messages in thread
From: Luis Chamberlain @ 2024-04-19 17:49 UTC (permalink / raw)
  To: cel; +Cc: kdevops, ailiop, Chuck Lever

On Wed, Apr 17, 2024 at 03:46:18PM -0400, cel@kernel.org wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
> 
> While testing fstests on Debian, I encountered:
> 
> 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
> 
> Suggested-by: Anthony Iliopoulos <ailiop@suse.com>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---

Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>

  Luis

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

* Re: [PATCH v1] fstests: Enable creation of group "123456-fsgqa" on Debian
  2024-04-19 17:49 ` Luis Chamberlain
@ 2024-04-19 17:54   ` Chuck Lever III
  0 siblings, 0 replies; 4+ messages in thread
From: Chuck Lever III @ 2024-04-19 17:54 UTC (permalink / raw)
  To: Luis Chamberlain; +Cc: Chuck Lever, kdevops, ailiop



> On Apr 19, 2024, at 1:49 PM, Luis Chamberlain <mcgrof@kernel.org> wrote:
> 
> On Wed, Apr 17, 2024 at 03:46:18PM -0400, cel@kernel.org wrote:
>> From: Chuck Lever <chuck.lever@oracle.com>
>> 
>> While testing fstests on Debian, I encountered:
>> 
>> 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
>> 
>> Suggested-by: Anthony Iliopoulos <ailiop@suse.com>
>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
>> ---
> 
> Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>

Thanks! Pushed.


--
Chuck Lever



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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 19:46 [PATCH v1] fstests: Enable creation of group "123456-fsgqa" on Debian cel
2024-04-17 19:48 ` Chuck Lever III
2024-04-19 17:49 ` Luis Chamberlain
2024-04-19 17:54   ` 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.