From 62738d6c23dc84bc5527883db768109e675a0f76 Mon Sep 17 00:00:00 2001 From: Romy <35330373+romayalon@users.noreply.github.com> Date: Mon, 27 Nov 2023 12:13:01 +0200 Subject: [PATCH] remove stat Signed-off-by: Romy <35330373+romayalon@users.noreply.github.com> --- src/cmd/nsfs.js | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/src/cmd/nsfs.js b/src/cmd/nsfs.js index 1b7c4316e8..687da7f038 100644 --- a/src/cmd/nsfs.js +++ b/src/cmd/nsfs.js @@ -265,7 +265,7 @@ async function main(argv = minimist(process.argv.slice(2))) { backend, warn_threshold_ms: config.NSFS_WARN_THRESHOLD_MS, }; - verify_gpfslib(backend, fs_config); + verify_gpfslib(); const account = { email: new SensitiveString('nsfs@noobaa.io'), nsfs_account_config: fs_config, @@ -339,21 +339,18 @@ async function main(argv = minimist(process.argv.slice(2))) { } } -async function verify_gpfslib(backend, fs_config) { - if (nb_native().fs.gpfs) { - const stat = await nb_native().fs.stat(fs_config, process.env.GPFS_DL_PATH); - if (!stat) { - dbg.event({ - code: "noobaa_gpfslib_missing", - entity_type: "NODE", - event_type: "STATE_CHANGE", - message: "Noobaa GPFS library file is missing", - scope: "NODE", - severity: "ERROR", - state: "DEGRADED", - arguments: {gpfs_dl_path: process.env.GPFS_DL_PATH}, - }); - } +async function verify_gpfslib() { + if (!nb_native().fs.gpfs) { + dbg.event({ + code: "noobaa_gpfslib_missing", + entity_type: "NODE", + event_type: "STATE_CHANGE", + message: "Noobaa GPFS library file is missing", + scope: "NODE", + severity: "ERROR", + state: "DEGRADED", + arguments: { gpfs_dl_path: process.env.GPFS_DL_PATH }, + }); } }