Skip to content

Using multiple "files:" entries in config causes bootloops #434

@bparish-boomsports

Description

@bparish-boomsports

Description

One entry of

   storage: 
      files:
        - path:

works.
Adding a second files/path entry causes a bootloop.

Impact

Major blocker - cannot build working Flatcar VMs that require more than one file be included in the config.

Environment and steps to reproduce

  1. Set-up:
    on my local Macbook using ct to transpile, then gcloud commands to create in GCP.
    YAML config (input):
storage:
  files:
    - path: /opt/cruise-control/config/cruisecontrol.properties
      filesystem: root
      mode: 420
      contents:
        inline:  This represents file content.
    - path: /usr/server.key
      filesystem: root
      mode: 420
      contents:
        inline:  This represents additional content for a second file.
systemd:
  units:
    - name: docker.service
      enabled: true

(etc ... more follows that is not likely relevant, as the only difference between the working and non-working is that second "server.key" file to be included)
ct --platform=gce < yaml_config > config.ign
gcloud compute instances create \"$FLATCAR\" --project \"$PROJECT_NAME\" --zone=$ZONE --image-project kinvolk-public --image-family flatcar-stable --boot-disk-device-name=\"${FLATCAR}-boot-disk\" --machine-type=$INSTANCE_TYPE --tags=$FLATCAR --boot-disk-type=pd-standard $NETWORK_TAGS --metadata-from-file user-data=$TRANSPILED_CONFIG_FILE

  1. Task:
    Building a flatcar VM in GCP, and include two files to be written to disk (i.e. in the example above a cruisecontrol.properties file and a server.key file).

  2. Action(s):
    Transpile works, as does building the VM in GCP. Flatcar runs fine IF I only have a single file included. Adding a second one (another inline, or remote) breaks the flatcar VM and it just keeps rebooting.

  3. Error:
    VM console log section that is the first deviation/failure message that I can see when compared to the working version.

[    5.802454] systemd[1]: Finished /sysroot/boot.
[    5.806341] i[    5.986273] EXT4-fs (sda6): mounted filesystem with ordered data mode. Opts: (null)
gnition[556]: fi[    5.988646] ext4 filesystem being mounted at /mnt/oem366638868 supports timestamps until 2038 (0x7fffffff)
les: createFilesystemsFiles: createFiles: op(7): [started]  writing file "/etc/hosts"
[    5.817302] ignition[556]: files: createFilesystemsFiles: createFiles: op(7): oem config not found in "/usr/share/oem", looking on oem partition
[    5.822237] ignition[556]: files: createFilesystemsFiles: createFiles: op(7): op(8): [started]  mounting "/dev/disk/by-label/OEM" at "/mnt/oem702706706"
[    5.827251] systemd[1]: mnt-oem366638868.mount: Succeeded.
[    5.831235] ignition[556]: files: createFilesystemsFiles: createFiles: op(7): op(8): [finished] mounting "/dev/disk/by-label/OEM" at "/mnt/oem702706706"
[[0;1;31mFAILED[0m] Failed to start [0;1;39mIgnition (files)[0m.
[    5.836239] ignition[556]: files failedFull config:
[    5.836440] ignition[556]: {
See 'systemctl status ignition-files.service' for details.
[    5.842244] ignition[556]:   "ignition": {
[[0;1;38;5;185mDEPEND[0m] Dependency failed for [0;1;39mPopu…orcx store to satisfy profile[0m.
[    5.846198] ignition[556]:   [    6.030579] audit: type=1130 audit(1626783998.866:28): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=ignition-files comm="systemd" exe="/usr/lib64/systemd/systemd" hostname=? addr=? terminal=? res=failed'
  "config": {},
[[0;1;38;5;185mDEPEND[0m] Dependency failed for [0;1;39mInitrd Default Target[0m.
[[0;32m  OK  [0m] Stopped [0;1;39mDispatch Password …ts to Console Directory Watch[0m.

Expected behavior

not boot looping =)

Additional information

Weird how I can use the exact same YAML file and build/deploy script, the only difference is when I add that second file path. Does not matter if the source is inline or remote, a full file or a simple line of text -- the result is that the machine cannot boot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions