docker.io package fails install if docker group is pre-existing

Bug #1407841 reported by Charles Butler
52
This bug affects 7 people
Affects Status Importance Assigned to Milestone
docker.io (Ubuntu)
Opinion
Undecided
Unassigned

Bug Description

When installing the docker.io package, it fails during installation with a message akin to the following:

stderr: addgroup: The group `docker' already exists and is not a system group. Exiting.
dpkg: error processing package docker.io (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 docker.io
E: Sub-process /usr/bin/dpkg returned an error code (1)

This was originally discovered during charm development where a user can switch from the canonical docker package to the docker maintained package 'lxc-docker'. With the upstream package, they are not maintaining a docker-group in the charm, and allows for installation regardless of the presence of the group. While the docker.io package will halt installation in a panic if it exists - regardless if its a system group or not. Just the presence alone appears to be the key factor in the failure.

I don't think this behavior is correct - as a user may have created a docker group themselves, and expect to install the docker.io package from the repository after removing the latest - due to a bug or any number of reasons.

I'm linking the commit to the charm and the user stack trace for additional validation/investigation if required:

https://github.com/chuckbutler/docker-charm/commit/59946a7bd6bfa3cc050de3b27e62d3207c71be47

https://gist.github.com/slatunje/735e1e5132de02a3ad1d

Tags: papercut
Revision history for this message
Paul Tagliamonte (paultag) wrote :

I'm marking this as Opinion.

Here's why:

The local sysadmin may have created a Docker group, but *not* intended to give the rights to use Docker to those users. Remember, the Docker group is root equivelent.

    [tag@cassiel:~][⌚ 09:02 PM] ♥ docker run -it --rm -v /./:/mnt debian:unstable chroot /mnt
    # ls /home
    tag

As such, on conflict, I'd prefer a failure to install.

Marking Opinion.

Changed in docker.io (Ubuntu):
status: New → Opinion
Revision history for this message
Paul Tagliamonte (paultag) wrote :

Honestly, this is a bug in lxc-docker for not cleaning up on postrm :)

Revision history for this message
Charles Butler (lazypower) wrote :

I suppose that's a fair assesment. We took this route to clean up the charm code as well - just removing the group, but having a bug here marked as opinion shows the due dilligence :)

Thanks for the rapid response Paul!

Revision history for this message
gomex (gomex-y) wrote :

I have the same problem. Can you please fix this package configuration?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.