From cf6352969bd94908e3f0eb091d716ac0c30cd419 Mon Sep 17 00:00:00 2001 From: Travis Glenn Hansen Date: Sat, 24 Apr 2021 10:10:17 -0600 Subject: [PATCH 1/3] remove --force from umount commands due to potential corruption Signed-off-by: Travis Glenn Hansen --- src/driver/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/driver/index.js b/src/driver/index.js index b6b6c2b..059981e 100644 --- a/src/driver/index.js +++ b/src/driver/index.js @@ -584,6 +584,7 @@ class CsiBaseDriver { const staging_target_path = call.request.staging_target_path; const block_path = staging_target_path + "/block_device"; let normalized_staging_path = staging_target_path; + const umount_args = []; // --force if (!staging_target_path) { throw new GrpcError( @@ -615,7 +616,7 @@ class CsiBaseDriver { result = await mount.pathIsMounted(normalized_staging_path); if (result) { - result = await mount.umount(normalized_staging_path, ["--force"]); + result = await mount.umount(normalized_staging_path, umount_args); } if (is_block) { @@ -859,10 +860,11 @@ class CsiBaseDriver { const volume_id = call.request.volume_id; const target_path = call.request.target_path; + const umount_args = []; // --force result = await mount.pathIsMounted(target_path); if (result) { - result = await mount.umount(target_path, ["--force"]); + result = await mount.umount(target_path, umount_args); } result = await filesystem.pathExists(target_path); From 0d9f89e4150b173116e0d7e8f622a2f02f27c4ef Mon Sep 17 00:00:00 2001 From: Travis Glenn Hansen Date: Sun, 25 Apr 2021 20:00:42 -0600 Subject: [PATCH 2/3] proper logic for target iqn Signed-off-by: Travis Glenn Hansen --- src/utils/iscsi.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utils/iscsi.js b/src/utils/iscsi.js index 68d4fa6..3df51cd 100644 --- a/src/utils/iscsi.js +++ b/src/utils/iscsi.js @@ -156,7 +156,7 @@ class ISCSI { let session = false; sessions.every((i_session) => { if ( - `${i_session.iqn}:${i_session.target}` == tgtIQN && + `${i_session.iqn}` == tgtIQN && portal == i_session.portal ) { session = i_session; @@ -202,8 +202,9 @@ class ISCSI { id: Number(fields[1].replace("[", "").replace("]", "")), portal: fields[2].replace("[", "").replace("]", "").split(",")[0], target_portal_group_tag: fields[2].split(",")[1], - iqn: fields[3].split(":")[0], - target: fields[3].split(":")[1], + iqn: fields[3].trim(), + //iqn: fields[3].split(":")[0], + //target: fields[3].split(":")[1], }); }); From 2fec33a77227b642d4937d641ec49d00291f2198 Mon Sep 17 00:00:00 2001 From: Travis Glenn Hansen Date: Sun, 25 Apr 2021 20:04:23 -0600 Subject: [PATCH 3/3] new release Signed-off-by: Travis Glenn Hansen --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 855f5c6..9361f61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# v1.1.3 + +Release 2021-04-25 + +- remove `--force` from unmounts +- proper `iqn` logic for rescans + # v1.1.2 Released 2021-04-12