From 1315937fd865caf06a87ce7d25d011a7afaf8da2 Mon Sep 17 00:00:00 2001 From: Travis Glenn Hansen Date: Fri, 6 Aug 2021 00:03:22 -0600 Subject: [PATCH] proper await Signed-off-by: Travis Glenn Hansen --- src/driver/controller-synology/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/driver/controller-synology/index.js b/src/driver/controller-synology/index.js index 5952e27..c377f6b 100644 --- a/src/driver/controller-synology/index.js +++ b/src/driver/controller-synology/index.js @@ -304,13 +304,13 @@ class ControllerSynologyDriver extends CsiBaseDriver { } break; case "volume": - let srcLunName = driver.buildIscsiName( - volume_content_source.volume.volume_id - ); - src_lun_uuid = await httpClient.GetLunUUIDByName(srcLunName); - - existingLun = httpClient.GetLunByName(iscsiName); + existingLun = await httpClient.GetLunByName(iscsiName); if (!existingLun) { + let srcLunName = driver.buildIscsiName( + volume_content_source.volume.volume_id + ); + + src_lun_uuid = await httpClient.GetLunUUIDByName(srcLunName); await httpClient.CreateClonedVolume(src_lun_uuid, iscsiName); } break;