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

Package "docker-binfmt" breaks "torizon-core-podman" builds #18

Open
leograba opened this issue Jan 3, 2024 · 1 comment
Open

Package "docker-binfmt" breaks "torizon-core-podman" builds #18

leograba opened this issue Jan 3, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@leograba
Copy link
Contributor

leograba commented Jan 3, 2024

The following error happens when trying to build torizon-core-podman for the machine qemu86-64:

ERROR: torizon-core-podman-1.0-r0 do_rootfs: Unable to install packages. Command '/home/leonardo/projects/commontorizon-builds/build-torizon-upstream/tmp/work/qemux86_64-tdx-linux/torizon-core-podman/1.0-r0/recipe-sysroot-native/usr/bin/opkg --volatile-cache -f /home/leonardo/projects/commontorizon-builds/build-torizon-upstream/tmp/work/qemux86_64-tdx-linux/torizon-core-podman/1.0-r0/opkg.conf -t /home/leonardo/projects/commontorizon-builds/build-torizon-upstream/tmp/work/qemux86_64-tdx-linux/torizon-core-podman/1.0-r0/temp/ipktemp/ -o /home/leonardo/projects/commontorizon-builds/build-torizon-upstream/tmp/work/qemux86_64-tdx-linux/torizon-core-podman/1.0-r0/rootfs  --force_postinstall --prefer-arch-to-version   install aardvark-dns aktualizr aktualizr-info aktualizr-shared-prov auto-provisioning cpufrequtils curl docker-auto-prune docker-binfmt docker-compose docker-compose-up docker-integrity-checker docker-watchdog ethtool evtest fluent-bit fuse-overlayfs htop i2c-tools iproute2 iproute2-ip jq kernel-devsrc kernel-modules ldd less libpwquality mmc-utils nano neofetch netavark network-configuration nss-altfiles openssh-sftp-server os-release ostree ostree-customize-plymouth ostree-devicetree-overlays ostree-initramfs ostree-kernel packagegroup-base-extended packagegroup-core-boot packagegroup-core-full-cmdline-multiuser packagegroup-core-full-cmdline-utils packagegroup-core-ssh-openssh plymouth podman provision-device rac resize-helper rsync run-postinsts sshfs-fuse sudo systemd-analyze tdx-info torizon-conf torizon-users tzdata udev-toradex-rules usermount vim-tiny wireguard-tools zram' returned 1:
 * Solver encountered 1 problem(s):
 * Problem 1/1:
 *   - package podman-4.8.2+git-r0.core2-64 conflicts with docker provided by docker-ce-20.10.25-ce+git791d8ab87747169b4cbfcdf2fd57c81952bae6d5-r0.core2-64
 *   - package docker-binfmt-0.1-r0.all requires docker, but none of the providers can be installed
 *   - conflicting requests
 *   - conflicting requests
 * 
 * Solution 1:
 *   - do not ask to install a package providing podman

 * Solution 2:
 *   - do not ask to install a package providing docker-binfmt




ERROR: Logfile of failure stored in: /home/leonardo/projects/commontorizon-builds/build-torizon-upstream/tmp/work/qemux86_64-tdx-linux/torizon-core-podman/1.0-r0/temp/log.do_rootfs.3164891
ERROR: Task (/home/leonardo/projects/commontorizon-builds/build-torizon-upstream/conf/../../layers/meta-common-torizon/recipes-images/images/torizon-core-podman.bb:do_rootfs) failed with exit code '1'
@leograba
Copy link
Contributor Author

leograba commented Jan 3, 2024

I suspect it happens due to the dependency of docker-binfmt on Docker:

RDEPENDS:${PN} += " bash docker"

One possible alternative would be to use VIRTUAL-RUNTIME_container_engine instead:

RDEPENDS:${PN} += " bash ${VIRTUAL-RUNTIME_container_engine}"

This is possible due to such variable being set on the images:

layers$ grep -nrie "VIRTUAL-RUNTIME_container" .
./meta-common-torizon/recipes-images/images/torizon-core-container.inc:2:    ${VIRTUAL-RUNTIME_container_engine} \
./meta-common-torizon/recipes-images/images/torizon-core-podman.bb:8:VIRTUAL-RUNTIME_container_engine = "podman"
./meta-common-torizon/recipes-images/images/torizon-core-docker.bb:7:VIRTUAL-RUNTIME_container_engine = "docker-ce"

Even though the package depends on the systemd docker.service, it might work. Inspecting a device with torizon-core-podman, there is a symlink:

root@verdin-imx8mm-07276363:/var/rootdirs/home/torizon# ls -l /etc/systemd/system/docker.service
lrwxrwxrwx 1 root root 38 Dec 27 00:17 /etc/systemd/system/docker.service -> /usr/lib/systemd/system/podman.service
root@verdin-imx8mm-07276363:/var/rootdirs/home/torizon# ls -l /usr/etc/systemd/system/docker.service
lrwxrwxrwx 5 root root 38 Dec 20 11:01 /usr/etc/systemd/system/docker.service -> /usr/lib/systemd/system/podman.service
root@verdin-imx8mm-07276363:/var/rootdirs/home/torizon# systemctl status docker.service
● podman.service - Podman API Service
     Loaded: loaded (/usr/lib/systemd/system/podman.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2024-01-03 20:57:47 UTC; 53min ago
TriggeredBy: ● podman.socket
       Docs: man:podman-system-service(1)
   Main PID: 639 (podman)
      Tasks: 10 (limit: 1740)
     Memory: 84.4M
     CGroup: /system.slice/podman.service
             └─ 639 /usr/bin/podman --log-level=info system service -t 0

Jan 03 20:57:51 verdin-imx8mm-07276363 podman[639]: 2024-01-03 20:57:51.788971125 +0000 UTC m=+4.033118001 container init 342fbcfaf20157a647f5a69deccd43500a23492902b83274c5e8105bb694a8cf (image=docker.io/leograba/torizon>
Jan 03 20:57:51 verdin-imx8mm-07276363 podman[639]: 2024-01-03 20:57:51.826243125 +0000 UTC m=+4.070389876 container start 342fbcfaf20157a647f5a69deccd43500a23492902b83274c5e8105bb694a8cf (image=docker.io/leograba/torizo>
Jan 03 20:57:51 verdin-imx8mm-07276363 podman[639]: @ - - [03/Jan/2024:20:57:51 +0000] "POST /v1.41/containers/342fbcfaf20157a647f5a69deccd43500a23492902b83274c5e8105bb694a8cf/start HTTP/1.1" 204 0 "" "Docker-Client/unkn>
Jan 03 20:57:51 verdin-imx8mm-07276363 podman[1170]: [INFO  netavark::firewall] Using iptables firewall driver
Jan 03 20:57:51 verdin-imx8mm-07276363 podman[1170]: [INFO  netavark::network::netlink] Adding route (dest: 0.0.0.0/0 ,gw: 10.89.0.1, metric 100)
Jan 03 20:57:52 verdin-imx8mm-07276363 podman[639]: time="2024-01-03T20:57:52Z" level=info msg="Running conmon under slice machine.slice and unitName libpod-conmon-9b09b187b7d3583c01973e395040d9dadfcea598983ec1b8313c5c0e>
Jan 03 20:57:52 verdin-imx8mm-07276363 podman[639]: time="2024-01-03T20:57:52Z" level=info msg="Got Conmon PID as 1217"

I didn't test this, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants