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

unsupported config version: 3.5.0 #1591

Open
binarywaddle opened this issue Jan 25, 2025 · 1 comment
Open

unsupported config version: 3.5.0 #1591

binarywaddle opened this issue Jan 25, 2025 · 1 comment

Comments

@binarywaddle
Copy link

binarywaddle commented Jan 25, 2025

Bug

I'm trying to customize a CoreOS iso with an ignition file created with butane 0.23.0 but I'm unable to due to the resulting ignition file version being 3.5.0 and coreos-installer does not appear to support it. If I manually edit the version down to 3.4.0 it works fine.

Host Operating System Version

Fedora Linux 41 Server Edition

Target Operating System Version

CoreOS Stable

coreos-installer Version

0.23.0

Expected Behavior

The ignition configuration would be used to customize the iso

Actual Behavior

Error: parsing Ignition config /home/admin/ignition-conf/default.ign

Caused by:
    unsupported config version: 3.5.0

Reproduction Steps

  1. coreos-installer download -s stable -p metal -f iso -C ~/coreos-iso/
  2. butane --pretty --strict ~/butane-conf/default.bu > ~/ignition-conf/default.ign
  3. coreos-installer iso customize --dest-device /dev/sda --dest-ignition ~/ignition-conf/default.ign $COREOS_STABLE -o coreos-stable-default.iso where $COREOS_STABLE is the path to the latest iso that was downloaded

Other Information

The butane file used is below

variant: fcos
version: 1.6.0
passwd:
  users:
    # Add ssh key
    - name: core
      ssh_authorized_keys:
        - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILyN+9/ySQCOdKXJf46oVBnVKFH5O8n2GEDOUXmb4pqO
storage:
  disks:
    - device: /dev/sdb
      wipe_table: true
      partitions:
        - label: data
          size_mib: 0
          start_mib: 0
  filesystems:
    - device: /dev/disk/by-partlabel/data
      path: /var
      format: xfs
      label: data
      with_mount_unit: true
  directories:
    # Create directory for user level quadlets
    - path: /home/core/.config/containers/systemd
      user:
        name: core
      group:
        name: core
    # Create directory for app data
    - path: /home/core/data
      user:
        name: core
      group:
        name: core
    # Create directory for conf data
    - path: /home/core/data/conf
      user:
        name: core
      group:
        name: core
    # Create directory for rootless prometheus-podman-exporter data
    - path: /home/core/data/conf/prometheus-podman-exporter
      user:
        name: core
      group:
        name: core
    # Create directory for quadlets to symlink
    - path: /home/core/quadlets
      user:
        name: core
      group:
        name: core
  files:
    # Add Zram device with default settings
    - path: /etc/systemd/zram-generator.conf
      mode: 0644
      contents:
        inline: |
          # This config file enables a /dev/zram0 device with the default settings
          [zram0]
    # Add service for rootless prometheus-podman-exporter
    - path: /home/core/.config/containers/systemd/prometheus-podman-exporter-rootless.service
      user:
        name: core
      group:
        name: core
      contents:
        inline: |
          [Unit]
          Description=Prometheus exporter for podman (v4) machine
          [Service]
          Restart=on-failure
          EnvironmentFile=-/home/core/data/conf/prometheus-podman-exporter/prometheus-podman-exporter
          ExecStart=/usr/bin/prometheus-podman-exporter $PODMAN_EXPORTER_OPTS
          ExecReload=/bin/kill -HUP $MAINPID
          TimeoutStopSec=20s
          SendSIGKILL=no
          [Install]
          WantedBy=default.target
    # Create the config for rootless prometheus-podman-exporter
    - path: /home/core/data/conf/prometheus-podman-exporter/prometheus-podman-exporter
      user:
        name: core
      group:
        name: core
      contents:
        inline: |
          PODMAN_EXPORTER_OPTS="--collector.enable-all --collector.enhance-metrics --collector.store_labels --web.disable-exporter-metrics --web.listen-address :9883"

systemd:
  units:
    # Installing qemu-guest-agent & prometheus-podman-exporter as a layered package with rpm-ostree
    - name: rpm-ostree-install.service
      enabled: true
      contents: |
        [Unit]
        Description=Layer qemu-guest-agent and prometheus-podman-exporter with rpm-ostree
        Wants=network-online.target
        After=network-online.target
        # We run before `zincati.service` to avoid conflicting rpm-ostree
        # transactions.
        Before=zincati.service
        ConditionPathExists=!/var/lib/%N.stamp

        [Service]
        Type=oneshot
        RemainAfterExit=yes
        # `--allow-inactive` ensures that rpm-ostree does not return an error
        # if the package is already installed. This is useful if the package is
        # added to the root image in a future Fedora CoreOS release as it will
        # prevent the service from failing.
        ExecStart=/usr/bin/rpm-ostree install --apply-live --allow-inactive qemu-guest-agent prometheus-podman-exporter
        ExecStart=/bin/touch /var/lib/%N.stamp

        [Install]
        WantedBy=multi-user.target
@travier
Copy link
Member

travier commented Jan 28, 2025

Hum, this is odd. Ignition 3.5.0 supported was added in #1551, which got released with https://github.com/coreos/ignition-config-rs/releases/tag/v0.5.0, which got included here in #1551 which landed in https://github.com/coreos/coreos-installer/releases/tag/v0.23.0.

In the mean time, you can use the 1.5.0 version of the spec for the fcos variant as the changes are only for s390x systems in the 1.6.0 one. It will generate 3.4.0 Ignition configs.

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

No branches or pull requests

2 participants