In some old nvme-cli versions the NVMe-oF create_hostnqn method fails.
This happens specifically on versions between not having the
show-hostnqn command and having it always return a value. On those
version the command only returns the value present in the file and never
tries to return an idempotent or random value.
This patch adds for that specific case, which is identified by the
stderr message:
Reviewed: https:/ /review. opendev. org/c/openstack /os-brick/ +/895202 /opendev. org/openstack/ os-brick/ commit/ 7da3d82773fe68f 7ccb2187ceafed0 12d145799f
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 7da3d82773fe68f 7ccb2187ceafed0 12d145799f
Author: Gorka Eguileor <email address hidden>
Date: Thu Sep 14 18:21:18 2023 +0200
NVMe-oF: Fix generation of hostnqn file
In some old nvme-cli versions the NVMe-oF create_hostnqn method fails.
This happens specifically on versions between not having the
show-hostnqn command and having it always return a value. On those
version the command only returns the value present in the file and never
tries to return an idempotent or random value.
This patch adds for that specific case, which is identified by the
stderr message:
hostnqn is not available -- use nvme gen-hostnqn
Closes-Bug: #2035606 8e2b23326022fc4 71f034b0a2f
Change-Id: Ic57d0fd85daf35