From de6f27e1193f3d97694f6d1cb1271bfe5aef9f79 Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Sat, 30 Jul 2022 16:27:08 -0700 Subject: [PATCH] Update FCOS iPXE initrd and kernel arg settings * Add initrd=main kernel argument for UEFI * Switch to using the coreos.live.rootfs_url kernel argument instead of passing the rootfs as an appended initrd * Remove coreos.inst.image_url kernel argument since coreos-installer now defaults to installing from the embedded live system * Remove rd.neednet=1 and dhcp=ip kernel args that aren't needed * Remove serial console kernel args by default (these can be added via var.kernel_args if needed) Rel: * https://github.com/poseidon/matchbox/pull/972 (thank you @bgilbert) * https://github.com/poseidon/matchbox/pull/978 --- .../kubernetes/fcc/controller.yaml | 1 - .../fedora-coreos/kubernetes/fcc/worker.yaml | 1 - .../fedora-coreos/kubernetes/profiles.tf | 18 +++++------------- .../flatcar-linux/kubernetes/profiles.tf | 4 ---- 4 files changed, 5 insertions(+), 19 deletions(-) diff --git a/bare-metal/fedora-coreos/kubernetes/fcc/controller.yaml b/bare-metal/fedora-coreos/kubernetes/fcc/controller.yaml index b826d1df..eee1adfa 100644 --- a/bare-metal/fedora-coreos/kubernetes/fcc/controller.yaml +++ b/bare-metal/fedora-coreos/kubernetes/fcc/controller.yaml @@ -229,7 +229,6 @@ storage: ETCD_PEER_CERT_FILE=/etc/ssl/certs/etcd/peer.crt ETCD_PEER_KEY_FILE=/etc/ssl/certs/etcd/peer.key ETCD_PEER_CLIENT_CERT_AUTH=true - - path: /etc/fedora-coreos/iptables-legacy.stamp - path: /etc/containerd/config.toml overwrite: true contents: diff --git a/bare-metal/fedora-coreos/kubernetes/fcc/worker.yaml b/bare-metal/fedora-coreos/kubernetes/fcc/worker.yaml index 85f3baca..d2adc9e3 100644 --- a/bare-metal/fedora-coreos/kubernetes/fcc/worker.yaml +++ b/bare-metal/fedora-coreos/kubernetes/fcc/worker.yaml @@ -127,7 +127,6 @@ storage: DefaultCPUAccounting=yes DefaultMemoryAccounting=yes DefaultBlockIOAccounting=yes - - path: /etc/fedora-coreos/iptables-legacy.stamp - path: /etc/containerd/config.toml overwrite: true contents: diff --git a/bare-metal/fedora-coreos/kubernetes/profiles.tf b/bare-metal/fedora-coreos/kubernetes/profiles.tf index a3210b4b..5d960d80 100644 --- a/bare-metal/fedora-coreos/kubernetes/profiles.tf +++ b/bare-metal/fedora-coreos/kubernetes/profiles.tf @@ -1,34 +1,26 @@ locals { remote_kernel = "https://builds.coreos.fedoraproject.org/prod/streams/${var.os_stream}/builds/${var.os_version}/x86_64/fedora-coreos-${var.os_version}-live-kernel-x86_64" remote_initrd = [ - "https://builds.coreos.fedoraproject.org/prod/streams/${var.os_stream}/builds/${var.os_version}/x86_64/fedora-coreos-${var.os_version}-live-initramfs.x86_64.img", - "https://builds.coreos.fedoraproject.org/prod/streams/${var.os_stream}/builds/${var.os_version}/x86_64/fedora-coreos-${var.os_version}-live-rootfs.x86_64.img" + "--name main https://builds.coreos.fedoraproject.org/prod/streams/${var.os_stream}/builds/${var.os_version}/x86_64/fedora-coreos-${var.os_version}-live-initramfs.x86_64.img", ] remote_args = [ - "ip=dhcp", - "rd.neednet=1", + "initrd=main", + "coreos.live.rootfs_url=https://builds.coreos.fedoraproject.org/prod/streams/${var.os_stream}/builds/${var.os_version}/x86_64/fedora-coreos-${var.os_version}-live-rootfs.x86_64.img", "coreos.inst.install_dev=${var.install_disk}", "coreos.inst.ignition_url=${var.matchbox_http_endpoint}/ignition?uuid=$${uuid}&mac=$${mac:hexhyp}", - "coreos.inst.image_url=https://builds.coreos.fedoraproject.org/prod/streams/${var.os_stream}/builds/${var.os_version}/x86_64/fedora-coreos-${var.os_version}-metal.x86_64.raw.xz", - "console=tty0", - "console=ttyS0", ] cached_kernel = "/assets/fedora-coreos/fedora-coreos-${var.os_version}-live-kernel-x86_64" cached_initrd = [ "/assets/fedora-coreos/fedora-coreos-${var.os_version}-live-initramfs.x86_64.img", - "/assets/fedora-coreos/fedora-coreos-${var.os_version}-live-rootfs.x86_64.img" ] cached_args = [ - "ip=dhcp", - "rd.neednet=1", + "initrd=main", + "coreos.live.rootfs_url=${var.matchbox_http_endpoint}/assets/fedora-coreos/fedora-coreos-${var.os_version}-live-rootfs.x86_64.img", "coreos.inst.install_dev=${var.install_disk}", "coreos.inst.ignition_url=${var.matchbox_http_endpoint}/ignition?uuid=$${uuid}&mac=$${mac:hexhyp}", - "coreos.inst.image_url=${var.matchbox_http_endpoint}/assets/fedora-coreos/fedora-coreos-${var.os_version}-metal.x86_64.raw.xz", - "console=tty0", - "console=ttyS0", ] kernel = var.cached_install ? local.cached_kernel : local.remote_kernel diff --git a/bare-metal/flatcar-linux/kubernetes/profiles.tf b/bare-metal/flatcar-linux/kubernetes/profiles.tf index 8064ddf9..e59e52af 100644 --- a/bare-metal/flatcar-linux/kubernetes/profiles.tf +++ b/bare-metal/flatcar-linux/kubernetes/profiles.tf @@ -18,8 +18,6 @@ resource "matchbox_profile" "flatcar-install" { "initrd=flatcar_production_pxe_image.cpio.gz", "flatcar.config.url=${var.matchbox_http_endpoint}/ignition?uuid=$${uuid}&mac=$${mac:hexhyp}", "flatcar.first_boot=yes", - "console=tty0", - "console=ttyS0", var.kernel_args, ]) @@ -42,8 +40,6 @@ resource "matchbox_profile" "cached-flatcar-install" { "initrd=flatcar_production_pxe_image.cpio.gz", "flatcar.config.url=${var.matchbox_http_endpoint}/ignition?uuid=$${uuid}&mac=$${mac:hexhyp}", "flatcar.first_boot=yes", - "console=tty0", - "console=ttyS0", var.kernel_args, ])