Skip to contentSkip to conversation

userns issues on Ubunu 24.04/24.10

DISCUSSION Richard Purdie 2 participants 2 messages Sep 18, 2024

lore
Share & tools
lore
#0 lore raw

I wanted to give people some real world data on the userns issues on Ubuntu 24.04 and 24.10.

The advice has been to create /etc/apparmor.d/bitbake:

abi <abi/4.0>,
include <tunables/global>
profile bitbake /**/bitbake/bin/bitbake flags=(unconfined) {
userns,
}
EOF

and then reparse the config:

sudo apparmor_parser -r /etc/apparmor.d/bitbake

This "works" to a point however we started seeing weird failures on some of the new autobuilder workers even with this applied.

The problem is BB_SERVER_TIMEOUT=60 the autobuilder uses which means task execution commands may not be started with a "bitbake" command but could be started by devtool or something else. Those don't match the glob above.

So far the only reliable solution I've found was to effectively disable the userns restrictions with a /** glob.

I wanted to try and stop someone else scratching their head over why this fails.

Cheers,

Richard

#1 lore raw

I'll revert back to disabling the restriction as outlined at
https://gitlab.com/apparmor/apparmor/-/wikis/unprivileged_userns_restriction#permanently-disabling-the-restriction.
That should have a similar effect and follow apparmor norms.

Quoted 37 lines · Richard Purdie

I wanted to give people some real world data on the userns issues on Ubuntu 24.04 and 24.10.

The advice has been to create /etc/apparmor.d/bitbake:

abi <abi/4.0>,
include <tunables/global>
profile bitbake /**/bitbake/bin/bitbake flags=(unconfined) {
userns,
}
EOF

and then reparse the config:

sudo apparmor_parser -r /etc/apparmor.d/bitbake

This "works" to a point however we started seeing weird failures on some of the new autobuilder workers even with this applied.

The problem is BB_SERVER_TIMEOUT=60 the autobuilder uses which means task execution commands may not be started with a "bitbake" command but could be started by devtool or something else. Those don't match the glob above.

So far the only reliable solution I've found was to effectively disable the userns restrictions with a /** glob.

I wanted to try and stop someone else scratching their head over why this fails.

Cheers,

Richard

Signature · 3 lines
Michael Halstead
Linux Foundation / Yocto Project
Systems Operations Engineer