diff mbox series

virtbuilder fails: useradd craps out

Message ID 44FE7B04-044A-4D26-AF23-4D95756E0320@oracle.com (mailing list archive)
State New
Headers show
Series virtbuilder fails: useradd craps out | expand

Commit Message

Chuck Lever III Oct. 8, 2024, 6:07 p.m. UTC
Hey Luis -


commit 47d19e2c39354a1393cdd93c5dce35de5d09d893
Author:     Luis Chamberlain <mcgrof@kernel.org>
AuthorDate: Sat Oct 5 17:05:58 2024 -0700
Commit:     Luis Chamberlain <mcgrof@kernel.org>
CommitDate: Sat Oct 5 17:05:58 2024 -0700

    bringup_guestfs.sh: few minor fixes for libvirt URI users
         A few series of minor fixes:
    - Ensure the user is part of the appropriate distro libvirt group
    - Debian based (CONFIG_LIBVIRT_URI_SYSTEM) systems need sudo for
      a few commands
    - Ignore error on call for id -u kdevops output
         Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>


This hunk seems to break the "kdevops user exists" case
on my Fedora 40 system. What if we do this as well:

-               KDEVOPS_UID="-u ${TEST_UID}"
+               KDEVOPS_UID="-u `id -u kdevops`"

(untested)

--
Chuck Lever

Comments

