-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: invalid config provided: AppArmorProfile and privileged are mutually exclusive options #6933
Comments
This is reproduced on ubuntu by ceph users. ################################## Using the repo suggested for Ubuntu 18 ( "Error: invalid config provided: AppArmorProfile and privileged are From the bit of reading we've done, this looks to be an issue with Podman Has anybody else run into this/been able to workaround it? We'll have to |
Correct, that was my post, and it does occur on Ubuntu 18. |
Is the expectation that the apparmor profile will be applied and used, or discarded? With SELinux + |
@mheon I am not sure if any policy specific to podman is configured in many cases. # Used to change the name of the default AppArmor profile of container engine.
#
# apparmor_profile = "container-default" And 1.9.3 and below just run --privileged without any --security-opt. Podman 2.0.2 exibits the same error with --security-opt # podman run --privileged --security-opt=apparmor=unconfined hello-world
Error: invalid config provided: AppArmorProfile and privileged are mutually exclusive options |
--privileged should not enable apparmor. containers.conf is showing you the defaults. It is built into the code. If you want to change the default you can uncomment and change that line, otherwise it will apply apparmor policy on systems that support apparmor. If a user says --privileged --security-opt apparmor=/etc/myapparmor |
Based on
Source: http://docs.podman.io/en/latest/markdown/podman-run.1.html would I assume, that AppArmor profiles would be discarded. Sounds like you want to change that now, so that you can use AppArmor and Should one really do that, change the meaning of And for my understanding: As it seems to be implemented now, the default AppArmor profile is What exactly should I do now, to get |
What we're talking about here is a case where both flags are specified. If I call |
@mheon But the problem is, the error appears even without --security-opt specified. It affects deployment of ceph containers that uses privileged option for example. So something changed in podman 2 vs 1.93 |
I experience the same behavior on Ubuntu 20.04:
The podman man page tells me: apparmor=unconfined : Turn off apparmor confinement for the container Which was the behavior before on Ubuntu 18.04. |
I could successfully run this podman run --privileged --security-opt label=disable hello-world |
Yes, this works for me also. Thanks @alitvak69 . Seems I got the documentation wrong. Nevertheless podman behaves different in Ubuntu 20.04, or at least 18.04 accepted |
It is actually confusing, disabling label in config file (label = false) systemwide has no effect. Still I would like to preserve compatibility if possible, and clarify documentation. |
implement workaround for: Error: invalid config provided: AppArmorProfile and privileged are mutually exclusive options containers/podman#6933
I agree with preserving compatibility, this is a 'breaking' change in behavior. The default behavior shouldn't change drastically enough to break existing software without release notes/documentation updates and time to remediate if necessary. |
Yes no one is arguing this is not a bug. It is definitely a big bug. |
I also believe the fix has been merged several days ago. |
If people with knowledge of AppArmor could take the PR for a spin, It would be appreciated. I think this is correct, but I am too lazy to setup a AppArmor machine to test it out. :^( |
relates to https://tracker.ceph.com/issues/46429 |
This comment is slightly unrelated to a topic but perhaps it makes sense to have a separate repo on OBS, call it old for example. This repo would contain latest 1.x podman packages. This way people will continue reporting issues with 2.x but can revert their production to 1.x. This is not ideal but may be a work around for now. |
I used OBS to build podman v1.9.3 packages. Feel free to use it until a proper solution arrives. |
Should be fixed in master now, will be in 2.0.3 |
For anyone who is constrained in getting the updated version, instead of podman run --cap-add=all.... |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
sudo podman run --privileged hello-world
leads towhen using Ubuntu 20.04.
I was informed by a colleague of mine about this problem, when he tried to use an image of us, and could not get it to work.
Using Arch Linux, I could not reproduce the problem.
Steps to reproduce the issue:
To reproduce it, I installed Ubuntu 20.04 in a VirtualBox VM where the error appears, too.
Download the latest Ubuntu 20.04 image from https://releases.ubuntu.com/20.04/ and install Ubuntu 20.04 in a VirtualBox VM
Update the system and install curl:
sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get install curl
Install Podman
sudo podman run --privileged hello-world
and get the error.I want to explicitly state at this point, that I did nothing else, besides updating the system, installing curl and installing Podman.
Describe the results you received:
I could not run the
hello-world
image when usingsudo
and--privileged
.Describe the results you expected:
I want to be able to run the
hello-world
image, even when usingsudo
and--privileged
.Output of
podman version
:Output of
sudo podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Additional environment details (AWS, VirtualBox, physical, etc.):
Has already been described.
The text was updated successfully, but these errors were encountered: