Skip to content

No symlink from /etc/coreos to /etc/flatcar when Ignition creates the root filesystem #190

@pothos

Description

@pothos

Description

With a simple Ignition config it works to write to /etc/coreos/update.conf because the folder is a symlink to /etc/flatcar.
However, the following Ignition config with rootfs creation results in a /etc/coreos folder instead of a symlink to the /etc/flatcar folder which does not exist.

{
  "ignition": {
    "version": "2.2.0"
  },
  "storage": {
    "filesystems": [
      {
        "mount": {
          "device": "/dev/disk/by-partlabel/ROOT",
          "format": "ext4",
          "create": {
            "force": true,
            "options": [
              "-L",
              "ROOT",
              "-U",
              "9aa5237a-ab6b-458b-a7e8-f25e2baef1a3"
            ]
          }
        }
      }
    ],
    "files": [
      {
        "filesystem": "root",
        "path": "/etc/coreos/update.conf",
        "contents": {
          "source": "data:,%0AREBOOT_STRATEGY%3D%22off%22",
          "verification": {}
        },
        "mode": 420
      }
    ]
  }
}

Impact

ct generated configs don't work when a rootfs is created.

Environment and steps to reproduce

  1. Set-up: Download ./flatcar_production_qemu.sh and flatcar_production_qemu_image.img
  2. Task: Reproduce the above as follows
  3. Action(s):
    a. ./flatcar_production_qemu.sh -i ignition-coreos.json
    b. ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p 2222 core@127.0.0.1 ls /etc/
  4. Error: See if coreos is a folder or symlink and if flatcar exists.

Expected behavior
A coreos symlink to flatcar and the contents of the Ignition-specified file in /etc/flatcar/update.conf

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions