[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1055786: GID=1000 for netdev created by cloud-init violates Debian Policy



Hi,

Not quite.

On Sun, 2023-11-12 at 07:47 -0800, Ross Vandegrift wrote:
> On Sat, Nov 11, 2023 at 09:46:51PM +0900, Osamu Aoki wrote:
> > Package: cloud-init
> > Version: 22.4.2-1
> > Severity: normal
> > 
> > ## Background:
> > 
> > The problem and possible root cause fix are reported on upstream github
> > issue: https://github.com/canonical/cloud-init/issues/4603
> > 
> > ## Issue:
> > I noticed instance generated from Debian bookworm cloud image on
> > linuxcontainer.org had odd GID=1000 for netdev. Since netdev should be a
> > system group, this situation violates Debian policy.
> 
> Hi Osamu,
> 
> As Shengjing Zhu mentioned in [1], this issue was fixed in #1038691.  Is that
> incorrect?


This #1038691 is for Package: cloud.debian.org .

As I understand, the bug in cloud-init is worked around and only the resulting
image for cloud.debian.org is fixed via the image building code.

But not for LXD since it uses different images.  Image normally downloaded and
used by `lxc launch ...` becomes buggy once its instance is started because then
cloud-init starts system initialization with its default setting.

Of course, we can avoid this situation by fixing image manually by modifying its
default setting.

Here is how I get around this problem by removing toxic netdev out of installed
file /etc/cloud/cloud.cfg:
```
 $ cd path/to
 $ lxc init images:debian/bookworm/cloud dbc0
 $ lxc file pull dbc0/etc/cloud/cloud.cfg .
 $ sed -i -e 's/ netdev,//' cloud.cfg
 $ lxc file push cloud.cfg dbc0/etc/cloud/
 $ lxc publish dbc0 --alias dbc
Instance published with fingerprint:
379e858cc15808dbdf6a27a028a8b0098213656c0b4565bbc1b64b90b61d9dbd
 $ lxc start dbc0
 $ lxc launch dbc dbc1
```

Osamu


> [1] - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1055700#25


Reply to: