Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
baremetal: use ignition.config.url kernel parameter
Browse files Browse the repository at this point in the history
The Ignition configuration currently gets written out only once to the
OEM partition and any updates to it in the matchbox store are not
propagated to the node's Ignition environment when Ignition is forced
to run again.

Use the Ignition kernel parameter to point the node's Ignition
environment directly to matchbox where the userdata lies.
  • Loading branch information
pothos committed Jun 22, 2021
1 parent 89f5b37 commit f5965b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ storage:
wipefs -f -a "$${disk}" || echo "error: failed to wipe $${disk}"
done
%{~ endif ~}
curl --retry 10 "${ignition_endpoint}?mac=${mac_address}&os=installed" -o ignition.json
flatcar-install \
%{~ if install_to_smallest_disk ~}
-s \
Expand All @@ -59,14 +58,13 @@ storage:
-C ${os_channel} \
-V ${os_version} \
-o "${container_linux_oem}" \
${baseurl_flag} \
-i ignition.json
${baseurl_flag}
udevadm settle
OEM_DEV="$(blkid -t "LABEL=OEM" -o device)"
mkdir -p /tmp/oemfs
mount "$${OEM_DEV}" /tmp/oemfs
# append to file on newly created partition, do not remove the defaults
echo 'set linux_append="${kernel_args}"' >> /tmp/oemfs/grub.cfg
echo 'set linux_append="${kernel_args} ignition.config.url=${ignition_endpoint}?mac=${mac_address}&os=installed"' >> /tmp/oemfs/grub.cfg
echo 'set linux_console="${kernel_console}"' >> /tmp/oemfs/grub.cfg
umount /tmp/oemfs
systemctl reboot
Expand Down
4 changes: 2 additions & 2 deletions pkg/assets/generated_assets.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f5965b1

Please sign in to comment.