Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ensure machine-id, initiatorname.iscsi and host{id,nqn} are unique
Our OS image includes /etc/machine-id, /etc/iscsi/initiatorname.iscsi, /etc/nvme/hostid and /etc/nvme/hostnqn. This means that those files will be identical on every single Harvester node installed from a given ISO image. This is wrong. /etc/machine-id is meant to be unique per host, see e.g.: https://manpages.opensuse.org/Tumbleweed/systemd/machine-id.5.en.html Likewise, the iSCSI initiator name and NVMe hostid/hostnqn need to be unique when accessing external storage via iSCSI or NVMe over fabrics. This commit removes those files from the OS image, and adds commands to 00_rootfs.yaml to generate /etc/iscsi/initiatorname.iscsi, /etc/nvme/hostid and /etc/nvme/hostnqn at boot time, if those files don't already exist (which they won't, on first boot - after that the generated content will persist). /etc/machine-id generation is handled automatically by systemd and its persistence is already covered by existing code in 00_rootfs.yaml. Related issue: harvester/harvester#6911 Signed-off-by: Tim Serong <[email protected]> (cherry picked from commit a9223b5)
- Loading branch information