From eddcc0d6d3cfca0afcee7bad90a1951ba4dcf2ec Mon Sep 17 00:00:00 2001 From: John Fortin Date: Sun, 10 Apr 2022 12:59:39 +0000 Subject: [PATCH] for vsphere ipi add cluster domain to the uploaded vm configs so that 30-local-dns-prepender can use it Due to changes in FCOS 35 /etc/nsswitch.conf, we need to move the name resolution of api-int. to systemd-resolved. The way we do this is by adding a Domain attribute to /etc/systemd/resolved.conf.d/60-kni.conf. Since we are using a slightly different prepender than the masters and workers the domain is not being discovered automatically. To address this we are adding the domain in data/data/vsphere/bootstrap/main.tf which gets uploaded to the bootstrap instance on creation. 30-local-dns-prepender then downloads this information and adds it to /etc/systemd/resolved.conf.d/60-kni.conf Note that we check for a non-empty domain before writing /etc/systemd/resolved.conf.d/60-kni.conf. Fixes https://github.com/openshift/okd/issues/1182 Signed-off-by: John Fortin --- data/data/vsphere/bootstrap/main.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/data/data/vsphere/bootstrap/main.tf b/data/data/vsphere/bootstrap/main.tf index 52f442da4ae..ff62ac58456 100644 --- a/data/data/vsphere/bootstrap/main.tf +++ b/data/data/vsphere/bootstrap/main.tf @@ -72,6 +72,7 @@ resource "vsphere_virtual_machine" "vm_bootstrap" { "guestinfo.ignition.config.data" = base64encode(var.ignition_bootstrap) "guestinfo.ignition.config.data.encoding" = "base64" "guestinfo.hostname" = "${var.cluster_id}-bootstrap" + "guestinfo.domain" = "${var.cluster_domain}" "stealclock.enable" = "TRUE" }, length(var.vsphere_bootstrap_network_kargs) > 0 ?