flatcar / sysext-bakery

Recipes for baking systemd-sysext images
Apache License 2.0
62 stars 29 forks source link

[k3s] systemd-sysupdate.service fails with 'No transfer definitions found.' #88

Closed fhemberger closed 1 week ago

fhemberger commented 1 month ago

Description

Not sure if this is to Flatcar in general, to the k3s sysext or if it's just a configuration issue. I'm running a single Flatcar VM with the k3s sysext.

After logging into the node, I get a notification that systemd-sysupdate.service has failed:

Sep 05 10:08:55 k3s-node1 systemd-sysupdate[3551]: Discovering installed instances…
Sep 05 10:08:55 k3s-node1 systemd-sysupdate[3551]: Discovering available instances…
Sep 05 10:08:55 k3s-node1 systemd-sysupdate[3551]: \ Acquiring manifest file https://github.com/flatcar/sysext-bakery/releases/latest/download/SHA256SUMS…
Sep 05 10:08:55 k3s-node1 systemd-sysupdate[3552]: Pulling 'https://github.com/flatcar/sysext-bakery/releases/latest/download/SHA256SUMS'.
Sep 05 10:08:56 k3s-node1 systemd-sysupdate[3552]: Downloading 4.3K for https://github.com/flatcar/sysext-bakery/releases/latest/download/SHA256SUMS.
Sep 05 10:08:56 k3s-node1 systemd-sysupdate[3552]: Acquired 4.3K.
Sep 05 10:08:56 k3s-node1 systemd-sysupdate[3552]: Download of https://github.com/flatcar/sysext-bakery/releases/latest/download/SHA256SUMS complete.
Sep 05 10:08:56 k3s-node1 systemd-sysupdate[3552]: Operation completed successfully.
Sep 05 10:08:56 k3s-node1 systemd-sysupdate[3552]: Exiting.
Sep 05 10:08:56 k3s-node1 systemd-sysupdate[3551]: Determining installed update sets…
Sep 05 10:08:56 k3s-node1 systemd-sysupdate[3551]: Determining available update sets…
Sep 05 10:08:56 k3s-node1 systemd-sysupdate[3551]: No update needed.
Sep 05 10:08:56 k3s-node1 systemd[1]: Started systemd-sysupdate.service - Automatic System Update.
Sep 05 10:08:56 k3s-node1 systemd-sysupdate[3580]: No transfer definitions found.
Sep 05 10:08:56 k3s-node1 systemd[1]: systemd-sysupdate.service: Main process exited, code=exited, status=1/FAILURE

Environment and steps to reproduce

Flatcar version: 3975.2.0

Ignition config :

variant: flatcar
version: 1.1.0
passwd:
  users:
    - name: core
      ssh_authorized_keys_local:
        - id_ed25519.pub
storage:
  files:
    - path: /etc/hostname
      mode: 0644
      contents:
        inline: k3s-node1

    - path: /opt/extensions/k3s/k3s-v1.29.2+k3s1-x86-64.raw
      contents:
        source: https://github.com/flatcar/sysext-bakery/releases/download/latest/k3s-v1.29.2+k3s1-x86-64.raw

    - path: /etc/sysupdate.k3s.d/k3s.conf
      contents:
        source: https://github.com/flatcar/sysext-bakery/releases/download/latest/k3s.conf

  links:
    - path: /etc/systemd/system/multi-user.target.wants/k3s.service
      target: /usr/local/lib/systemd/system/k3s.service
      overwrite: true

    - target: /opt/extensions/k3s/k3s-v1.29.2+k3s1-x86-64.raw
      path: /etc/extensions/k3s.raw
      hard: false

    - path: /etc/extensions/docker-flatcar.raw
      target: /dev/null
      overwrite: true

    - path: /etc/extensions/containerd-flatcar.raw
      target: /dev/null
      overwrite: true

systemd:
  units:
    - name: systemd-sysupdate.timer
      enabled: true

    - name: systemd-sysupdate.service
      dropins:
        - name: k3s.conf
          contents: |
            [Service]
            ExecStartPre=/usr/lib/systemd/systemd-sysupdate -C k3s update

(I just noticed I forgot the sysext.conf dropin, but as far as I understand, this should be unrelated.)

fhemberger commented 1 week ago

Found the issue: /etc/sysupdate.d/noop.conf was missing.

Full working config:

variant: flatcar
version: 1.1.0
passwd:
  users:
    - name: core
      ssh_authorized_keys_local:
        - id_ed25519.pub
storage:
  files:
    - path: /etc/hostname
      mode: 0644
      contents:
        inline: k3s-node1

    - path: /opt/extensions/k3s/k3s-v1.29.2+k3s1-x86-64.raw
      contents:
        source: https://github.com/flatcar/sysext-bakery/releases/download/latest/k3s-v1.29.2+k3s1-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.k3s.d/k3s.conf
      contents:
        source: https://github.com/flatcar/sysext-bakery/releases/download/latest/k3s.conf

  links:
    - path: /etc/systemd/system/multi-user.target.wants/k3s.service
      target: /usr/local/lib/systemd/system/k3s.service
      overwrite: true

    - target: /opt/extensions/k3s/k3s-v1.29.2+k3s1-x86-64.raw
      path: /etc/extensions/k3s.raw
      hard: false

    - path: /etc/extensions/docker-flatcar.raw
      target: /dev/null
      overwrite: true

    - path: /etc/extensions/containerd-flatcar.raw
      target: /dev/null
      overwrite: true

systemd:
  units:
    - name: systemd-sysupdate.timer
      enabled: true

    - name: systemd-sysupdate.service
      dropins:
        - name: k3s.conf
          contents: |
            [Service]
            ExecStartPre=/usr/lib/systemd/systemd-sysupdate -C k3s update
        - name: sysext.conf
          contents: |
            [Service]
            ExecStartPost=systemctl restart systemd-sysext