-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7617 from romayalon/romy-fix-gpfs-event
NSFS | NC | remove stat from verify_gpfs_lib()
- Loading branch information
Showing
1 changed file
with
13 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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('[email protected]'), | ||
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 }, | ||
}); | ||
} | ||
} | ||
|
||
|