Skip to content
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

Smoke test Hello World (journald) fails on Noble. #181

Open
locnnil opened this issue Sep 6, 2024 · 1 comment
Open

Smoke test Hello World (journald) fails on Noble. #181

locnnil opened this issue Sep 6, 2024 · 1 comment
Assignees
Labels
bug Something isn't working CI Continuous integration

Comments

@locnnil
Copy link
Contributor

locnnil commented Sep 6, 2024

The smoke-test:

- name: Hello World (journald)
run: |
trap 'echo "error, sad day ($?)"; sleep 1; sudo snap logs -n=20 docker.dockerd; sleep 1; sudo tail -n20 /var/log/*.log; sudo dmesg | tail -n20; sudo journalctl --no-pager | grep DENIED | grep docker' ERR
expectedOutput="testing-journald-log-driver-$RANDOM-$RANDOM"
sudo docker run --name test-journald --log-driver journald bash -c 'echo "$@"' -- "$expectedOutput"
actualOutput="$(sudo docker logs test-journald)"
[ "$actualOutput" = "$expectedOutput" ]
docker rm test-journald

Fails when running on Noble (but not on Focal and Jammy), as shown here:

Docker Snap v24.0.5:
https://github.com/canonical/docker-snap/actions/runs/10738846000

[  210.260771] eth0: renamed from vethfac58ea
[  210.277728] docker0: port 1(vethf07816c) entered blocking state
[  210.277734] docker0: port 1(vethf07816c) entered forwarding state
[  210.333867] vethfac58ea: renamed from eth0
[  210.344540] docker0: port 1(vethf07816c) entered disabled state
[  210.35[222](https://github.com/canonical/docker-snap/actions/runs/10738846000/job/29783725594#step:10:223)0] docker0: port 1(vethf07816c) entered disabled state
[  210.352923] vethf07816c (unregistering): left allmulticast mode
[  210.352928] vethf07816c (unregistering): left promiscuous mode
[  210.352932] docker0: port 1(vethf07816c) entered disabled state
Sep 06 13:10:55 fv-az1693-731 kernel: audit: type=1400 audit(1725628255.588:263): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.docker.dockerd" pid=5269 comm="ps" requested_mask="read" denied_mask="read" peer="/usr/sbin/haveged"
Sep 06 13:10:55 fv-az1693-731 kernel: audit: type=1400 audit(1725628255.590:264): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.docker.dockerd" pid=5269 comm="ps" requested_mask="read" denied_mask="read" peer="rsyslogd"
Sep 06 13:10:55 fv-az1693-731 kernel: audit: type=1400 audit(1725628255.591:265): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.docker.dockerd" pid=5269 comm="ps" requested_mask="read" denied_mask="read" peer="/usr/sbin/chronyd"
Sep 06 13:10:55 fv-az1693-731 kernel: audit: type=1400 audit(1725628255.591:266): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.docker.dockerd" pid=5269 comm="ps" requested_mask="read" denied_mask="read" peer="/usr/sbin/chronyd"
Sep 06 13:10:58 fv-az1693-731 kernel: audit: type=1400 audit(1725628258.948:268): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.docker.dockerd" pid=5590 comm="ps" requested_mask="read" denied_mask="read" peer="/usr/sbin/haveged"
Sep 06 13:10:58 fv-az1693-731 kernel: audit: type=1400 audit(1725628258.950:269): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.docker.dockerd" pid=5590 comm="ps" requested_mask="read" denied_mask="read" peer="rsyslogd"
Sep 06 13:10:58 fv-az1693-731 kernel: audit: type=1400 audit(1725628258.950:270): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.docker.dockerd" pid=5590 comm="ps" requested_mask="read" denied_mask="read" peer="/usr/sbin/chronyd"
Sep 06 13:10:58 fv-az1693-731 kernel: audit: type=1400 audit(1725628258.951:271): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.docker.dockerd" pid=5590 comm="ps" requested_mask="read" denied_mask="read" peer="/usr/sbin/chronyd"
Sep 06 13:11:01 fv-az1693-731 kernel: audit: type=1400 audit(1725628261.245:273): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.docker.dockerd" pid=5713 comm="ps" requested_mask="read" denied_mask="read" peer="/usr/sbin/haveged"
Sep 06 13:11:01 fv-az1693-731 kernel: audit: type=1400 audit(1725628261.247:274): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.docker.dockerd" pid=5713 comm="ps" requested_mask="read" denied_mask="read" peer="rsyslogd"
Sep 06 13:11:01 fv-az1693-731 kernel: audit: type=1400 audit(1725628261.248:275): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.docker.dockerd" pid=5713 comm="ps" requested_mask="read" denied_mask="read" peer="/usr/sbin/chronyd"
Sep 06 13:11:01 fv-az1693-731 kernel: audit: type=1400 audit(1725628261.248:276): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.docker.dockerd" pid=5713 comm="ps" requested_mask="read" denied_mask="read" peer="/usr/sbin/chronyd"
Error: Process completed with exit code 1.

Docker Snap v27.2.0 :
https://github.com/canonical/docker-snap/actions/runs/10742009176

@locnnil locnnil changed the title App Armor denials on Smoke test Hello World (journald) on Noble. Smoke test Hello World (journald) fails on Noble. Sep 6, 2024
@locnnil locnnil added the bug Something isn't working label Sep 6, 2024
@locnnil locnnil added the CI Continuous integration label Oct 8, 2024
@locnnil locnnil self-assigned this Oct 8, 2024
@farshidtz
Copy link
Member

I noticed that docker:log-observe isn't connected here:

# normally, snap does this automatically during install, but not when we install from a local file (for security)
sudo snap connect docker:docker-cli docker:docker-daemon
sudo snap connect docker:firewall-control :firewall-control
sudo snap connect docker:home :home
sudo snap connect docker:network-control :network-control
sudo snap connect docker:support :docker-support
sudo snap connect docker:privileged :docker-support

It might be related to this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CI Continuous integration
Projects
None yet
Development

No branches or pull requests

2 participants