Skip to content

Commit 50c80bf

Browse files
committed
nsfs - monitor only nsrs that are mounted. DFBUGS-153
Signed-off-by: Amit Prinz Setter <[email protected]>
1 parent e9808eb commit 50c80bf

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/endpoint/endpoint.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -207,16 +207,12 @@ async function main(options = {}) {
207207
// there for namespace monitor won't be registered
208208
if (internal_rpc_client && config.NAMESPACE_MONITOR_ENABLED) {
209209
endpoint_stats_collector.instance().set_rpc_client(internal_rpc_client);
210-
211-
//wait with monitoring until pod has started
212-
setTimeout(() => {
213-
// Register a bg monitor on the endpoint
214-
background_scheduler.register_bg_worker(new NamespaceMonitor({
215-
name: 'namespace_fs_monitor',
216-
client: internal_rpc_client,
217-
should_monitor: nsr => Boolean(nsr.nsfs_config),
218-
}));
219-
}, 1000 * 60);
210+
// Register a bg monitor on the endpoint
211+
background_scheduler.register_bg_worker(new NamespaceMonitor({
212+
name: 'namespace_fs_monitor',
213+
client: internal_rpc_client,
214+
should_monitor: nsr => Boolean(nsr.nsfs_config && process.env['NSFS_NSR_' + nsr.name]),
215+
}));
220216
}
221217

222218
if (config.ENABLE_SEMAPHORE_MONITOR) {

0 commit comments

Comments
 (0)