From 102d1fb91991e65c34d24b39291161028d2dfee0 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Tue, 23 Aug 2022 21:22:01 -0500 Subject: [PATCH] setup: ks: Generate iSCSI initiator name The iSCSI initiator needs a unique name. It will generate one the first time it starts if one does not already exist. Since it tries to write it to a file under `/etc`, this will fail, since the root filesystem is read-only. As such, we need to generate the name during installation, when the filesystem is still writable. --- setup/fedora-k8s-node.ks | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup/fedora-k8s-node.ks b/setup/fedora-k8s-node.ks index c087bc7..b25e9dd 100644 --- a/setup/fedora-k8s-node.ks +++ b/setup/fedora-k8s-node.ks @@ -125,6 +125,9 @@ ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf /usr/libexec/openssh/sshd-keygen ed25519 /usr/libexec/openssh/sshd-keygen rsa +printf 'InitiatorName=%s\n' "$(/usr/sbin/iscsi-iname)" \ + > /etc/iscsi/initiatorname.iscsi + cat > /etc/modules-load.d/k8s.conf <<'EOF' br_netfilter EOF