Skip to content

Commit

Permalink
nsfs - monitor only nsrs that are mounted. DFBUGS-153
Browse files Browse the repository at this point in the history
Signed-off-by: Amit Prinz Setter <[email protected]>
  • Loading branch information
alphaprinz committed Dec 4, 2024
1 parent e9808eb commit 50c80bf
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/endpoint/endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,16 +207,12 @@ async function main(options = {}) {
// there for namespace monitor won't be registered
if (internal_rpc_client && config.NAMESPACE_MONITOR_ENABLED) {
endpoint_stats_collector.instance().set_rpc_client(internal_rpc_client);

//wait with monitoring until pod has started
setTimeout(() => {
// Register a bg monitor on the endpoint
background_scheduler.register_bg_worker(new NamespaceMonitor({
name: 'namespace_fs_monitor',
client: internal_rpc_client,
should_monitor: nsr => Boolean(nsr.nsfs_config),
}));
}, 1000 * 60);
// Register a bg monitor on the endpoint
background_scheduler.register_bg_worker(new NamespaceMonitor({
name: 'namespace_fs_monitor',
client: internal_rpc_client,
should_monitor: nsr => Boolean(nsr.nsfs_config && process.env['NSFS_NSR_' + nsr.name]),
}));
}

if (config.ENABLE_SEMAPHORE_MONITOR) {
Expand Down

0 comments on commit 50c80bf

Please sign in to comment.