GNU bug report logs - #22626
Postgres service fails on adding user

Previous Next

Package: guix;

Reported by: Christopher Allan Webber <cwebber <at> dustycloud.org>

Date: Thu, 11 Feb 2016 00:14:02 UTC

Severity: normal

Done: Christopher Allan Webber <cwebber <at> dustycloud.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22626 in the body.
You can then email your comments to 22626 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#22626; Package guix. (Thu, 11 Feb 2016 00:14:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Allan Webber <cwebber <at> dustycloud.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 11 Feb 2016 00:14:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Allan Webber <cwebber <at> dustycloud.org>
To: bug-guix <at> gnu.org
Subject: Postgres service fails on adding user
Date: Wed, 10 Feb 2016 16:13:19 -0800
[Message part 1 (text/plain, inline)]
Heya all... guix system config attached.  I tried doing a guix system
reconfigure and it failboat'ed.  Here's what happened:

  adding user 'postgres'...
  useradd: group 'postgres' does not exist
  Backtrace:
  In ice-9/boot-9.scm:
    63: 19 [call-with-prompt prompt0 ...]
  In ice-9/eval.scm:
   432: 18 [eval # #]
  In ice-9/boot-9.scm:
  2401: 17 [save-module-excursion #<procedure 28dc940 at ice-9/boot-9.scm:4045:3 ()>]
  4050: 16 [#<procedure 28dc940 at ice-9/boot-9.scm:4045:3 ()>]
  1724: 15 [%start-stack load-stack ...]
  1729: 14 [#<procedure 28f3ea0 ()>]
  In unknown file:
     ?: 13 [primitive-load "/gnu/store/24mbii9wjlyzfzsqwfmcvz6vz2fv5n6g-guix-0.9.0.c3f29bc/bin/.guix-real"]
  In guix/ui.scm:
  1177: 12 [run-guix-command system "reconfigure" "guix-config.scm"]
  In ice-9/boot-9.scm:
   157: 11 [catch srfi-34 #<procedure 4fb2020 at guix/ui.scm:413:2 ()> ...]
   157: 10 [catch system-error ...]
  In guix/scripts/system.scm:
   701: 9 [process-action reconfigure ("guix-config.scm") ...]
  In guix/store.scm:
  1061: 8 [run-with-store # ...]
  In guix/scripts/system.scm:
   520: 7 [#<procedure 91f6f80 at guix/scripts/system.scm:520:13 (state)> #]
   302: 6 [#<procedure 9661740 at guix/scripts/system.scm:286:2 (state)> #]
  In unknown file:
     ?: 5 [primitive-load "/gnu/store/fnanaa7xalxa9h3yh1hpj3m5zgm9wasp-activate"]
  In ice-9/eval.scm:
   432: 4 [eval # ()]
  In ice-9/boot-9.scm:
   768: 3 [for-each #<procedure primitive-load (_)> #]
  In unknown file:
     ?: 2 [primitive-load "/gnu/store/hz2hnin6c12afvsyqxv0vs2rndxl9vpg-activate-servic
  e"]
  In ice-9/eval.scm:
   411: 1 [eval # ()]
  In unknown file:
     ?: 0 [getpw "postgres"]
  
  ERROR: In procedure getpw:
  ERROR: In procedure getpw: entry not found

Config attached.  Thanx!
 - cwebb

[guix-config.scm (application/octet-stream, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#22626; Package guix. (Thu, 11 Feb 2016 07:45:01 GMT) Full text and rfc822 format available.

Message #8 received at 22626 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Christopher Allan Webber <cwebber <at> dustycloud.org>
Cc: 22626 <at> debbugs.gnu.org
Subject: Re: bug#22626: Postgres service fails on adding user
Date: Thu, 11 Feb 2016 09:44:33 +0200
[Message part 1 (text/plain, inline)]
On Wed, 10 Feb 2016 16:13:19 -0800
Christopher Allan Webber <cwebber <at> dustycloud.org> wrote:

> Heya all... guix system config attached.  I tried doing a guix system
> reconfigure and it failboat'ed.  Here's what happened:
> 
>   adding user 'postgres'...
>   useradd: group 'postgres' does not exist
>   Backtrace:
>   In ice-9/boot-9.scm:
>     63: 19 [call-with-prompt prompt0 ...]
>   In ice-9/eval.scm:
>    432: 18 [eval # #]
>   In ice-9/boot-9.scm:
>   2401: 17 [save-module-excursion #<procedure 28dc940 at ice-9/boot-9.scm:4045:3 ()>]
>   4050: 16 [#<procedure 28dc940 at ice-9/boot-9.scm:4045:3 ()>]
>   1724: 15 [%start-stack load-stack ...]
>   1729: 14 [#<procedure 28f3ea0 ()>]
>   In unknown file:
>      ?: 13 [primitive-load "/gnu/store/24mbii9wjlyzfzsqwfmcvz6vz2fv5n6g-guix-0.9.0.c3f29bc/bin/.guix-real"]
>   In guix/ui.scm:
>   1177: 12 [run-guix-command system "reconfigure" "guix-config.scm"]
>   In ice-9/boot-9.scm:
>    157: 11 [catch srfi-34 #<procedure 4fb2020 at guix/ui.scm:413:2 ()> ...]
>    157: 10 [catch system-error ...]
>   In guix/scripts/system.scm:
>    701: 9 [process-action reconfigure ("guix-config.scm") ...]
>   In guix/store.scm:
>   1061: 8 [run-with-store # ...]
>   In guix/scripts/system.scm:
>    520: 7 [#<procedure 91f6f80 at guix/scripts/system.scm:520:13 (state)> #]
>    302: 6 [#<procedure 9661740 at guix/scripts/system.scm:286:2 (state)> #]
>   In unknown file:
>      ?: 5 [primitive-load "/gnu/store/fnanaa7xalxa9h3yh1hpj3m5zgm9wasp-activate"]
>   In ice-9/eval.scm:
>    432: 4 [eval # ()]
>   In ice-9/boot-9.scm:
>    768: 3 [for-each #<procedure primitive-load (_)> #]
>   In unknown file:
>      ?: 2 [primitive-load "/gnu/store/hz2hnin6c12afvsyqxv0vs2rndxl9vpg-activate-servic
>   e"]
>   In ice-9/eval.scm:
>    411: 1 [eval # ()]
>   In unknown file:
>      ?: 0 [getpw "postgres"]
>   
>   ERROR: In procedure getpw:
>   ERROR: In procedure getpw: entry not found
> 
> Config attached.  Thanx!
>  - cwebb
> 

I noticed that you use the postgresql-service, by any chance did you try
again after the fix to the service by Danny Milosavljevic in bug#22618?

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#22626; Package guix. (Thu, 11 Feb 2016 10:09:01 GMT) Full text and rfc822 format available.

Message #11 received at 22626 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Christopher Allan Webber <cwebber <at> dustycloud.org>
Cc: 22626 <at> debbugs.gnu.org
Subject: Re: bug#22626: Postgres service fails on adding user
Date: Thu, 11 Feb 2016 11:07:48 +0100
Christopher Allan Webber <cwebber <at> dustycloud.org> skribis:

> Heya all... guix system config attached.  I tried doing a guix system
> reconfigure and it failboat'ed.  Here's what happened:
>
>   adding user 'postgres'...
>   useradd: group 'postgres' does not exist

Normally just above that there should be:

  adding group 'postgres'

Could it be that adding the group silently failed?  What does /etc/group
shows?

(When testing in ‘guix system vm’, everything works well.)

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#22626; Package guix. (Thu, 11 Feb 2016 17:45:02 GMT) Full text and rfc822 format available.

Message #14 received at 22626 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Allan Webber <cwebber <at> dustycloud.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 22626 <at> debbugs.gnu.org
Subject: Re: bug#22626: Postgres service fails on adding user
Date: Thu, 11 Feb 2016 09:44:16 -0800
Ludovic Courtès writes:

> Christopher Allan Webber <cwebber <at> dustycloud.org> skribis:
>
>> Heya all... guix system config attached.  I tried doing a guix system
>> reconfigure and it failboat'ed.  Here's what happened:
>>
>>   adding user 'postgres'...
>>   useradd: group 'postgres' does not exist
>
> Normally just above that there should be:
>
>   adding group 'postgres'
>
> Could it be that adding the group silently failed?  What does /etc/group
> shows?

Well, it looks like it does do that.  I didn't show my full output
because there's a lot of garbage... maybe it turns out that this garbage
is related:

The following derivation will be built:
   /gnu/store/kil0p7xg6qrvvkf3mp0j0xii09s1cqx7-grub.cfg.drv
/gnu/store/qsgrb7inl2mkrnccxf524faqax63dbs4-system
/gnu/store/1b31ydr0yrc3jdl6i4chaccsbapzq0m5-grub.cfg
/gnu/store/sx2xqvr3s033bl60s09zs6jjbs73n791-grub-2.00
activating system...
setting up setuid programs in '/run/setuid-programs'...
populating /etc from /gnu/store/piaczch5x7vczy9z7yjq4z8631rh828p-etc...
usermod: existing lock file /etc/shadow.lock without a PID
usermod: cannot lock /etc/shadow; try again later.
adding group 'postgres'...
groupadd: existing lock file /etc/group.lock without a PID
groupadd: cannot lock /etc/group; try again later.
usermod: existing lock file /etc/shadow.lock without a PID
usermod: cannot lock /etc/shadow; try again later.
usermod: existing lock file /etc/shadow.lock without a PID
usermod: cannot lock /etc/shadow; try again later.
usermod: existing lock file /etc/shadow.lock without a PID
usermod: cannot lock /etc/shadow; try again later.
usermod: existing lock file /etc/shadow.lock without a PID
usermod: cannot lock /etc/shadow; try again later.
usermod: existing lock file /etc/shadow.lock without a PID
usermod: cannot lock /etc/shadow; try again later.
usermod: existing lock file /etc/shadow.lock without a PID
usermod: cannot lock /etc/shadow; try again later.
usermod: existing lock file /etc/shadow.lock without a PID
usermod: cannot lock /etc/shadow; try again later.
usermod: existing lock file /etc/shadow.lock without a PID
usermod: cannot lock /etc/shadow; try again later.
usermod: existing lock file /etc/shadow.lock without a PID
usermod: cannot lock /etc/shadow; try again later.
usermod: existing lock file /etc/shadow.lock without a PID
usermod: cannot lock /etc/shadow; try again later.
usermod: existing lock file /etc/shadow.lock without a PID
usermod: cannot lock /etc/shadow; try again later.
usermod: existing lock file /etc/shadow.lock without a PID
usermod: cannot lock /etc/shadow; try again later.
usermod: existing lock file /etc/shadow.lock without a PID
usermod: cannot lock /etc/shadow; try again later.
adding user 'ntpd'...
useradd: existing lock file /etc/group.lock without a PID
useradd: cannot lock /etc/group; try again later.
usermod: existing lock file /etc/shadow.lock without a PID
usermod: cannot lock /etc/shadow; try again later.
usermod: no changes
usermod: no changes
usermod: existing lock file /etc/shadow.lock without a PID
usermod: cannot lock /etc/shadow; try again later.
usermod: existing lock file /etc/shadow.lock without a PID
usermod: cannot lock /etc/shadow; try again later.
adding user 'postgres'...
useradd: group 'postgres' does not exist

Anyway /etc/group does not show postgres but I suppose it wouldn't
without the "guix system reconfigure" succeeding?

> (When testing in ‘guix system vm’, everything works well.)

I can't tell whether or not "guix system vm" would be fine; I assume it
probably would because I got to the point where qemu must have been
invoked, since my system crashed.  See my last bug.

It definitely does not work with "guix system reconfigure" though.






Information forwarded to bug-guix <at> gnu.org:
bug#22626; Package guix. (Thu, 11 Feb 2016 22:37:01 GMT) Full text and rfc822 format available.

Message #17 received at 22626 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Christopher Allan Webber <cwebber <at> dustycloud.org>
Cc: 22626 <at> debbugs.gnu.org
Subject: Re: bug#22626: Postgres service fails on adding user
Date: Thu, 11 Feb 2016 23:36:11 +0100
Christopher Allan Webber <cwebber <at> dustycloud.org> skribis:

> Ludovic Courtès writes:
>
>> Christopher Allan Webber <cwebber <at> dustycloud.org> skribis:
>>
>>> Heya all... guix system config attached.  I tried doing a guix system
>>> reconfigure and it failboat'ed.  Here's what happened:
>>>
>>>   adding user 'postgres'...
>>>   useradd: group 'postgres' does not exist
>>
>> Normally just above that there should be:
>>
>>   adding group 'postgres'
>>
>> Could it be that adding the group silently failed?  What does /etc/group
>> shows?
>
> Well, it looks like it does do that.  I didn't show my full output
> because there's a lot of garbage... maybe it turns out that this garbage
> is related:
>
> The following derivation will be built:
>    /gnu/store/kil0p7xg6qrvvkf3mp0j0xii09s1cqx7-grub.cfg.drv
> /gnu/store/qsgrb7inl2mkrnccxf524faqax63dbs4-system
> /gnu/store/1b31ydr0yrc3jdl6i4chaccsbapzq0m5-grub.cfg
> /gnu/store/sx2xqvr3s033bl60s09zs6jjbs73n791-grub-2.00
> activating system...
> setting up setuid programs in '/run/setuid-programs'...
> populating /etc from /gnu/store/piaczch5x7vczy9z7yjq4z8631rh828p-etc...
> usermod: existing lock file /etc/shadow.lock without a PID
> usermod: cannot lock /etc/shadow; try again later.
> adding group 'postgres'...
> groupadd: existing lock file /etc/group.lock without a PID
> groupadd: cannot lock /etc/group; try again later.

Apparently there’s a stale lock file that prevents ‘groupadd’ from
succeeding, maybe from an earlier crash or something?

Could you forcefully remove /etc/*.lock and retry?

> Anyway /etc/group does not show postgres but I suppose it wouldn't
> without the "guix system reconfigure" succeeding?

At this point, /run/current-system has been successfully updated; the
only thing that hasn’t been done yet is updating the GRUB menu.

Thanks,
Ludo’.




Reply sent to Christopher Allan Webber <cwebber <at> dustycloud.org>:
You have taken responsibility. (Thu, 11 Feb 2016 23:08:02 GMT) Full text and rfc822 format available.

Notification sent to Christopher Allan Webber <cwebber <at> dustycloud.org>:
bug acknowledged by developer. (Thu, 11 Feb 2016 23:08:02 GMT) Full text and rfc822 format available.

Message #22 received at 22626-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Allan Webber <cwebber <at> dustycloud.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 22626-done <at> debbugs.gnu.org
Subject: Re: bug#22626: Postgres service fails on adding user
Date: Thu, 11 Feb 2016 15:07:49 -0800
Ludovic Courtès writes:

> Apparently there’s a stale lock file that prevents ‘groupadd’ from
> succeeding, maybe from an earlier crash or something?
>
> Could you forcefully remove /etc/*.lock and retry?

Well, that fixed it!  I guess I could have guessed by the context clues
being dumped into stdout... :)

Anyway, closed!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 11 Mar 2016 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 106 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.