ublue-os / toolboxes

Centralized repository of containers designed for Toolbox/Distrobox
Apache License 2.0
66 stars 14 forks source link

Quadlet examples do not work as is. #128

Open p4p4j0hn opened 5 days ago

p4p4j0hn commented 5 days ago

I copied the bluefin-dx-cli quadlet file to ~/.config/containers/systemd/ and ran systemctl --user daemon-reload. Then I tried starting it and it fails with this error:

[Edit] The bluefin-dx-cli quadlet works just fine.

Log Output ```bash ❯ SYSTEMD_PAGER= systemctl --user status -l bluefin-dx-cli.service × bluefin-dx-cli.service - Bluefin DX CLI for Wolfi development with brew Loaded: loaded (/var/home/john/.config/containers/systemd/bluefin-dx-cli.container; generated) Drop-In: /usr/lib/systemd/user/service.d └─10-timeout-abort.conf Active: failed (Result: core-dump) since Tue 2024-11-26 11:36:39 PST; 3min 5s ago Invocation: 2bb2899563ce44aa9a6ee3207ee23602 Process: 827006 ExecStart=/usr/bin/podman run --name bluefin --cidfile=/run/user/1000/bluefin-dx-cli.cid --replace --rm --cgroups=split --hostname bluefin-dx.lpt-john --ulimit host --network host --sdnotify=conmon -d --user root:root --userns keep-id -v /:/run/host:rslave -v /tmp:/tmp:rslave -v /var/home/john:/var/home/john:rslave -v /dev:/dev:rslave -v /sys:/sys:rslave -v /dev/pts -v /dev/null:/dev/ptmx -v /sys/fs/selinux -v /var/log/journal -v /var/home/john:/var/home/john:rslave -v /run/user/1000:/run/user/1000:rslave -v /etc/hosts:/etc/hosts:ro -v /etc/resolv.conf:/etc/resolv.conf:ro --label io.containers.autoupdate=registry --env HOME=/var/home/john --env SHELL=/bin/bash --env container=podman --label manager=distrobox --annotation run.oci.keep_original_groups=1 --entrypoint /usr/bin/entrypoint --ipc host --pid host --privileged --security-opt label=disable --security-opt apparmor=unconfined ghcr.io/ublue-os/bluefin-dx-cli:latest --verbose --name john --user 1000 --group 1000 --home /var/home/john --init 0 --nvidia 1 -- (code=dumped, signal=ABRT) Process: 827035 ExecStopPost=/usr/bin/podman rm -v -f -i --cidfile=/run/user/1000/bluefin-dx-cli.cid (code=dumped, signal=ABRT) Main PID: 827006 (code=dumped, signal=ABRT) Mem peak: 20.4M CPU: 706ms Nov 26 11:36:38 lpt-john bluefin-dx-cli[827035]: /usr/lib/golang/src/runtime/sigqueue.go:152 +0x29 fp=0xc000073fc0 sp=0xc000073fa0 pc=0x561e50fc0ec9 Nov 26 11:36:38 lpt-john bluefin-dx-cli[827035]: os/signal.loop() Nov 26 11:36:38 lpt-john bluefin-dx-cli[827035]: /usr/lib/golang/src/os/signal/signal_unix.go:23 +0x13 fp=0xc000073fe0 sp=0xc000073fc0 pc=0x561e510b43d3 Nov 26 11:36:38 lpt-john bluefin-dx-cli[827035]: runtime.goexit({}) Nov 26 11:36:38 lpt-john bluefin-dx-cli[827035]: /usr/lib/golang/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000073fe8 sp=0xc000073fe0 pc=0x561e50fc74e1 Nov 26 11:36:38 lpt-john bluefin-dx-cli[827035]: created by os/signal.Notify.func1.1 in goroutine 1 Nov 26 11:36:38 lpt-john bluefin-dx-cli[827035]: /usr/lib/golang/src/os/signal/signal.go:151 +0x1f Nov 26 11:36:39 lpt-john systemd-coredump[827046]: [🡕] Process 827035 (podman) of user 1000 dumped core. Module libbz2.so.1 from rpm bzip2-1.0.8-19.fc41.x86_64 Module libsepol.so.2 from rpm libsepol-3.7-2.fc41.x86_64 Module libpcre2-8.so.0 from rpm pcre2-10.44-1.fc41.1.x86_64 Module libcap-ng.so.0 from rpm libcap-ng-0.8.5-3.fc41.x86_64 Module libgpg-error.so.0 from rpm libgpg-error-1.50-2.fc41.x86_64 Module libpam_misc.so.0 from rpm pam-1.6.1-6.fc41.x86_64 Module libpam.so.0 from rpm pam-1.6.1-6.fc41.x86_64 Module libattr.so.1 from rpm attr-2.5.2-4.fc41.x86_64 Module libacl.so.1 from rpm acl-2.3.2-2.fc41.x86_64 Module libcrypt.so.2 from rpm libxcrypt-4.4.36-10.fc41.x86_64 Module libeconf.so.0 from rpm libeconf-0.6.2-3.fc41.x86_64 Module libsemanage.so.2 from rpm libsemanage-3.7-2.fc41.x86_64 Module libselinux.so.1 from rpm libselinux-3.7-5.fc41.x86_64 Module libaudit.so.1 from rpm audit-4.0.2-1.fc41.x86_64 Module libseccomp.so.2 from rpm libseccomp-2.5.5-2.fc41.x86_64 Module podman from rpm podman-5.3.0-1.fc41.x86_64 Stack trace of thread 827043: #0 0x0000561e50fc8d21 runtime.raise.abi0 (podman + 0x82d21) #1 0x0000561e50f9e6c8 runtime.sigfwdgo (podman + 0x586c8) #2 0x0000561e50f9cf25 runtime.sigtrampgo (podman + 0x56f25) #3 0x0000561e50fc9029 runtime.sigtramp.abi0 (podman + 0x83029) #4 0x00007fc50cdfedd0 __restore_rt (libc.so.6 + 0x19dd0) #5 0x0000561e50fc8d21 runtime.raise.abi0 (podman + 0x82d21) #6 0x0000561e50f84ad3 runtime.fatalpanic (podman + 0x3ead3) #7 0x0000561e50fbea28 runtime.gopanic (podman + 0x78a28) #8 0x0000561e50fc0e19 runtime.sigpanic (podman + 0x7ae19) #9 0x0000561e519a8df7 github.com/containers/storage.(*layerStore).load (podman + 0xa62df7) #10 0x0000561e519aabc5 github.com/containers/storage.(*store).newLayerStore (podman + 0xa64bc5) #11 0x0000561e519bdb9d github.com/containers/storage.(*store).getLayerStoreLocked (podman + 0xa77b9d) #12 0x0000561e519d37e5 github.com/containers/storage.(*store).Shutdown (podman + 0xa8d7e5) #13 0x0000561e52053d9a github.com/containers/podman/v5/libpod.(*Runtime).Shutdown (podman + 0x110dd9a) #14 0x0000561e5210ec1c github.com/containers/podman/v5/pkg/domain/infra/abi.(*ImageEngine).Shutdown.func1 (podman + 0x11c8c1c) #15 0x0000561e50fd4c74 sync.(*Once).doSlow (podman + 0x8ec74) #16 0x0000561e5210ebba github.com/containers/podman/v5/pkg/domain/infra/abi.(*ImageEngine).Shutdown (podman + 0x11c8bba) #17 0x0000561e523278d5 main.Execute (podman + 0x13e18d5) #18 0x0000561e52326ed2 main.main (podman + 0x13e0ed2) #19 0x0000561e50f87bdd runtime.main (podman + 0x41bdd) #20 0x0000561e50fc74e1 runtime.goexit.abi0 (podman + 0x814e1) ELF object binary architecture: AMD x86-64 Nov 26 11:36:39 lpt-john systemd[2673]: bluefin-dx-cli.service: Failed with result 'core-dump'. Nov 26 11:36:39 lpt-john systemd[2673]: Failed to start bluefin-dx-cli.service - Bluefin DX CLI for Wolfi development with brew. ```
p4p4j0hn commented 5 days ago

