I installed 26.04 on one of my Incus hosts yesterday. In some LXC instances (running 24.04.4) I’m seeing a problem I remember we saw with earlier Ubuntu releases, where apt update hangs even though other networking works fine. If the instance is privileged, then apt works.
Also like previous issues, eventually all your RAM is consumed because parent processes in the instances can’t kill their children and the server becomes unresponsive.
When I get a chance (two week old baby!) I’ll see what’s in the logs.
Did you try to disable apparmor - sudo aa-teardown; sudo aa-status. as you suspected apparmor seems the problem.
If you see incus working as is after that you might wanna add/modify the lxd/incus profile - I would need to have the create the same setup to give correct instructions.
Exasperating that the problem repeated across two distro upgrades. Perhaps no-one at Canonical runs test a system with LXD on it, since I’d assume the same issues would apply.
But … I have one instance whose only NIC is on a different VLAN and that will not compete Netplan apply.
The instance NIC has a static IPv4 address in Netplan, but instead the NIC tries to get a dhcp6 address. If I try to netplan apply the command hangs until I ctrl-C and nothing appears in the logs. After that though the instance is quite unhappy - Failed to connect to system scope bus via local transport : No such file or directory and I have to shut down the instance from the host.
journalctl is unhelpful, telling me AppArmor is stopping it even though AA is supposedly off.
When enabling apparmor again make sure you do it the right order or you get lot’s of troubles (on my Arch WS kernel apparmor without service apparmor = blackscreen)
If your plesk container works w/o apparmor on the host you might transfer apparmor profiles from the container (or any other older ubuntu) to the host … OR JUST keep apparmor disabled if you’r able to ignore security.
The root cause seems to be that from 25.04 onwards Canonical has been enforcing AppArmor Profile Stacking (/sys/kernel/security/apparmor/features/domain/stack = yes) so we see other things breaking elsewhere too (eg AppArmor: signal rule does not match stacked profile peer on kernel 6.17 · Issue #12886 · containerd/containerd · GitHub ) and don’t get me started on Inception-like things like I had AppArmor complaining about something (error=-13 info="Failed name lookup - disconnected path") which turned out to be Ghostscript (!) inside the Paperless NGX container stack on my Docker LXC not being able to be properly contained by AppArmor.
I don’t know why Canonical hasn’t provided a fix but in the meantime rather than the profile route - I only had partial success with that and it was turning into whack-a-mole with AppArmor errors - I suggest instead to revert for now to AppArmor 24.04 behaviour where it no longer stacks AppArmor profiles :
sudo sysctl -w kernel.apparmor_restrict_unprivileged_unconfined=0
echo "kernel.apparmor_restrict_unprivileged_unconfined=0" | sudo tee /etc/sysctl.d/99-apparmor-incus.conf
This seems to work but I am not a real sysadmin so please use with caution.
@stgraber I realise you said elsewhere you’re not interested in correcting problems in a brand new distro version, but maybe over time the general AppArmor stacked profile thing may become more of a general problem so I’ll just leave this here to help future travellers.
Edited to add : this removes some protection from kernel attacks from within the LXC, but was (as far as I can tell) the standard setup in 22.04 etc. so please do your own risk assessment.
And replying to myself - being a questioning type I wondered, why didn’t this break LXD in the same way? Why would Canonical shoot themselves in the foot with their own change?
The answer seems to be that it does, and so they seem to have hardcoded the exact workaround I provided above into the LXD snap. Look for the euphamistic “manage_apparmor_restrictions” - line 439 for now - in the linked file.
Hence it looks like there will be no quick fix for this for Ubuntu users unless other things (eg the containerd issue I found) start to hurt.