Today I tried downloading version 19.04 of ubuntu image from ubuntu: and noticed a strange behavior of the LXD group in the container. I am wondering if it is a bug in LXD or something has changed in version 19.04 of Ubuntu. Here is how to repeat the experiment:
Download the images from the remote repository
:
$ lxc image copy ubuntu:19.04/amd64 local: --alias ubuntu_1904
$ lxc image copy ubuntu:18.04/amd64 local: --alias ubuntu_1804
Next launch container with version 18.04
and observe group IDs:
$ lxc launch ubuntu_1804 1804
$ lxc exec 1804 -- id ubuntu
uid=1000(ubuntu) gid=1000(ubuntu) groups=1000(ubuntu),4(adm),20(dialout),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),108(lxd),114(netdev)
Repeat with version 19.04
:
$ lxc launch ubuntu_1904 1904
$ lxc exec 1904 -- id ubuntu
uid=1000(ubuntu) gid=1001(ubuntu) groups=1001(ubuntu),1000(lxd),4(adm),20(dialout),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),116(netdev)
Notice in the latter case how ubuntu
's group got bumped up to 1001
and this is because lxd
now has group ID 1000
instead of 108
in version 18.04
of Ubuntu.
Is this a bug in LXD or, is this normal behavior? If the latter is the case, what could one do to enforce consistent behaviour of group IDs inside the containers?