-
Notifications
You must be signed in to change notification settings - Fork 29
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
Cannot stop containers, "permission denied" #36
Comments
hey @niemeyer do you see any system denials when this happens? |
@anonymouse64 Hey Ian, It's pretty much a translation of the above error message:
|
this to me suggests that the dockerd patch to allow receiving signals from dockerd to docker-default is ineffective or needs to be expanded upon @tianon thoughts on this? |
I tried reproducing this with the ubuntu:latest container on both a focal and groovy host and neither failed for me to stop the container with the version of the docker snap in stable |
This sounds like it could be the old old issue about having the wrong version of docker-default profile loaded on the system so dockerd doesn't load it's patched version, see docker-archive/docker-snap#5 and docker-archive/docker-snap#4. |
Oh interesting, yeah, before I got to your latest comment my first thought was that this sounds like the profile isn't getting loaded or isn't loaded properly -- I think moby/moby#41954 is probably relevant in that regard too. I think we might actually be safer to apply that patch unilaterally than upstream is since we have tighter control on the profiles folks use? (or at least users trying to customize that will run into more issues with Docker-in-Snap vs Docker-on-Host hence it likely discourages them better I'm not super AppArmor savvy, but is there a way we can force AppArmor to unload that profile such that restarting (I suppose the other question is whether @niemeyer can reproduce reliably or just sporadically 😄) |
Indeed, it's the same issue. I fixed the situation by removing the flag file: sudo rm /var/snap/docker/common/profile_reloaded ... and then restarting Docker. It's awkward that this was required, though, so doesn't feel like the end of the story. I haven't reinstalled docker recently, so can't see how that profile was loaded despite the fix/hack to workaround the situation being applied. In either case, it's clear that the solution to the original workaround may be required more than once, so maybe we should not be using a flag file for this. |
@tianon well we could just modify the dockerd-wrapper to just always load it with something like this instead: workaround_apparmor_profile_reload() {
# https://github.com/docker/docker-snap/issues/4
local aa_count
if aa_count="$(grep -c 'docker-default (enforce)' /sys/kernel/security/apparmor/profiles)" && [ -n "$aa_count" ] && [ "$aa_count" -ge 1 ]; then
export DOCKER_AA_RELOAD=1
fi
} I'm not sure if that has any ramifications though, AFAICT it would just cause dockerd to reload the profile which shouldn't affect anything currently running with that profile adversely since those profiles since we would always be reloading to use a more correct profile |
This comment was marked as spam.
This comment was marked as spam.
Running into this error too while doing some experiments with docker compose inside a snap.
And also on the host:
Snappy debug:
Docker version (AMD64):
One can manually kill it:
Doing this seems to fix it for me too, for now... |
Three years on, I can reproduce this on fresh install of Ubuntu 24.04.1 LTS, with |
Hello all,
I've had this issue a few times now:
Any ideas?
The text was updated successfully, but these errors were encountered: