Skip to content

Commit

Permalink
Merge pull request #1660 from marquiz/devel/master-reconfigure-change
Browse files Browse the repository at this point in the history
nfd-master: stop node-updater pool before reconfiguring api-controller
  • Loading branch information
k8s-ci-robot authored Apr 15, 2024
2 parents 91d3d5a + ba4cebb commit a7c58b1
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pkg/nfd-master/nfd-master.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,11 @@ func (m *nfdMaster) Run() error {
return err
}

// Stop the nodeUpdaterPool so that no node updates are underway
// while we reconfigure the NFD API controller (including the
// listers) below
m.nodeUpdaterPool.stop()

// restart NFD API controller
if m.nfdController != nil {
klog.InfoS("stopping the nfd api controller")
Expand All @@ -364,13 +369,13 @@ func (m *nfdMaster) Run() error {
return nil
}
}
// Restart the nodeUpdaterPool
m.nodeUpdaterPool.start(m.config.NfdApiParallelism)

// Update all nodes when the configuration changes
if m.nfdController != nil && features.NFDFeatureGate.Enabled(features.NodeFeatureAPI) {
m.nfdController.updateAllNodesChan <- struct{}{}
}
// Restart the node updater pool
m.nodeUpdaterPool.stop()
m.nodeUpdaterPool.start(m.config.NfdApiParallelism)

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

0 comments on commit a7c58b1

Please sign in to comment.