diff --git a/bin/democratic-csi b/bin/democratic-csi index 8702ae1..752db58 100755 --- a/bin/democratic-csi +++ b/bin/democratic-csi @@ -69,8 +69,6 @@ if (!args.serverSocket && !args.serverAddress && !args.serverPort) { const package = require("../package.json"); args.version = package.version; -console.log(args, options); - //const grpc = require("grpc"); const grpc = require("grpc-uds"); const protoLoader = require("@grpc/proto-loader"); diff --git a/src/utils/iscsi.js b/src/utils/iscsi.js index 722cf28..dbca409 100644 --- a/src/utils/iscsi.js +++ b/src/utils/iscsi.js @@ -415,23 +415,24 @@ class ISCSI { if (!Array.isArray(portals)) { portals = [portals]; } - portals.forEach(p => { - iscsi - .exec(options.paths.iscsiadm, args.concat(["-p", p, "-u"])) - .then(() => {}) - .catch(err => { - if (err.code == 21) { - // no matching sessions - } else { - throw err; - } - }); - }); + for (let i = 0; i < portals.length; i++) { + let p = portals[i]; + try { + await iscsi.exec( + options.paths.iscsiadm, + args.concat(["-p", p, "-u"]) + ); + } catch (err) { + if (err.code == 21) { + // no matching sessions + } else { + throw err; + } + } + } return true; - }, - - async deleteDBEntry(tgtIQN) {} + } }; }