Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
No AppArmor confinement on openSUSE prevents container startup #3345
Comments
|
LXD does have auto-detection through liblxc for that. That's why you got the error and the container was prevented from starting. If we had let the container start, you'd have been misled into thinking that it's properly confined when it's really not as your system has partial apparmor support (it's not disabled, it's present but doesn't cover everything we need). So at the LXD level we don't plan on changing that as it's the same code which protects machines that got a new kernel with apparmor coverage regression. That being said, we should do something about the snap package. Basically detecting OpenSUSE and setting "lxc.aa_allow_incomplete = 1" in such cases as we know that the normal OpenSUSE kernel requires that to function. |
morphis
commented
May 24, 2017
Sounds good to me.
If you do that we need to see which other distributions we need to include. I didn't tested Fedora yet but I guess we have there a similar problem. |
|
Fedora should be fine as it doesn't have apparmor support at all. The problem is when the kernel advertises apparmor support but doesn't come with the full set of capabilities that we expect. |
morphis
commented
May 24, 2017
Ok, thanks for the explanation! |
Fixed in edge, will push to candidate and then stable next. |
stgraber
closed this
May 24, 2017
|
(Also had to fight with snapd to get a proper /etc rather than OpenSUSE's) |
morphis commentedMay 24, 2017
The template below is mostly useful for bug reports and support questions.
Feel free to remove anything which doesn't apply to you and add more information where it makes sense.
Required information
Issue description
Install the
lxdsnap on openSUSE and start a new container viaLooking at the log file of the container shows
Disabling AppArmor profiles for the container via
makes the container starting and usable.
LXD needs some kind of auto-detection for such cases.
Steps to reproduce
See description
Information to attach