Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack --docker build fails with duplicate groupadd #3092

Closed
dysinger opened this issue Mar 28, 2017 · 0 comments · Fixed by #3093
Closed

stack --docker build fails with duplicate groupadd #3092

dysinger opened this issue Mar 28, 2017 · 0 comments · Fixed by #3093
Assignees

Comments

@dysinger
Copy link
Contributor

dysinger commented Mar 28, 2017

General summary/comments (optional)

On Ubuntu Yakkety (16.10) the libvirtd group was renamed to libvirt. During the transition there are both group entries with the same gid in /etc/groups. See https://help.ubuntu.com/lts/serverguide/libvirt.html "In more recent releases (>= Yakkety) the group was renamed to libvirt. Upgraded systems get a new libvirt group with the same gid as the libvirtd group to match that."

$ cat /etc/group | grep 142
libvirtd:x:142:
libvirt:x:142:

This causes stack to issue the same two groupadd commands in a row (use --verbose to see).

Steps to reproduce

  1. Install libvirt on ubuntu 16.10
  2. Add yourself to the libvirt or libvirtd group
  3. Log out & log in or issue newgrp libvirt in a terminal
  4. Run command stack --docker build

Expected

It should work

Actual

It fails with duplicate groupadd commands and exits code 9

$ stack --docker --docker-repo xyz --verbose build
...
@(System/Process/Read.hs:306:3)
2017-03-28 17:52:51.015855: [debug] Run process: /usr/sbin/groupadd -o --gid 133 group133
@(System/Process/Read.hs:306:3)
2017-03-28 17:52:51.029280: [debug] Process finished in 13ms: /usr/sbin/groupadd -o --gid 133 group133
@(System/Process/Read.hs:306:3)
2017-03-28 17:52:51.029628: [debug] Run process: /usr/sbin/groupadd -o --gid 134 group134
@(System/Process/Read.hs:306:3)
2017-03-28 17:52:51.043260: [debug] Process finished in 13ms: /usr/sbin/groupadd -o --gid 134 group134
@(System/Process/Read.hs:306:3)
2017-03-28 17:52:51.043472: [debug] Run process: /usr/sbin/groupadd -o --gid 136 group136
@(System/Process/Read.hs:306:3)
2017-03-28 17:52:51.056751: [debug] Process finished in 13ms: /usr/sbin/groupadd -o --gid 136 group136
@(System/Process/Read.hs:306:3)
2017-03-28 17:52:51.056990: [debug] Run process: /usr/sbin/groupadd -o --gid 142 group142
@(System/Process/Read.hs:306:3)
2017-03-28 17:52:51.072685: [debug] Process finished in 15ms: /usr/sbin/groupadd -o --gid 142 group142
@(System/Process/Read.hs:306:3)
2017-03-28 17:52:51.072927: [debug] Run process: /usr/sbin/groupadd -o --gid 142 group142
@(System/Process/Read.hs:306:3)
Running /usr/sbin/groupadd -o --gid 142 group142 exited with ExitFailure 9


groupadd: group 'group142' already exists

Stack version

$ stack --version
Version 1.4.0, Git revision 5986498a9d1073e8d58c79ec1302bb2a7847a396 (4642 commits) x86_64 hpack-0.17.0

Method of installation

  • Official binary, downloaded from stackage.org or fpcomplete's package repository
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant