Comment 5 for bug 1844498

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 1844498] Re: 18.10+ cloud images have the LXD group as gid 1000

On Thu, Sep 26, 2019 at 05:27:22PM -0000, Michael Vogt wrote:
> I wonder if adding something to cloud.cfg that ensures there is a lxd
> group created as a system-group would be the way forward? Especially
> since we already reference this group in cloud.cfg.

For the specific case of a preseeded snap which we know should have an
associated group, I think we should handle this in livecd-rootfs and
statically create the group in the image since both are static aspects of
the image mastering. We CAN instruct cloud-init to create this as a system
group, but the point is that this is a layering violation; we should not
have to keep the cloud.cfg and the lxd snap in sync with regards to the
properties of the groups being created.

The reason I think that there should be extensions to cloud-init for this at
all is for the case where you have a *non* preseeded package which you want
to install as part of the instance config, and you want to add your user to
the group that will be created by that package. That could be either a deb
or a snap, doesn't matter. I don't think it smells good to have cloud-init
creating the group in this case.