more minor fixes
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
parent
910e9d8fca
commit
3d6c26a251
|
|
@ -1318,8 +1318,8 @@ class ControllerZfsBaseDriver extends CsiBaseDriver {
|
||||||
// NOTE: -R will recursively delete items + dependent filesets
|
// NOTE: -R will recursively delete items + dependent filesets
|
||||||
// delete dataset
|
// delete dataset
|
||||||
try {
|
try {
|
||||||
let max_tries = 5;
|
let max_tries = 12;
|
||||||
let sleep_time = 3000;
|
let sleep_time = 5000;
|
||||||
let current_try = 1;
|
let current_try = 1;
|
||||||
let success = false;
|
let success = false;
|
||||||
while (!success && current_try <= max_tries) {
|
while (!success && current_try <= max_tries) {
|
||||||
|
|
|
||||||
|
|
@ -1261,8 +1261,7 @@ class CsiBaseDriver {
|
||||||
result = await filesystem.pathExists(win_staging_target_path);
|
result = await filesystem.pathExists(win_staging_target_path);
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
result = fs.lstatSync(win_staging_target_path);
|
if (!(await filesystem.isSymbolicLink(win_staging_target_path))) {
|
||||||
if (!result.isSymbolicLink()) {
|
|
||||||
fs.rmdirSync(win_staging_target_path);
|
fs.rmdirSync(win_staging_target_path);
|
||||||
} else {
|
} else {
|
||||||
result = await wutils.GetItem(win_staging_target_path);
|
result = await wutils.GetItem(win_staging_target_path);
|
||||||
|
|
@ -1310,8 +1309,9 @@ class CsiBaseDriver {
|
||||||
if (!details.includes("ResourceExists")) {
|
if (!details.includes("ResourceExists")) {
|
||||||
throw e;
|
throw e;
|
||||||
} else {
|
} else {
|
||||||
result = fs.lstatSync(win_staging_target_path);
|
if (
|
||||||
if (!result.isSymbolicLink()) {
|
!(await filesystem.isSymbolicLink(win_staging_target_path))
|
||||||
|
) {
|
||||||
throw new Error("staging path exists but is not symlink");
|
throw new Error("staging path exists but is not symlink");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3215,7 +3215,7 @@ class CsiBaseDriver {
|
||||||
filesystem.covertUnixSeparatorToWindowsSeparator(volume_path);
|
filesystem.covertUnixSeparatorToWindowsSeparator(volume_path);
|
||||||
|
|
||||||
// ensure path is mounted
|
// ensure path is mounted
|
||||||
result = filesystem.pathExists(win_volume_path);
|
result = await filesystem.pathExists(win_volume_path);
|
||||||
if (!result) {
|
if (!result) {
|
||||||
throw new GrpcError(
|
throw new GrpcError(
|
||||||
grpc.status.NOT_FOUND,
|
grpc.status.NOT_FOUND,
|
||||||
|
|
@ -3223,7 +3223,7 @@ class CsiBaseDriver {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let target = await wutils.GetRealTarget(win_volume_path);
|
let target = (await wutils.GetRealTarget(win_volume_path)) || "";
|
||||||
if (target.startsWith("\\\\")) {
|
if (target.startsWith("\\\\")) {
|
||||||
node_attach_driver = "smb";
|
node_attach_driver = "smb";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -228,7 +228,7 @@ class Filesystem {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async isSymboliclink(path) {
|
async isSymbolicLink(path) {
|
||||||
return fs.lstatSync(path).isSymbolicLink();
|
return fs.lstatSync(path).isSymbolicLink();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue