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

Docker tests failed with permission denied error #1514

Open
zongminl opened this issue Sep 30, 2024 · 1 comment
Open

Docker tests failed with permission denied error #1514

zongminl opened this issue Sep 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@zongminl
Copy link
Collaborator

zongminl commented Sep 30, 2024

Bug Description

There are 2 docker related tests failed with permission denied error, which are: docker/export-and-import_{arch} and docker/save-and-load_{arch}

It's confirmed that both of the tests can be successfully executed manually outside of checkbox, but they will fail with permission denied error when being executed by testing with checkbox snap.

This problem can only be reproduced when docker snap is installed on the DUT, using a deb version of docker (docker.io and docker-compose) this problem is not observed.

To Reproduce

  1. Install checkbox snaps
$ sudo snap install checkbox22 --beta
$ sudo snap install checkbox --channel=22.04/beta --classic
  1. Execute checkbox tests
    $ checkbox.checkbox-cli run com.canonical.certification::docker_resource com.canonical.certification::docker/export-and-import_arm64 com.canonical.certification::docker/save-and-load_arm64

Environment

  • OS: Ubuntu Classic (both of desktop and server can reproduce)
  • Checkbox type: snap
  • Checkbox version: 4.2.0.dev82

Relevant log output

Test result with docker snap

=========[ Running job 2 / 3. Estimated time left (at least): 0:00:00 ]=========
--------------[ Test docker import and export a docker container ]--------------
ID: com.canonical.certification::docker/export-and-import_arm64
Category: com.canonical.certification::docker
... 8< -------------------------------------------------------------------------
write /dev/stdout: permission denied
------------------------------------------------------------------------- >8 ---
Outcome: job failed
=========[ Running job 3 / 3. Estimated time left (at least): 0:00:00 ]=========
------------------[ Test docker save and load a docker image ]------------------
ID: com.canonical.certification::docker/save-and-load_arm64
Category: com.canonical.certification::docker
... 8< -------------------------------------------------------------------------
Using default tag: latest
latest: Pulling from library/ubuntu
Digest: sha256:dfc10878be8d8fc9c61cbff33166cb1d1fe44391539243703c72766894fa834a
Status: Image is up to date for ubuntu:latest
docker.io/library/ubuntu:latest
write /dev/stdout: permission denied
------------------------------------------------------------------------- >8 ---
Outcome: job failed
Finalizing session that hasn't been submitted anywhere: checkbox-run-2024-09-30T04.34.20
==================================[ Results ]===================================
 ☑ : Configure docker jobs
 ☑ : Enumerate available system executables
 ☒ : Test docker import and export a docker container
 ☒ : Test docker save and load a docker image

Test result with docker deb packages (docker.io and docker-compose)

=========[ Running job 2 / 3. Estimated time left (at least): 0:00:00 ]=========
--------------[ Test docker import and export a docker container ]--------------
ID: com.canonical.certification::docker/export-and-import_arm64
Category: com.canonical.certification::docker
... 8< -------------------------------------------------------------------------
sha256:115cab9d523de75aeb317fbd97de03d779fb5563124886f7d2e13f4972025338
plainbox/ubuntu         v1.0      115cab9d523d   Less than a second ago   101MB
102ceda73b89ef6a763b23480fced7b08a29634142d291765d264057bfc84c2e
Untagged: plainbox/ubuntu:v1.0
Deleted: sha256:115cab9d523de75aeb317fbd97de03d779fb5563124886f7d2e13f4972025338
Deleted: sha256:aaa3f20569ab06659bacb6662bad77be3e4d9ff5d38309029fb3f688893fed44
------------------------------------------------------------------------- >8 ---
Outcome: job passed
=========[ Running job 3 / 3. Estimated time left (at least): 0:00:00 ]=========
------------------[ Test docker save and load a docker image ]------------------
ID: com.canonical.certification::docker/save-and-load_arm64
Category: com.canonical.certification::docker
... 8< -------------------------------------------------------------------------
Using default tag: latest
latest: Pulling from library/ubuntu
Digest: sha256:dfc10878be8d8fc9c61cbff33166cb1d1fe44391539243703c72766894fa834a
Status: Image is up to date for ubuntu:latest
docker.io/library/ubuntu:latest
Loaded image: ubuntu:latest
ubuntu                  latest    2b1b17d5e5a2   4 weeks ago     101MB
localhost:5000/ubuntu   latest    2b1b17d5e5a2   4 weeks ago     101MB
------------------------------------------------------------------------- >8 ---
Outcome: job passed
Finalizing session that hasn't been submitted anywhere: checkbox-run-2024-09-30T04.26.06
==================================[ Results ]===================================
 ☑ : Configure docker jobs
 ☑ : Enumerate available system executables
 ☑ : Test docker import and export a docker container
 ☑ : Test docker save and load a docker image

Additional context

This problem is reproducible on both ARM64 and AMD64 arch.
There's no such problem when running with the following scenarios:

  1. Run the docker tests on Ubuntu Core
  2. Installing core confinement checkbox snap on Ubuntu Classic image and execute docker tests
@zongminl zongminl added the bug Something isn't working label Sep 30, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CHECKBOX-1596.

This message was autogenerated

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

No branches or pull requests

1 participant