docker.io package fails install if docker group is pre-existing
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/
https:/
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.