Closed nteodosio closed 9 months ago
Found the way to get past that error right here, https://github.com/canonical/lxd/issues/11920:
% >/etc/apparmor.d/usr.bin.unshare cat <<EOF
abi <abi/4.0>,
include <tunables/global>
/usr/bin/unshare flags=(unconfined) {
userns,
# Site-specific additions and overrides. See local/README for details.
include if exists <local/usr.bin.unshare>
}
EOF
% apparmor_parser -r /etc/apparmor.d/usr.bin.unshare
@simondeziel please can you look into this?
@simondeziel this will be solved by re-enabling globally disabling restricted userns right?
@nteodosio to workaround this temporarily, can you try (as root):
echo "==> Disabling Apparmor unprivileged userns mediation"
echo 0 > /proc/sys/kernel/apparmor_restrict_unprivileged_userns
echo "==> Disabling Apparmor unprivileged unconfined mediation"
echo 0 > /proc/sys/kernel/apparmor_restrict_unprivileged_unconfined
This is the PR to have those keys disabled by LXD: https://github.com/canonical/lxd-pkg-snap/pull/327
This should be fixed in latest/edge now and will be in the LXD 5.21 release.
Just some feedback: I'm on Mantic with LXD 5.21, I'm still experiencing this issue.
@DiogoConstantino did you try the workaround here?
https://github.com/canonical/lxd/issues/12882#issuecomment-1941766215
@DiogoConstantino is it specifically with lxc console
you're seeing the issue with?
I did not test the workaround, because I rather have that working to secure my system, and this is not a show stopper for me.
This is specifically with lxc console, I haven't tested in any other way.
Meanwhile, I tested this on 24.04, and it did worked as expected. It appears to be a 23.10 specific issue, and due to the nearby EOL, I don't think it's a big deal. I just want people to know about it in case they also experience it in the next few weeks.
Meanwhile, I tested this on 24.04, and it did worked as expected. It appears to be a 23.10 specific issue, and due to the nearby EOL, I don't think it's a big deal. I just want people to know about it in case they also experience it in the next few weeks.
Thanks for clarification. :)
Required information
Issue description
I did this before and it worked fine. Now I get error with
unshare
:Steps to reproduce
lxc launch prompting:ubuntu-23.10-desktop p --vm --console=vga -c limits.cpu=4 -c limits.memory=4GiB
.lxc start p && lxc console -t vga p
Information to attach
dmesg
)lxc info NAME --show-log
)lxc config show NAME --expanded
)lxc monitor
while reproducing the issue)