Skip to content

Commit

Permalink
Merge pull request #7617 from romayalon/romy-fix-gpfs-event
Browse files Browse the repository at this point in the history
NSFS | NC | remove stat from verify_gpfs_lib()
  • Loading branch information
romayalon authored Nov 27, 2023
2 parents c557f56 + 62738d6 commit b741676
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions src/cmd/nsfs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 },
});
}
}

Expand Down

0 comments on commit b741676

Please sign in to comment.