From 897149fd53d10b6ec6e243bb477e8660820a1a61 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Tue, 13 Aug 2024 17:36:10 +0100 Subject: [PATCH] Better handling of Flatcar iso boot command Signed-off-by: Marcus Noble --- images/capi/packer/ova/flatcar.json | 4 ++-- images/capi/packer/qemu/qemu-flatcar.json | 6 +++--- images/capi/packer/raw/raw-flatcar.json | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/images/capi/packer/ova/flatcar.json b/images/capi/packer/ova/flatcar.json index d59b610b9e..ebc1eea33e 100644 --- a/images/capi/packer/ova/flatcar.json +++ b/images/capi/packer/ova/flatcar.json @@ -1,7 +1,7 @@ { "ansible_extra_vars": "guestinfo_datasource_slug={{user `guestinfo_datasource_slug`}} guestinfo_datasource_ref={{user `guestinfo_datasource_ref`}} guestinfo_datasource_script={{user `guestinfo_datasource_script`}} ansible_python_interpreter=/opt/bin/python", - "boot_command_prefix": "sudo systemctl mask sshd.socket --nowcurl -sLo /tmp/ignition.json https://raw.githubusercontent.com/kubernetes-sigs/image-builder/21f6a77a9a46a217949579d52f7b671568521678/images/capi/packer/files/flatcar/ignition/bootstrap-pass-auth.jsonsed -i \"s|BUILDERPASSWORDHASH|$(mkpasswd -5 {{user `ssh_password`}})|\" /tmp/ignition.jsonsudo flatcar-install -d /dev/sda -o vmware_raw -C {{user `channel_name`}} -V {{user `release_version`}} -i /tmp/ignition.jsonsudo reboot", - "boot_wait": "60s", + "boot_command_prefix": "sudo systemctl mask sshd.socket --nowcurl -sLo /tmp/ignition.json https://raw.githubusercontent.com/kubernetes-sigs/image-builder/21f6a77a9a46a217949579d52f7b671568521678/images/capi/packer/files/flatcar/ignition/bootstrap-pass-auth.json && sed -i \"s|BUILDERPASSWORDHASH|$(mkpasswd -5 {{user `ssh_password`}})|\" /tmp/ignition.json && sudo flatcar-install -d /dev/sda -o vmware_raw -C {{user `channel_name`}} -V {{user `release_version`}} -i /tmp/ignition.json && sudo reboot", + "boot_wait": "180s", "build_name": "flatcar-{{env `FLATCAR_CHANNEL`}}-{{env `FLATCAR_VERSION`}}", "channel_name": "{{env `FLATCAR_CHANNEL`}}", "containerd_cri_socket": "/run/docker/libcontainerd/docker-containerd.sock", diff --git a/images/capi/packer/qemu/qemu-flatcar.json b/images/capi/packer/qemu/qemu-flatcar.json index 358e9a9e0f..786c25d2ef 100644 --- a/images/capi/packer/qemu/qemu-flatcar.json +++ b/images/capi/packer/qemu/qemu-flatcar.json @@ -1,8 +1,8 @@ { "ansible_extra_vars": "ansible_python_interpreter=/opt/bin/python oem_id={{user `oem_id`}}", - "boot_command_prefix": "sudo systemctl mask sshd.socket --nowcurl -sLo /tmp/ignition.json ", - "boot_command_suffix": "/bootstrap-pass-auth.jsonsed -i \"s|BUILDERPASSWORDHASH|$(mkpasswd -5 {{user `ssh_password`}})|\" /tmp/ignition.jsonsudo flatcar-install -d /dev/sda -C {{user `channel_name`}} -V {{user `release_version`}} -i /tmp/ignition.jsonsudo reboot", - "boot_wait": "120s", + "boot_command_prefix": "sudo systemctl mask sshd.socket --nowcurl -sLo /tmp/ignition.json ", + "boot_command_suffix": "/bootstrap-pass-auth.jsonsed -i \"s|BUILDERPASSWORDHASH|$(mkpasswd -5 {{user `ssh_password`}})|\" /tmp/ignition.jsonsudo flatcar-install -d /dev/sda -C {{user `channel_name`}} -V {{user `release_version`}} -i /tmp/ignition.json && sudo reboot", + "boot_wait": "180s", "build_name": "flatcar-{{env `FLATCAR_CHANNEL`}}-{{env `FLATCAR_VERSION`}}", "channel_name": "{{env `FLATCAR_CHANNEL`}}", "crictl_source_type": "http", diff --git a/images/capi/packer/raw/raw-flatcar.json b/images/capi/packer/raw/raw-flatcar.json index 7f5e7c3db4..c499489e88 100644 --- a/images/capi/packer/raw/raw-flatcar.json +++ b/images/capi/packer/raw/raw-flatcar.json @@ -1,8 +1,8 @@ { "ansible_extra_vars": "ansible_python_interpreter=/opt/bin/python", - "boot_command_prefix": "sudo systemctl mask sshd.socket --nowcurl -sLo /tmp/ignition.json ", - "boot_command_suffix": "/bootstrap-pass-auth.jsonsed -i \"s|BUILDERPASSWORDHASH|$(mkpasswd -5 {{user `ssh_password`}})|\" /tmp/ignition.jsonsudo flatcar-install -d /dev/sda -C {{user `channel_name`}} -V {{user `release_version`}} -i /tmp/ignition.jsonsudo reboot", - "boot_wait": "120s", + "boot_command_prefix": "sudo systemctl mask sshd.socket --nowcurl -sLo /tmp/ignition.json ", + "boot_command_suffix": "/bootstrap-pass-auth.jsonsed -i \"s|BUILDERPASSWORDHASH|$(mkpasswd -5 {{user `ssh_password`}})|\" /tmp/ignition.jsonsudo flatcar-install -d /dev/sda -C {{user `channel_name`}} -V {{user `release_version`}} -i /tmp/ignition.json && sudo reboot", + "boot_wait": "180s", "build_name": "flatcar-{{env `FLATCAR_CHANNEL`}}-{{env `FLATCAR_VERSION`}}", "channel_name": "{{env `FLATCAR_CHANNEL`}}", "crictl_source_type": "http",