Skip to content

Commit 048850e

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

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

Diff for: src/endpoint/endpoint.js

+6-10
Original file line numberDiff line numberDiff line change
@@ -212,16 +212,12 @@ async function main(options = {}) {
212212
// there for namespace monitor won't be registered
213213
if (internal_rpc_client && config.NAMESPACE_MONITOR_ENABLED) {
214214
endpoint_stats_collector.instance().set_rpc_client(internal_rpc_client);
215-
216-
//wait with monitoring until pod has started
217-
setTimeout(() => {
218-
// Register a bg monitor on the endpoint
219-
background_scheduler.register_bg_worker(new NamespaceMonitor({
220-
name: 'namespace_fs_monitor',
221-
client: internal_rpc_client,
222-
should_monitor: nsr => Boolean(nsr.nsfs_config),
223-
}));
224-
}, 1000 * 60);
215+
// Register a bg monitor on the endpoint
216+
background_scheduler.register_bg_worker(new NamespaceMonitor({
217+
name: 'namespace_fs_monitor',
218+
client: internal_rpc_client,
219+
should_monitor: nsr => Boolean(nsr.nsfs_config && process.env['NSFS_NSR_' + nsr.name]),
220+
}));
225221
}
226222

227223
if (config.ENABLE_SEMAPHORE_MONITOR) {

0 commit comments

Comments
 (0)