Skip to content

Commit dd419ed

Browse files
authored
nsfs - monitor only nsrs that are mounted. DFBUGS-153 (#8561)
Signed-off-by: Amit Prinz Setter <alphaprinz@gmail.com>
1 parent 7aaf00f commit dd419ed

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
@@ -213,16 +213,12 @@ async function main(options = {}) {
213213
// there for namespace monitor won't be registered
214214
if (internal_rpc_client && config.NAMESPACE_MONITOR_ENABLED) {
215215
endpoint_stats_collector.instance().set_rpc_client(internal_rpc_client);
216-
217-
//wait with monitoring until pod has started
218-
setTimeout(() => {
219-
// Register a bg monitor on the endpoint
220-
background_scheduler.register_bg_worker(new NamespaceMonitor({
221-
name: 'namespace_fs_monitor',
222-
client: internal_rpc_client,
223-
should_monitor: nsr => Boolean(nsr.nsfs_config),
224-
}));
225-
}, 1000 * 60);
216+
// Register a bg monitor on the endpoint
217+
background_scheduler.register_bg_worker(new NamespaceMonitor({
218+
name: 'namespace_fs_monitor',
219+
client: internal_rpc_client,
220+
should_monitor: nsr => Boolean(nsr.nsfs_config && process.env['NSFS_NSR_' + nsr.name]),
221+
}));
226222
}
227223

228224
if (config.ENABLE_SEMAPHORE_MONITOR) {

0 commit comments

Comments
 (0)