os-brick/os_brick
Gorka Eguileor 7da3d82773 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
Change-Id: Ic57d0fd85daf358e2b23326022fc471f034b0a2f
2023-09-14 18:21:18 +02:00
..
caches opencas: Use BrickException instead of Exception 2020-12-17 15:21:37 +00:00
encryptors mypy: os_brick/encryptors/__init__.py 2022-08-23 15:12:04 +00:00
initiator Check paths before extending device 2023-08-24 11:40:32 +00:00
local_dev Merge "LVM: Remove outdated comment" 2023-07-03 16:29:38 +00:00
privileged NVMe-oF: Fix generation of hostnqn file 2023-09-14 18:21:18 +02:00
remotefs Introduce mypy 2021-05-21 16:58:22 -04:00
tests NVMe-oF: Fix generation of hostnqn file 2023-09-14 18:21:18 +02:00
__init__.py Support independent file lock path 2022-07-15 09:21:19 +00:00
constants.py SCSI: Support non SAM LUN addressing 2023-08-23 12:19:11 +02:00
exception.py mypy: Update format to future __annotations__ 2022-08-23 15:21:17 +00:00
executor.py mypy: Update format to future __annotations__ 2022-08-23 15:21:17 +00:00
i18n.py Update and replace http with https for doc links 2017-07-26 02:18:44 +00:00
opts.py Support independent file lock path 2022-07-15 09:21:19 +00:00
utils.py Check paths before extending device 2023-08-24 11:40:32 +00:00
version.py Add reno for release notes management 2016-01-20 19:19:36 -06:00