Postgres service fails on adding user

  • Done
  • quality assurance status badge
Details
3 participants
  • Christopher Allan Webber
  • Efraim Flashner
  • Ludovic Courtès
Owner
unassigned
Submitted by
Christopher Allan Webber
Severity
normal

Debbugs page

Christopher Allan Webber wrote 9 years ago
(address . bug-guix@gnu.org)
8760xwhzpt.fsf@dustycloud.org
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
Attachment: guix-config.scm
Efraim Flashner wrote 9 years ago
(name . Christopher Allan Webber)(address . cwebber@dustycloud.org)(address . 22626@debbugs.gnu.org)
20160211094433.59614a99@debian-netbook
On Wed, 10 Feb 2016 16:13:19 -0800
Christopher Allan Webber <cwebber@dustycloud.org> wrote:

Toggle quote (50 lines)
> 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@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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCgAGBQJWvDvhAAoJEPTB05F+rO6TGY4P/iY8yuNvBuNBSxZamqKjDRD6
xYbYup0eMxDbGXilkUR4+X6Mc2sXTwp1t5KtF6pZOsdBoORFwpWqZ7UChxvIHLm4
3rdX0/Db03DPBu5lCoEhs6n1LxI2/PpQA/ONw3XcpAUKMuHnNG2bBZjWd40ZE+7e
/0wM6D4b3Bl8dRBE3Iinfh/WJvqm88nfLdONVFWW7uyGmjzV3DSDvIiNSCd6K+TY
W6LAN2hC/ilZTBK02qyo3tG4RMi2Pgu6WVdU1QXbt/wR+R+HQh+tI6FJoPM0XX9w
A/RnVp1Pg8K393ObDoQrS8sci2YSJhSCWbnCVviCZFK4p8e74uLnERzXAY5Ibxt0
NCpB5RbnbCx+3/Y8xP1Rv4ssPiwtwsDykJokNj/A+GIJ5uQ4X6TarZG2Tu+XfzOb
KjNVkKQY6E+xiL9GCo6LOiHP/LufIVs7pxxSY1gGVsefTKrSQYQVbWuqbu5FoVUI
kteX1gJVDUSg9jLLTzsdftJJZeWOtOKD50NXLv2tMUMQ8TChDgL9IGkm9rTnXuPX
ywRk0OzLTi9sxGuXE0hirwyFV8XbBa9Hk05ycyDDv5Vs4expyvHyH6cb8PAYArxv
cHuIYhh1A6ILq3PfsdoxSAFYOFwUF+G0847yFAPfifcNNgL0aD0Kd7SRnmxY1Npe
A0T9Q4kL+9AC3IGXgi1O
=1csK
-----END PGP SIGNATURE-----


Ludovic Courtès wrote 9 years ago
(name . Christopher Allan Webber)(address . cwebber@dustycloud.org)(address . 22626@debbugs.gnu.org)
87io1vtv9n.fsf@gnu.org
Christopher Allan Webber <cwebber@dustycloud.org> skribis:

Toggle quote (6 lines)
> 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’.
Christopher Allan Webber wrote 9 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 22626@debbugs.gnu.org)
87io1vqgzz.fsf@dustycloud.org
Ludovic Courtès writes:

Toggle quote (15 lines)
> Christopher Allan Webber <cwebber@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?

Toggle quote (2 lines)
> (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.
Ludovic Courtès wrote 9 years ago
(name . Christopher Allan Webber)(address . cwebber@dustycloud.org)(address . 22626@debbugs.gnu.org)
871t8ikh7o.fsf@gnu.org
Christopher Allan Webber <cwebber@dustycloud.org> skribis:

Toggle quote (35 lines)
> Ludovic Courtès writes:
>
>> Christopher Allan Webber <cwebber@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?

Toggle quote (3 lines)
> 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’.
Christopher Allan Webber wrote 9 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 22626-done@debbugs.gnu.org)
8737sy7smy.fsf@dustycloud.org
Ludovic Courtès writes:

Toggle quote (5 lines)
> 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!
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 22626@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 22626
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help