This specific error was caused by an incomplete layer! podman just wouldn't run correctly. I rolled back and then upgraded again. Bluefin-cli quadlet seems to work ok as is.

I am having an issue with the ubuntu-toolbox-quadlet as well as the fedora-toolbox-quadlet. Here is the status of the ubuntu-toolbox. The fedora-toolbox-quadlet has the exact same error.

I think the main error is this: Error: failed to redirect /etc/resolv.conf to /run/host/etc/resolv.conf: symlink /run/host/etc/resolv.conf /etc/resolv.conf: file exists.

Log Output ```bash ❯ SYSTEMD_PAGER= systemctl --user status -l ubuntu-toolbox-quadlet.service × ubuntu-toolbox-quadlet.service - Ubuntu Toolbox for your toolbox needs Loaded: loaded (/var/home/john/.config/containers/systemd/ubuntu-toolbox-quadlet.container; generated) Drop-In: /usr/lib/systemd/user/service.d └─10-timeout-abort.conf /run/user/1000/systemd/user.control/ubuntu-toolbox-quadlet.service.d └─50-CPUWeight.conf, 50-IOWeight.conf Active: failed (Result: exit-code) since Tue 2024-11-26 13:49:14 PST; 19s ago Duration: 254ms Invocation: 40469379deb24c37aa0a6c6276c2564d Process: 73029 ExecStart=/usr/bin/podman run --name ubuntu-toolbox-quadlet --cidfile=/run/user/1000/ubuntu-toolbox-quadlet.cid --replace --rm --cgroups=split --hostname ubuntu-toolbox-quadlet --ulimit host --network host --sdnotify=conmon -d --user root:root --userns keep-id -v /:/run/host:rslave -v /dev:/dev:rslave -v /run/dbus/system_bus_socket:/run/dbus/system_bus_socket -v /var/home/john:/var/home/john:rslave -v /usr/bin/toolbox:/usr/bin/toolbox:ro -v /run/user/1000:/run/user/1000 -v /run/avahi-daemon/socket:/run/avahi-daemon/socket -v /run/.heim_org.h5l.kcm-socket:/run/.heim_org.h5l.kcm-socket -v /run/pcscd/pcscd.comm:/run/pcscd/pcscd.comm -v /run/media:/run/media:rslave -v /etc/profile.d/toolbox.sh:/etc/profile.d/toolbox.sh:ro --label io.containers.autoupdate=registry --env TOOLBOX_PATH=/usr/bin/toolbox --env XDG_RUNTIME_DIR=/run/user/1000 --mount type=devpts,destination=/dev/pts --cgroupns host --ipc host --label com.github.containers.toolbox=true --no-hosts --pid host --privileged --security-opt label=disable --entrypoint toolbox ghcr.io/ublue-os/ubuntu-toolbox:latest init-container --gid 1000 --home /var/home/john --shell /bin/bash --uid 1000 --user john --home-link --media-link --mnt-link (code=exited, status=1/FAILURE) Process: 73073 ExecStopPost=/usr/bin/podman rm -v -f -i --cidfile=/run/user/1000/ubuntu-toolbox-quadlet.cid (code=exited, status=0/SUCCESS) Main PID: 73029 (code=exited, status=1/FAILURE) Mem peak: 35.6M CPU: 548ms Nov 26 13:49:14 lpt-john podman[73017]: 2024-11-26 13:49:13.93701063 -0800 PST m=+0.081418149 image pull 5c4de208a2e86a2c47111ca0a907b0f3de49a116e3408a0526a923d4e278c705 ghcr.io/ublue-os/ubuntu-toolbox:latest Nov 26 13:49:14 lpt-john podman[73017]: 2024-11-26 13:49:14.159112734 -0800 PST m=+0.303520240 container init 04402245f203b1bb723c72112bfd4380436834b05cd8d846db509977f3e9bdb1 (image=ghcr.io/ublue-os/ubuntu-toolbox:latest, name=ubuntu-toolbox-quadlet, org.opencontainers.image.licenses=Apache-2.0, usage=This image is meant to be used with the toolbox or distrobox command, org.opencontainers.image.url=https://github.com/ublue-os/toolboxes, org.opencontainers.image.description=Centralized repository of containers designed for Toolbox/Distrobox, name=ubuntu-toolbox, io.containers.autoupdate=registry, PODMAN_SYSTEMD_UNIT=ubuntu-toolbox-quadlet.service, io.buildah.version=1.23.1, com.github.containers.toolbox=true, org.opencontainers.image.ref.name=ubuntu, maintainer=jorge.castro@gmail.com, io.artifacthub.package.readme-url=https://raw.githubusercontent.com/ublue-os/boxkit/main/README.md, org.opencontainers.image.source=https://github.com/ublue-os/toolboxes, org.opencontainers.image.revision=b440a2d631fdce94208cfa09939c61553fa0f348, summary=A cloud-native terminal experience powered by Ubuntu, org.opencontainers.image.version=nightly, org.opencontainers.image.created=2024-11-24T22:27:41.965Z, org.opencontainers.image.title=toolboxes) Nov 26 13:49:14 lpt-john podman[73017]: 2024-11-26 13:49:14.168723573 -0800 PST m=+0.313131076 container start 04402245f203b1bb723c72112bfd4380436834b05cd8d846db509977f3e9bdb1 (image=ghcr.io/ublue-os/ubuntu-toolbox:latest, name=ubuntu-toolbox-quadlet, org.opencontainers.image.licenses=Apache-2.0, org.opencontainers.image.version=nightly, com.github.containers.toolbox=true, name=ubuntu-toolbox, org.opencontainers.image.revision=b440a2d631fdce94208cfa09939c61553fa0f348, summary=A cloud-native terminal experience powered by Ubuntu, maintainer=jorge.castro@gmail.com, io.buildah.version=1.23.1, org.opencontainers.image.description=Centralized repository of containers designed for Toolbox/Distrobox, org.opencontainers.image.source=https://github.com/ublue-os/toolboxes, org.opencontainers.image.created=2024-11-24T22:27:41.965Z, usage=This image is meant to be used with the toolbox or distrobox command, io.artifacthub.package.readme-url=https://raw.githubusercontent.com/ublue-os/boxkit/main/README.md, org.opencontainers.image.url=https://github.com/ublue-os/toolboxes, org.opencontainers.image.ref.name=ubuntu, org.opencontainers.image.title=toolboxes, io.containers.autoupdate=registry, PODMAN_SYSTEMD_UNIT=ubuntu-toolbox-quadlet.service) Nov 26 13:49:14 lpt-john systemd[2739]: Started ubuntu-toolbox-quadlet.service - Ubuntu Toolbox for your toolbox needs. Nov 26 13:49:14 lpt-john ubuntu-toolbox-quadlet[73017]: 04402245f203b1bb723c72112bfd4380436834b05cd8d846db509977f3e9bdb1 Nov 26 13:49:14 lpt-john ubuntu-toolbox-quadlet[73029]: Error: failed to redirect /etc/resolv.conf to /run/host/etc/resolv.conf: symlink /run/host/etc/resolv.conf /etc/resolv.conf: file exists Nov 26 13:49:14 lpt-john podman[73051]: 2024-11-26 13:49:14.294300905 -0800 PST m=+0.058381490 container died 04402245f203b1bb723c72112bfd4380436834b05cd8d846db509977f3e9bdb1 (image=ghcr.io/ublue-os/ubuntu-toolbox:latest, name=ubuntu-toolbox-quadlet, maintainer=jorge.castro@gmail.com, org.opencontainers.image.description=Centralized repository of containers designed for Toolbox/Distrobox, org.opencontainers.image.url=https://github.com/ublue-os/toolboxes, org.opencontainers.image.created=2024-11-24T22:27:41.965Z, org.opencontainers.image.title=toolboxes, io.containers.autoupdate=registry, name=ubuntu-toolbox, org.opencontainers.image.revision=b440a2d631fdce94208cfa09939c61553fa0f348, io.artifacthub.package.readme-url=https://raw.githubusercontent.com/ublue-os/boxkit/main/README.md, org.opencontainers.image.licenses=Apache-2.0, usage=This image is meant to be used with the toolbox or distrobox command, summary=A cloud-native terminal experience powered by Ubuntu, io.buildah.version=1.23.1, org.opencontainers.image.source=https://github.com/ublue-os/toolboxes, com.github.containers.toolbox=true, org.opencontainers.image.ref.name=ubuntu, org.opencontainers.image.version=nightly, PODMAN_SYSTEMD_UNIT=ubuntu-toolbox-quadlet.service) Nov 26 13:49:14 lpt-john podman[73051]: 2024-11-26 13:49:14.416106022 -0800 PST m=+0.180186600 container remove 04402245f203b1bb723c72112bfd4380436834b05cd8d846db509977f3e9bdb1 (image=ghcr.io/ublue-os/ubuntu-toolbox:latest, name=ubuntu-toolbox-quadlet, maintainer=jorge.castro@gmail.com, org.opencontainers.image.licenses=Apache-2.0, io.buildah.version=1.23.1, org.opencontainers.image.description=Centralized repository of containers designed for Toolbox/Distrobox, org.opencontainers.image.version=nightly, io.artifacthub.package.readme-url=https://raw.githubusercontent.com/ublue-os/boxkit/main/README.md, org.opencontainers.image.created=2024-11-24T22:27:41.965Z, com.github.containers.toolbox=true, org.opencontainers.image.revision=b440a2d631fdce94208cfa09939c61553fa0f348, PODMAN_SYSTEMD_UNIT=ubuntu-toolbox-quadlet.service, summary=A cloud-native terminal experience powered by Ubuntu, org.opencontainers.image.title=toolboxes, io.containers.autoupdate=registry, org.opencontainers.image.ref.name=ubuntu, org.opencontainers.image.url=https://github.com/ublue-os/toolboxes, usage=This image is meant to be used with the toolbox or distrobox command, org.opencontainers.image.source=https://github.com/ublue-os/toolboxes, name=ubuntu-toolbox) Nov 26 13:49:14 lpt-john systemd[2739]: ubuntu-toolbox-quadlet.service: Main process exited, code=exited, status=1/FAILURE Nov 26 13:49:14 lpt-john systemd[2739]: ubuntu-toolbox-quadlet.service: Failed with result 'exit-code'. ```