Update git submodules
* Update os-brick from branch 'master' to 736454730fd66946bd46a95f612388189cbf3cfb - Merge "NVMe-oF: Return right nqn when missing hostnqn" - NVMe-oF: Return right nqn when missing hostnqn This patch fixes a problem where we don't return the right nqn value when the /etc/nvme/hostnqn file doesn't exist. Currently get_connector_properties returns a new nqn value every time it gets called if the hostnqn file is not present in the system. The reason for this is that we are calling "nvme gen-hostnqn" and piping it to tee, but for some reason tee is failing to write the file, so on each call we'll generate a new nqn. Even if we were successfully creating the hostnqn file, that could create problems if we have already attached some volumes, since those would have used the existing nqn. This patch replaces the series of command executions (mkdir, nvme, chmod) with a privsep method that then leverages the equivalent python methods when possible and also tries to use the show-hostnqn nvme subcommand first to get the existing nqn before defaulting to generating a new one with gen-hostnqn. This way we don't replace the current nqn value that may be already being used by other nvme connections. Subcommand show-hostnqn returns the host NQN configured for the system. First looks for /etc/nvme/hostnqn, if it's not present (our case when we call the new create_hostnqn method) tries to construct it from dmi (/sys/firmware/dmi/entries) or from systemd's application-specific machine IDs for the system [1]. It's important to differentiate between the ENOENT returned as OSError and the same value returned by nvme [2] when show-hostnqn cannot return anything. [1]:ed9538622a/fabrics.c (L858-L875)
[2]:5b8b065b1d/nvme.c (L5642-L5643)
Closes-Bug: #1928944 Change-Id: I252dd958767dcdd4f9a2767b362aaf675edb79c4
This commit is contained in:
parent
67d39ba53f
commit
55c8439c5d
2
os-brick
2
os-brick
|
@ -1 +1 @@
|
|||
Subproject commit 1d444f0842f9261a55ddd9d5e5429b9fecc27845
|
||||
Subproject commit 736454730fd66946bd46a95f612388189cbf3cfb
|
Loading…
Reference in New Issue