Skip to content

Commit a7c58b1

Browse files
authored
Merge pull request #1660 from marquiz/devel/master-reconfigure-change
nfd-master: stop node-updater pool before reconfiguring api-controller
2 parents 91d3d5a + ba4cebb commit a7c58b1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

pkg/nfd-master/nfd-master.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,11 @@ func (m *nfdMaster) Run() error {
353353
return err
354354
}
355355

356+
// Stop the nodeUpdaterPool so that no node updates are underway
357+
// while we reconfigure the NFD API controller (including the
358+
// listers) below
359+
m.nodeUpdaterPool.stop()
360+
356361
// restart NFD API controller
357362
if m.nfdController != nil {
358363
klog.InfoS("stopping the nfd api controller")
@@ -364,13 +369,13 @@ func (m *nfdMaster) Run() error {
364369
return nil
365370
}
366371
}
372+
// Restart the nodeUpdaterPool
373+
m.nodeUpdaterPool.start(m.config.NfdApiParallelism)
374+
367375
// Update all nodes when the configuration changes
368376
if m.nfdController != nil && features.NFDFeatureGate.Enabled(features.NodeFeatureAPI) {
369377
m.nfdController.updateAllNodesChan <- struct{}{}
370378
}
371-
// Restart the node updater pool
372-
m.nodeUpdaterPool.stop()
373-
m.nodeUpdaterPool.start(m.config.NfdApiParallelism)
374379

375380
case <-m.stop:
376381
klog.InfoS("shutting down nfd-master")

0 commit comments

Comments
 (0)