forked from openstack-k8s-operators/cinder-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OpenShift image has the NVMe `hostid` and `hostnqn` hardcoded, so it ends up being the same in all the control plane nodes, which is problematic. This `MachineConfig` fixes this issue by recreating both files when the `hostid` doesn't match the system-uuid of the machine it is running on. Bugs: - https://issues.redhat.com/browse/OCPBUGS-34629 - openshift/os#1519 - openshift/os#1520
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# The OpenShift image has the NVMe hostid and hostnqn hardcoded, so it ends up | ||
# being the same in all the control plane nodes, which is problematic. | ||
# This MachineConfig fixes this issue by recreating both files when the hostid | ||
# doesn't match the system-uuid of the machine it is running on. | ||
# Bugs: | ||
# https://issues.redhat.com/browse/OCPBUGS-34629 | ||
# https://github.com/openshift/os/issues/1519 | ||
# https://github.com/openshift/os/pull/1520 | ||
# | ||
apiVersion: machineconfiguration.openshift.io/v1 | ||
kind: MachineConfig | ||
metadata: | ||
labels: | ||
component: fix-nvme-ids | ||
machineconfiguration.openshift.io/role: master | ||
service: cinder | ||
name: 99-master-cinder-fix-nvme-ids | ||
spec: | ||
config: | ||
Systemd: | ||
Units: | ||
- name: cinder-nvme-fix.service | ||
enabled: true | ||
Contents: | | ||
[Unit] | ||
Description=Cinder fix nvme ids | ||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
Restart=on-failure | ||
RestartSec=5 | ||
ExecStart=bash -c "if ! grep $(/usr/sbin/dmidecode -s system-uuid) /etc/nvme/hostid; then /usr/sbin/dmidecode -s system-uuid > /etc/nvme/hostid; /usr/sbin/nvme gen-hostnqn > /etc/nvme/hostnqn; fi" | ||
[Install] | ||
WantedBy=multi-user.target | ||
ignition: | ||
version: 3.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
resources: | ||
- nvme-fabrics.yaml | ||
- fix-ocp-nvme.yaml |