Hi peb,

On Sat, 5 Sep 2020 00:23:17 +0200 Pierre-Elliott =?utf-8?B?QsOpY3Vl?= 
<p...@debian.org> wrote:
> Control: tags -1 +moreinfo
> 
> Hey Santiago,
> 
> Thanks for the bugreport!
> 
> Le jeudi 09 juillet 2020 à 22:28:06+0200, Santiago R.R. a écrit :
> > Package: lxc
> > Version: 1:3.1.0+really3.0.3-8
> > Severity: important
> > 
> > Dear Maintainer,
> > 
> > After creating an lxc container, I've manually set a MAC address for it.
> > The container fails to start, giving this output in the logs:
> > 
> >     lxc-start container-name 20200709195149.256 ERROR    network - 
> > network.c:setup_hw_addr:2762 - Cannot assign requested address - Failed to 
> > perform ioctl
> >     lxc-start container-name 20200709195149.256 ERROR    network - 
> > network.c:lxc_setup_netdev_in_child_namespaces:2907 - Failed to setup hw 
> > address for network device "eth0"
> >     lxc-start container-name 20200709195149.256 ERROR    network - 
> > network.c:lxc_setup_network_in_child_namespaces:3047 - failed to setup 
> > netdev
> >     lxc-start container-name 20200709195149.256 ERROR    conf - 
> > conf.c:lxc_setup:3540 - Failed to setup network
> >     lxc-start container-name 20200709195149.257 ERROR    start - 
> > start.c:do_start:1275 - Failed to setup container "container-name"
> >     lxc-start container-name 20200709195149.257 ERROR    sync - 
> > sync.c:__sync_wait:62 - An error occurred in another process (expected 
> > sequence number 5)
> >     lxc-start container-name 20200709195149.258 ERROR    lxccontainer - 
> > lxccontainer.c:wait_on_daemonized_start:842 - Received container state 
> > "ABORTING" instead of "RUNNING"
> >     lxc-start container-name 20200709195149.258 ERROR    lxc_start - 
> > tools/lxc_start.c:main:330 - The container failed to start
> >     lxc-start container-name 20200709195149.259 ERROR    lxc_start - 
> > tools/lxc_start.c:main:333 - To get more details, run the container in 
> > foreground mode
> >     lxc-start container-name 20200709195149.259 ERROR    lxc_start - 
> > tools/lxc_start.c:main:336 - Additional information can be obtained by 
> > setting the --logfile and --logpriority options
> >     lxc-start container-name 20200709195149.275 ERROR    start - 
> > start.c:__lxc_start:1951 - Failed to spawn container "container-name"
> > 
> > In the host I can see this:
> > 
> >     ...
> >     Jul 09 19:53:42 olimicro audit[4788]: AVC apparmor="STATUS" 
> > operation="profile_load" profile="/usr/bin/lxc-start" 
> > name="lxc-container-name_</var/lib/lxc>" pid=4788 comm="apparmor_parser"
> >     Jul 09 19:53:42 olimicro kernel: audit: type=1400 
> > audit(1594324422.794:57): apparmor="STATUS" operation="profile_load" 
> > profile="/usr/bin/lxc-start" name="lxc-container-name_</var/lib/lxc>" 
> > pid=4788 comm="apparmor_parser"
> >     Jul 09 19:53:42 olimicro kernel: br0: port 4(vethETHNAME) entered 
> > blocking state
> >     Jul 09 19:53:42 olimicro kernel: br0: port 4(vethETHNAME) entered 
> > disabled state
> >     Jul 09 19:53:42 olimicro systemd-udevd[4789]: link_config: 
> > autonegotiation is unset or enabled, the speed and duplex are not writable.
> >     Jul 09 19:53:42 olimicro kernel: device vethETHNAME entered promiscuous 
> > mode
> >     Jul 09 19:53:42 olimicro kernel: IPv6: ADDRCONF(NETDEV_UP): 
> > vethETHNAME: link is not ready
> >     Jul 09 19:53:42 olimicro systemd-udevd[4789]: Using default interface 
> > naming scheme 'v240'.
> >     Jul 09 19:53:42 olimicro systemd-udevd[4789]: Could not generate 
> > persistent MAC address for vethHP689N: No such file or directory
> 
> This is weird, first the interface is vethETHNAME and then vethHP689N…
> are you sure there isn't a quirk in your config or your bridge config?

