better support for nvme-cli 1.x

Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
Travis Glenn Hansen
2022-12-29 10:32:13 -07:00
parent 6738ca4a7e
commit bb5019bd7e
2 changed files with 45 additions and 17 deletions
+5 -4
View File
@@ -980,6 +980,11 @@ class CsiBaseDriver {
}
// find namespace device
// rescan in scenarios when login previously occurred but volumes never appeared
// must be the NVMe char device, not the namespace device
await nvmeof.rescanNamespace(controllerDevice);
let namespaceDevice;
try {
await GeneralUtils.retry(15, 2000, async () => {
@@ -1012,10 +1017,6 @@ class CsiBaseDriver {
continue;
}
// rescan in scenarios when login previously occurred but volumes never appeared
// must be the NVMe char device, not the namespace device
await nvmeof.rescanNamespace(controllerDevice);
// can take some time for device to show up, loop for some period
result = await filesystem.pathExists(namespaceDevice);
let timer_start = Math.round(new Date().getTime() / 1000);