Docker-Compose extension: Failed to read metadata [...] No medium found
Closed this issue · 2 comments
Description
Docker-compose sysext is not recognized by the systemd-sysext and thus we can't use it.
Impact
Systemd-sysext can't start and the other extensions aren't mounted/read.
Environment and steps to reproduce
- Set-up: I'm using a stable flatcar that I got from
https://stable.release.flatcar-linux.net/amd64-usr/current/flatcar_production_qemu_image.img
with the following butane config:
variant: flatcar
version: 1.0.0
kernel_arguments:
should_not_exist:
- flatcar.autologin
passwd:
users:
- name: core
ssh_authorized_keys:
- "ssh-ed25519 ...."
systemd:
units:
- name: locksmithd.service
enabled: true
storage:
files:
- path: /etc/flatcar/update.conf
overwrite: true
contents:
inline: |
REBOOT_STRATEGY=reboot
LOCKSMITHD_REBOOT_WINDOW_START="Sun 4:00"
LOCKSMITHD_REBOOT_WINDOW_LENGTH=1h
mode: 0644
- path: /etc/extensions/docker-compose.raw
contents:
source: https://github.com/flatcar/sysext-bakery/releases/download/latest/docker_compose-2.24.5-x86_64.raw
-
Task: Create a flatcar VM using a butane configuration transpiled to ignition;
-
Action(s):
a. Create the VM with the fw_cfg configuration on libvirt;
b. SSH into the VM;
c. Check systemd-sysext status withsystemctl status systemd-sysext
command;
d. Verify the docker-compose extension with the commandsystem-dissec /etc/extensions/docker-compose.raw
-
Error: systemd-sysext nor systemd-dissect can use the image.
Also, systemd-ext doesn't mount the other extensions.
Expected behavior
Docker-compose sysext should identified as an extension by systemd-sysext and systemd-dissect and we should be able to use it with docker.
Additional information
I tried to generate the raw image using the scripts on this repo and had the same result.
Hi, the name on disk must be /etc/extensions/docker_compose.raw
as in https://github.com/flatcar/sysext-bakery/releases/download/latest/docker_compose.conf
Instead of only downloading a particular version, I would rather recommend you to set up sysupdate which not only updates the extension but also can set it up correctly if you do an initial run.
This example in https://github.com/flatcar/sysext-bakery?tab=readme-ov-file#consuming-the-published-images doesn't have docker-compose but if you adapt the wasmtime parts it would look like this:
variant: flatcar
version: 1.0.0
storage:
files:
- path: /opt/extensions/docker_compose/docker_compose-2.24.5-x86-64.raw
contents:
source: https://github.com/flatcar/sysext-bakery/releases/download/latest/docker_compose-2.24.5-x86-64.raw
- path: /etc/sysupdate.d/noop.conf
contents:
source: https://github.com/flatcar/sysext-bakery/releases/download/latest/noop.conf
- path: /etc/sysupdate.docker_compose.d/docker_compose.conf
contents:
source: https://github.com/flatcar/sysext-bakery/releases/download/latest/docker_compose.conf
links:
- target: /opt/extensions/docker_compose/docker_compose-2.24.5-x86-64.raw
path: /etc/extensions/docker_compose.raw
systemd:
units:
- name: systemd-sysupdate.timer
enabled: true
- name: systemd-sysupdate.service
dropins:
- name: docker_compose.conf
contents: |
[Service]
ExecStartPre=/usr/lib/systemd/systemd-sysupdate -C docker_compose update
- name: sysext.conf
contents: |
[Service]
ExecStartPost=systemctl restart systemd-sysext