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

Subsystem creation failure reports success #391

Closed
jardon opened this issue Aug 20, 2024 · 4 comments
Closed

Subsystem creation failure reports success #391

jardon opened this issue Aug 20, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@jardon
Copy link
Member

jardon commented Aug 20, 2024

I tried to create a subsystem based on ubuntu:jammy which gave a resource denied error. apx reports a successful creation despite a previous error.

jardon@apx-vso-pico:~$ apx --version
apx version v2.4.3
jardon@apx-vso-pico:~$ apx stacks show "ubuntu jammy"
┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼
┊ Name            ┊ ubuntu jammy ┊
┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼
┊ Base            ┊ ubuntu:jammy ┊
┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼
┊ Packages        ┊              ┊
┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼
┊ Package manager ┊ apt          ┊
┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼
jardon@apx-vso-pico:~$ apx subsystems new
 INFO  Choose a name:
waydroid-builder
 INFO  Available stacks:
1. ubuntu jammy
2. alpine
3. arch
4. fedora
5. opensuse
6. ubuntu
7. vanilla-dev
8. vanilla
 INFO  Select a stack [1-8]:
1
▀  Creating subsystem 'waydroid-builder' with stack 'ubuntu jammy'… (0s)Trying to pull docker.io/library/ubuntu:jammy...
 ▄ Creating subsystem 'waydroid-builder' with stack 'ubuntu jammy'… (1s)Getting image source signatures
Copying blob 857cc8cb19c0 skipped: already exists  
Copying config 53a843653c done   | 
Writing manifest to image destination
53a843653cbcd9e10be207e951d907dc2481d9c222de57d24cfcac32e5165188
▄  Creating subsystem 'waydroid-builder' with stack 'ubuntu jammy'… (1s)Resolving "jammy" using unqualified-search registries (/etc/containers/registries.conf)
Trying to pull docker.io/library/jammy:latest...
 ▄ Creating subsystem 'waydroid-builder' with stack 'ubuntu jammy'… (2s)Error: initializing source docker://jammy:latest: reading manifest latest in docker.io/library/jammy: requested access to the resource is denied
 [ ERR ]
 SUCCESS  Created subsystem 'waydroid-builder'.
@mirkobrombin mirkobrombin added this to the 2-after-stable milestone Aug 20, 2024
@mirkobrombin mirkobrombin moved this to Todo in 2 - Orchid Aug 20, 2024
@mirkobrombin mirkobrombin added the bug Something isn't working label Aug 20, 2024
@jardon
Copy link
Member Author

jardon commented Aug 21, 2024

After further inspection it appears to be an issue with distrobox (1.7.2.0).

/usr/share/apx/distrobox/distrobox create --additional-flags --label=name=test --label=nvidia=true --label=stack=ubuntu jammy --label=manager=apx --image docker.io/library/ubuntu:jammy --name apx-test --no-entry --yes --pull --nvidia does not succeed, but does not return an error for handling.

jardon@lagann:~/Projects/apx$ APX_VERBOSE=1 ./apx subsystems new
Runing a command:
	Command: /usr/bin/podman ps -a --format {{.ID}}|{{.CreatedAt}}|{{.Status}}|{{.Labels}}|{{.Names}}
	captureOutput: true
	muteOutput: false
	rootFull: false
	detachedMode: false
 INFO  Choose a name:
test
 INFO  Available stacks:
1. ubuntu jammy
2. alpine
3. arch
4. fedora
5. opensuse
6. ubuntu
7. vanilla-dev
8. vanilla
 INFO  Select a stack [1-8]:
1
Runing a command:
	Command: /usr/bin/podman ps -a --format {{.ID}}|{{.CreatedAt}}|{{.Status}}|{{.Labels}}|{{.Names}}
	captureOutput: true
	muteOutput: false
	rootFull: false
	detachedMode: false
▀  Creating subsystem 'test' with stack 'ubuntu jammy'… (0s)Runing a command:
	Command: /usr/share/apx/distrobox/distrobox create --additional-flags --label=name=test --label=nvidia=true --label=stack=ubuntu jammy --label=manager=apx --image docker.io/library/ubuntu:jammy --name apx-test --no-entry --yes --pull --nvidia
	captureOutput: false
	muteOutput: false
	rootFull: false
	detachedMode: false
Trying to pull docker.io/library/ubuntu:jammy...
▄  Creating subsystem 'test' with stack 'ubuntu jammy'… (1s)Getting image source signatures
Copying blob 857cc8cb19c0 skipped: already exists  
Copying config 53a843653c done   | 
Writing manifest to image destination
53a843653cbcd9e10be207e951d907dc2481d9c222de57d24cfcac32e5165188
Creating 'apx-test' using image docker.io/library/ubuntu:jammy	Resolving "jammy" using unqualified-search registries (/etc/containers/registries.conf)
Trying to pull docker.io/library/jammy:latest...
▀  Creating subsystem 'test' with stack 'ubuntu jammy'… (2s)Error: initializing source docker://jammy:latest: reading manifest latest in docker.io/library/jammy: requested access to the resource is denied
 [ ERR ]
ERROR HERE: %s <nil>
ERROR HERE: %s <nil>

Running the command outside of apx gives the same result and proves the error is not handled correctly.

jardon@lagann:~/Projects/apx$ /usr/share/apx/distrobox/distrobox create --additional-flags    jammy  --image docker.io/library/ubuntu:jammy --name apx-test --no-entry --yes --pull 
Trying to pull docker.io/library/ubuntu:jammy...
Getting image source signatures
Copying blob 857cc8cb19c0 skipped: already exists  
Copying config 53a843653c done   | 
Writing manifest to image destination
53a843653cbcd9e10be207e951d907dc2481d9c222de57d24cfcac32e5165188
Creating 'apx-test' using image docker.io/library/ubuntu:jammy	Resolving "jammy" using unqualified-search registries (/etc/containers/registries.conf)
Trying to pull docker.io/library/jammy:latest...
Error: initializing source docker://jammy:latest: reading manifest latest in docker.io/library/jammy: requested access to the resource is denied
 [ ERR ]
jardon@lagann:~/Projects/apx$ echo $?
0

@jardon
Copy link
Member Author

jardon commented Aug 21, 2024

Also, it appears that the image was created in podman successfully.

jardon@lagann:~/Projects/apx$ podman image list
REPOSITORY                         TAG         IMAGE ID      CREATED      SIZE
registry.fedoraproject.org/fedora  latest      184191c01257  5 days ago   467 MB
docker.io/library/ubuntu           latest      edbfe74c41f8  2 weeks ago  161 MB
ghcr.io/vanilla-os/vso             main        4cd82a4c8424  3 weeks ago  1.29 GB
jardon@lagann:~/Projects/apx$ /usr/share/apx/distrobox/distrobox create --additional-flags    jammy  --image docker.io/library/ubuntu:jammy --name apx-test --no-entry --yes --pull 
Trying to pull docker.io/library/ubuntu:jammy...
Getting image source signatures
Copying blob 857cc8cb19c0 done   | 
Copying config 53a843653c done   | 
Writing manifest to image destination
53a843653cbcd9e10be207e951d907dc2481d9c222de57d24cfcac32e5165188
Creating 'apx-test' using image docker.io/library/ubuntu:jammy	Resolving "jammy" using unqualified-search registries (/etc/containers/registries.conf)
Trying to pull docker.io/library/jammy:latest...
Error: initializing source docker://jammy:latest: reading manifest latest in docker.io/library/jammy: requested access to the resource is denied
 [ ERR ]
jardon@lagann:~/Projects/apx$ podman image list
REPOSITORY                         TAG         IMAGE ID      CREATED      SIZE
registry.fedoraproject.org/fedora  latest      184191c01257  5 days ago   467 MB
docker.io/library/ubuntu           jammy       53a843653cbc  8 days ago   80.4 MB
docker.io/library/ubuntu           latest      edbfe74c41f8  2 weeks ago  161 MB
ghcr.io/vanilla-os/vso             main        4cd82a4c8424  3 weeks ago  1.29 GB

@jardon
Copy link
Member Author

jardon commented Aug 21, 2024

After further inspection, the source of the issue has to do with podman, but the error is not caught by distrobox. I believe the issue lies here

@jardon
Copy link
Member Author

jardon commented Aug 21, 2024

The issue was from a mislabelling as reported here. You can see in the distrobox command above that "jammy" was separated from the stack label incorrectly.

The error doesnt seem to be handled correctly by distrobox as it returns a 0 despite podman failing. Closing for the time being.

@jardon jardon closed this as completed Aug 21, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in 2 - Orchid Aug 21, 2024
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
Status: Done
Development

No branches or pull requests

2 participants