Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 775890 - app-containers/lxd: fails to start containers using forkproxy since using apparmor 3.0.x
Summary: app-containers/lxd: fails to start containers using forkproxy since using app...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal critical (vote)
Assignee: Joonas Niilola
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-13 22:43 UTC by Mattias Winther
Modified: 2022-01-09 16:56 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mattias Winther 2021-03-13 22:43:31 UTC
When trying to start my lxd containers that use port redirection, those machines fail with an apparmor error message. Looking for the source of the problem, it seems that apparmor 3.0 has a bug https://gitlab.com/apparmor/apparmor/-/issues/150 that breaks in a similar way. Is there a functional reason that the current LTS version of lxd requires a major bump in apparmor functionality, or is that more of a hygiene decision for Gentoo? I would have downgraded to verify, but since all the old ebuilds are gone, I am hoping that it's possible to run the current version with the 2.13.4 version of apparmor until the problem is fixed.

Reproducible: Always

Steps to Reproduce:
1. Have a container with port forwarding using forkproxy
2. Restart machine using new version of lxd with apparmor 3
3. Watch container fail to start due to apparmor error
Actual Results:  
Container fails to start

Expected Results:  
Container should start
Comment 1 Joonas Niilola gentoo-dev 2021-03-21 06:49:59 UTC
Hey, 

I don't personally use apparmor at all in Gentoo so not familiar with this issue. But do I understand you correctly, that apparmor-2.13.4 works with lxd? Or was it perhaps 2.13.3 that worked, but got removed?

If 2.13.4 still works, it's easy to pin the required version. 
If we need 2.13.3, well it's doable too, but need to check with apparmor's maintainer first.
Comment 2 Joonas Niilola gentoo-dev 2021-05-12 06:28:02 UTC
Ping, still need verification to the questions I've asked.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-05-12 06:28:55 UTC
We would really benefit from seeing the error too?
Comment 4 Mattias Winther 2021-05-12 08:21:25 UTC
(In reply to Joonas Niilola from comment #1)
> Hey, 
> 
> I don't personally use apparmor at all in Gentoo so not familiar with this
> issue. But do I understand you correctly, that apparmor-2.13.4 works with
> lxd? Or was it perhaps 2.13.3 that worked, but got removed?
> 
> If 2.13.4 still works, it's easy to pin the required version. 
> If we need 2.13.3, well it's doable too, but need to check with apparmor's
> maintainer first.

2.13.4 works, but there is a bug that forces you to downgrade to an earlier version of make to compile it, if I remember correctly, which is something they didn't fix in 2.13.4 but rather pointed to 3.0.0 for.
Comment 5 Mattias Winther 2021-05-12 08:21:58 UTC
(In reply to Sam James from comment #3)
> We would really benefit from seeing the error too?

The error is rather vague, but it says "aa-exec: ERROR: AppArmor interface not available"
Comment 6 Joonas Niilola gentoo-dev 2021-05-26 06:06:30 UTC
One more question: What kernel version are you on? I see the linked arch linux issue is resolved with "latest" kernels.
Comment 7 Joonas Niilola gentoo-dev 2021-06-22 12:10:59 UTC
And with older kernels, from what I've read, this might be relevant for a fix:
https://lore.kernel.org/stable/20210614102643.875096342@linuxfoundation.org/
Comment 8 Mattias Winther 2022-01-09 16:56:07 UTC
(In reply to Joonas Niilola from comment #6)
> One more question: What kernel version are you on? I see the linked arch
> linux issue is resolved with "latest" kernels.

Confirmed, this has resolved itself with newer versions of the software. Closing.