I don't think so. It's a simple bridge managed by nm.

> 
> I use hardcoded macs in configurations on buster since the release
> without any issue, but I'm under amd64 arch...
> 
> >     Jul 09 19:53:42 olimicro NetworkManager[935]: <info>  [1594324422.8520] 
> > manager: (vethHP689N): new Veth device 
> > (/org/freedesktop/NetworkManager/Devices/37)
> >     Jul 09 19:53:42 olimicro systemd-udevd[4790]: link_config: 
> > autonegotiation is unset or enabled, the speed and duplex are not writable.
> >     Jul 09 19:53:42 olimicro kernel: eth0: renamed from vethHP689N
> >     Jul 09 19:53:42 olimicro systemd-udevd[4790]: Using default interface 
> > naming scheme 'v240'.
> >     Jul 09 19:53:42 olimicro sudo[4781]: pam_unix(sudo:session): session 
> > closed for user root
> >     Jul 09 19:53:42 olimicro NetworkManager[935]: <info>  [1594324422.9294] 
> > manager: (vethETHNAME): new Veth device 
> > (/org/freedesktop/NetworkManager/Devices/38)
> >     Jul 09 19:53:43 olimicro audit[4795]: AVC apparmor="STATUS" 
> > operation="profile_remove" profile="/usr/bin/lxc-start" 
> > name="lxc-container-name_</var/lib/lxc>" pid=4795 comm="apparmor_parser"
> >     Jul 09 19:53:43 olimicro kernel: audit: type=1400 
> > audit(1594324423.898:58): apparmor="STATUS" operation="profile_remove" 
> > profile="/usr/bin/lxc-start" name="lxc-container-name_</var/lib/lxc>" 
> > pid=4795 comm="apparmor_parser"
> >     Jul 09 19:53:44 olimicro kernel: br0: port 4(vethETHNAME) entered 
> > disabled state
> >     Jul 09 19:53:44 olimicro kernel: device vethETHNAME left promiscuous 
> > mode
> >     Jul 09 19:53:44 olimicro kernel: br0: port 4(vethETHNAME) entered 
> > disabled state
> >     Jul 09 19:53:44 olimicro NetworkManager[935]: <info>  [1594324424.5249] 
> > device (vethETHNAME): released from master device br0
> > 
> 
> > To make the container work, I had to remove the lxc.net.0.hwaddr
> > entry,
> > start the container and only then copy the autogenerated MAC address
> > in
> > the config.
> > 
> > This happens on armv7l running buster. I haven't test a similar case
> > on
> > other architecture nor testing/sid.
> 
> Could you give me your container config?
> 

Here it is:

lxc.net.0.type = veth
lxc.net.0.flags = up
lxc.net.0.link = br0
lxc.net.0.veth.pair = vethETHNAME
#lxc.net.0.hwaddr = 45:b9:1a:ab:1b:db
lxc.net.0.hwaddr = d6:cf:23:94:45:14
lxc.apparmor.profile = generated
lxc.apparmor.allow_nesting = 1
lxc.rootfs.path = dir:/mnt/lxc/container-name/rootfs

# Common configuration
lxc.include = /usr/share/lxc/config/debian.common.conf

# Container specific configuration
lxc.tty.max = 4
lxc.uts.name = container-name
lxc.arch = armhf
lxc.pty.max = 1024

lxc.start.auto = 1

Cheers,

 -- Santiago

Attachment: signature.asc
Description: PGP signature

Reply via email to