Closed rgl closed 9 months ago
That's interesting, any chance you could rename your host eth0
to some other name and see if the issue still happens? Or alternatively change the container's device to be named eth1
.
I suspect it may be a liblxc or Incus bug where the action of bringing down the instance eth0
device somehow misses the namespace and hits the host.
I forgot to mention, when using a virtual machine, it works fine; the host interface is not shutdown.
Renaming the host eth0
to the default enp5s0
worked (actually, I've removed net.ifnames=0
from the linux kernel command line); when stopping the container, it no longer shuts down the host enp5s0
network interface.
Configuring the incus default profile to eth1
, didn't work, the host interface is still shutdown.
root@incus:~# incus config show debian-ct
architecture: x86_64
config:
image.architecture: amd64
image.description: Debian bookworm amd64 (20231008_05:24)
image.os: Debian
image.release: bookworm
image.serial: "20231008_05:24"
image.type: squashfs
image.variant: default
volatile.base_image: 433ece944ac46aa97b763b76ee95966bc3ad92f751f0d37a381fc383285b0df1
volatile.cloud-init.instance-id: b35c534c-02aa-4f64-8dfb-62d7421ae61c
volatile.eth1.host_name: veth9e0b491c
volatile.eth1.hwaddr: 00:16:3e:8b:dd:c8
volatile.eth1.name: eth0
volatile.idmap.base: "0"
volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.idmap: '[]'
volatile.last_state.power: RUNNING
volatile.uuid: 06f45f20-0e15-4c36-b886-e24b7cc21623
volatile.uuid.generation: 06f45f20-0e15-4c36-b886-e24b7cc21623
devices: {}
ephemeral: false
profiles:
- default
stateful: false
description: ""
root@incus:~# incus exec debian-ct -- ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
4: eth0@if5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:16:3e:8b:dd:c8 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 10.2.0.94/24 metric 1024 brd 10.2.0.255 scope global dynamic eth0
valid_lft 3526sec preferred_lft 3526sec
inet6 fe80::216:3eff:fe8b:ddc8/64 scope link
valid_lft forever preferred_lft forever
root@incus:~# incus stop debian-ct
lost connection to the host at this point
@rgl would you mind filing this issue at https://github.com/lxc/incus/issues?
Unfortunately Github doesn't let me do cross-organization issue transfers so I can't just move it over to the incus repo :(
Done, I've created https://github.com/lxc/incus/issues/146
Stopping a container brings down the host
eth0
interface:Incus is running in a Debian 12 (vagrant managed) virtual machine, and is configured as https://github.com/rgl/incus-playground/blob/main/provision-incus.sh#L71-L99.