NVMe-oF: Does not properly wait for a block device
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
os-brick |
Fix Released
|
Medium
|
Gorka Eguileor |
Bug Description
The os-brick code skips half the subsystems when looking for the paths in the connected subsystems, and the half that doesn't skip just uses the wrong paths in the search.
Offending code is:
# Find nvme name among subsystems
for i in range(0, int(len(subsystems) / 2)):
subsystem = subsystems[i * 2]
if 'NQN' in subsystem and subsystem['NQN'] == conn_nqn:
for path in subsystems[i * 2 + 1]['Paths']:
if (path['Transport'] == nvme_transport_type
This is because the code was written based on the output from an nvme client version that had a bug and returned the wrong json output, it returned each subsystem as 2 different elements on the list on the "nvme list-subsys -o json" command run:
{
"Subsystems" : [
{
"Name" : "nvme-subsys0",
"NQN" : "nqn.2016-
},
{
"Paths" : [
{
"Name" : "nvme0",
"Address" : "traddr=10.0.2.15 trsvcid=4420",
"Status" : "live"
}
]
}
]
}
Instead of returning the right output:
{
"Subsystems" : [
{
"Name" : "nvme-subsys0",
"NQN" : "nqn.2016-
"Paths" : [
{
"Name" : "nvme0",
"Address" : "traddr=10.0.2.15 trsvcid=4420",
"Status" : "live"
}
]
}
]
}
But this was fixed on commit 2a2d5b438cbd4c3
description: | updated |
Changed in os-brick: | |
importance: | Undecided → Medium |
Changed in os-brick: | |
status: | New → Triaged |
Fix proposed to branch: master /review. opendev. org/c/openstack /os-brick/ +/836060
Review: https:/