The NVMe-oF connector currently create the `/etc/nvme/hostnqn` file if
it doesn't exist, but it may still be missing the `/etc/nvme/hostid`
value.
Some distribution packages create the file on installation but others
may not.
It is recommended for the file to be present so that nvme doesn't
randomly generate it.
Randomly generating it means that the value will be different for the
same storage array and the same volume if we connect, disconnect, and
connect the volume again.
This patch ensures that the file will exist and will try to use the
system's UUID as reported by DMI or a randomly generated one.
Reviewed: https:/ /review. opendev. org/c/openstack /os-brick/ +/880222 /opendev. org/openstack/ os-brick/ commit/ 16c90d5fe97da04 c7c42cbd3fe5505 153ce95a91
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 16c90d5fe97da04 c7c42cbd3fe5505 153ce95a91
Author: Gorka Eguileor <email address hidden>
Date: Wed Apr 12 20:23:47 2023 +0200
NVMe-oF: Create /etc/nvme/hostid
The NVMe-oF connector currently create the `/etc/nvme/hostnqn` file if
it doesn't exist, but it may still be missing the `/etc/nvme/hostid`
value.
Some distribution packages create the file on installation but others
may not.
It is recommended for the file to be present so that nvme doesn't
randomly generate it.
Randomly generating it means that the value will be different for the
same storage array and the same volume if we connect, disconnect, and
connect the volume again.
This patch ensures that the file will exist and will try to use the
system's UUID as reported by DMI or a randomly generated one.
Closes-Bug: #2016029 464d8234841645e d520e8ba655
Change-Id: I0b60f9078f23f8