Luis Chamberlain Oct. 8, 2024, 6:46 p.m. UTC | #1
On Tue, Oct 8, 2024 at 11:07 AM Chuck Lever III <chuck.lever@oracle.com> wrote:
>
> Hey Luis -
>
>
> commit 47d19e2c39354a1393cdd93c5dce35de5d09d893
> Author:     Luis Chamberlain <mcgrof@kernel.org>
> AuthorDate: Sat Oct 5 17:05:58 2024 -0700
> Commit:     Luis Chamberlain <mcgrof@kernel.org>
> CommitDate: Sat Oct 5 17:05:58 2024 -0700
>
>     bringup_guestfs.sh: few minor fixes for libvirt URI users
>          A few series of minor fixes:
>     - Ensure the user is part of the appropriate distro libvirt group
>     - Debian based (CONFIG_LIBVIRT_URI_SYSTEM) systems need sudo for
>       a few commands
>     - Ignore error on call for id -u kdevops output
>          Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
>
> diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh
> index 0cd573ae187b..d09ae64dcaea 100755
> --- a/scripts/bringup_guestfs.sh
> +++ b/scripts/bringup_guestfs.sh
> @@ -192,7 +200,7 @@ _EOT
>  pre_install_customizations()
>  {
>         KDEVOPS_UID=""
> -       TEST_UID=`id -u kdevops`
> +       TEST_UID=`id -u kdevops 2>&1 > /dev/null`
>         if [ $? -eq 0 ]; then
>                 KDEVOPS_UID="-u ${TEST_UID}"
>         fi
>
> This hunk seems to break the "kdevops user exists" case
> on my Fedora 40 system. What if we do this as well:
>
> -               KDEVOPS_UID="-u ${TEST_UID}"
> +               KDEVOPS_UID="-u `id -u kdevops`"
>
> (untested)

Sure, sorry about breaking things. Hopefully with the CI stuff we'll
start covering all this proactively on branches before pushes. That
seems to mean we may need to address soon self-hosted runners as a
group.

  Luis
Chuck Lever III Oct. 8, 2024, 6:50 p.m. UTC | #2
> On Oct 8, 2024, at 2:46 PM, Luis Chamberlain <mcgrof@kernel.org> wrote:
> 
> On Tue, Oct 8, 2024 at 11:07 AM Chuck Lever III <chuck.lever@oracle.com> wrote:
>> 
>> Hey Luis -
>> 
>> 
>> commit 47d19e2c39354a1393cdd93c5dce35de5d09d893
>> Author:     Luis Chamberlain <mcgrof@kernel.org>
>> AuthorDate: Sat Oct 5 17:05:58 2024 -0700
>> Commit:     Luis Chamberlain <mcgrof@kernel.org>
>> CommitDate: Sat Oct 5 17:05:58 2024 -0700
>> 
>>    bringup_guestfs.sh: few minor fixes for libvirt URI users
>>         A few series of minor fixes:
>>    - Ensure the user is part of the appropriate distro libvirt group
>>    - Debian based (CONFIG_LIBVIRT_URI_SYSTEM) systems need sudo for
>>      a few commands
>>    - Ignore error on call for id -u kdevops output
>>         Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
>> 
>> diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh
>> index 0cd573ae187b..d09ae64dcaea 100755
>> --- a/scripts/bringup_guestfs.sh
>> +++ b/scripts/bringup_guestfs.sh
>> @@ -192,7 +200,7 @@ _EOT
>> pre_install_customizations()
>> {
>>        KDEVOPS_UID=""
>> -       TEST_UID=`id -u kdevops`
>> +       TEST_UID=`id -u kdevops 2>&1 > /dev/null`
>>        if [ $? -eq 0 ]; then
>>                KDEVOPS_UID="-u ${TEST_UID}"
>>        fi
>> 
>> This hunk seems to break the "kdevops user exists" case
>> on my Fedora 40 system. What if we do this as well:
>> 
>> -               KDEVOPS_UID="-u ${TEST_UID}"
>> +               KDEVOPS_UID="-u `id -u kdevops`"
>> 
>> (untested)
> 
> Sure, sorry about breaking things. Hopefully with the CI stuff we'll
> start covering all this proactively on branches before pushes.

As a random observation: This seems to show up only when
rebuilding a raw image locally, so might be infrequent
enough to slip through pro-active tests unless we
specifically target the "download and rebuild" case.


> That
> seems to mean we may need to address soon self-hosted runners as a
> group.


--
Chuck Lever
Luis Chamberlain Oct. 8, 2024, 7:53 p.m. UTC | #3
On Tue, Oct 08, 2024 at 06:50:19PM +0000, Chuck Lever III wrote:
> 
> 
> > On Oct 8, 2024, at 2:46 PM, Luis Chamberlain <mcgrof@kernel.org> wrote:
> > 
> > On Tue, Oct 8, 2024 at 11:07 AM Chuck Lever III <chuck.lever@oracle.com> wrote:
> >> 
> >> Hey Luis -
> >> 
> >> 
> >> commit 47d19e2c39354a1393cdd93c5dce35de5d09d893
> >> Author:     Luis Chamberlain <mcgrof@kernel.org>
> >> AuthorDate: Sat Oct 5 17:05:58 2024 -0700
> >> Commit:     Luis Chamberlain <mcgrof@kernel.org>
> >> CommitDate: Sat Oct 5 17:05:58 2024 -0700
> >> 
> >>    bringup_guestfs.sh: few minor fixes for libvirt URI users
> >>         A few series of minor fixes:
> >>    - Ensure the user is part of the appropriate distro libvirt group
> >>    - Debian based (CONFIG_LIBVIRT_URI_SYSTEM) systems need sudo for
> >>      a few commands
> >>    - Ignore error on call for id -u kdevops output
> >>         Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
> >> 
> >> diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh
> >> index 0cd573ae187b..d09ae64dcaea 100755
> >> --- a/scripts/bringup_guestfs.sh
> >> +++ b/scripts/bringup_guestfs.sh
> >> @@ -192,7 +200,7 @@ _EOT
> >> pre_install_customizations()
> >> {
> >>        KDEVOPS_UID=""
> >> -       TEST_UID=`id -u kdevops`
> >> +       TEST_UID=`id -u kdevops 2>&1 > /dev/null`
> >>        if [ $? -eq 0 ]; then
> >>                KDEVOPS_UID="-u ${TEST_UID}"
> >>        fi
> >> 
> >> This hunk seems to break the "kdevops user exists" case
> >> on my Fedora 40 system. What if we do this as well:
> >> 
> >> -               KDEVOPS_UID="-u ${TEST_UID}"
> >> +               KDEVOPS_UID="-u `id -u kdevops`"
> >> 
> >> (untested)
> > 
> > Sure, sorry about breaking things. Hopefully with the CI stuff we'll
> > start covering all this proactively on branches before pushes.
> 
> As a random observation: This seems to show up only when
> rebuilding a raw image locally, so might be infrequent
> enough to slip through pro-active tests unless we
> specifically target the "download and rebuild" case.

Seems like a new workflow to ensure we test indeed.

  Luis
diff mbox series

Patch

diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh
index 0cd573ae187b..d09ae64dcaea 100755
--- a/scripts/bringup_guestfs.sh
+++ b/scripts/bringup_guestfs.sh
@@ -192,7 +200,7 @@  _EOT
 pre_install_customizations()
 {
        KDEVOPS_UID=""
-       TEST_UID=`id -u kdevops`
+       TEST_UID=`id -u kdevops 2>&1 > /dev/null`
        if [ $? -eq 0 ]; then
                KDEVOPS_UID="-u ${TEST_UID}"
        fi