Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: persist /etc/nvme (backport #984) #985

Merged
merged 1 commit into from
Feb 19, 2025
Merged

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Feb 18, 2025

Problem:
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.

Solution:
harvester/os2#190 ensures that those files are not included in our OS image, and will be instead generated on first boot. This harvester-installer PR is also required to ensure /etc/nvme persists correctly.

Related Issue:
harvester/harvester#6911

Test plan:

  • With this and fix: ensure machine-id, initiatorname.iscsi and host{id,nqn} are unique os2#190 applied, install harvester on at least two nodes.
  • Check the contents of /etc/machine-id, /etc/iscsi/initiatorname.iscsi, /etc/nvme/hostid and /etc/nvme/hostnq on each node. The contents of the files should be different on each node. This verifies that those files are being uniquely generated on each node on first boot.
  • Reboot each node. Check the contents of those files again. Verify on each node that the contents are the same as they were before the reboot. This verifies that the files are correctly persisted and are not being re-generated on subsequent boots.

This is an automatic backport of pull request #984 done by [Mergify](https://mergify.com).

Without this, the contents of `/etc/nvme` won't be persistent, as
our config here overrides that in os2.  This is needed in support
of harvester/os2#190

Related issue: harvester/harvester#6911

Signed-off-by: Tim Serong <tserong@suse.com>
(cherry picked from commit 8214c46)
@tserong tserong merged commit 198c98c into v1.5 Feb 19, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants