mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +00:00
Merge pull request #941 from k8s-infra-cherrypick-robot/cherry-pick-929-to-release-0.11
[release-0.11] topology-updater: continue looping on scan error
This commit is contained in:
commit
f796e2add6
1 changed files with 4 additions and 8 deletions
|
@ -126,15 +126,15 @@ func (w *nfdTopologyUpdater) Run() error {
|
|||
return err
|
||||
}
|
||||
|
||||
crTrigger := time.After(0)
|
||||
crTrigger := time.NewTicker(w.resourcemonitorArgs.SleepInterval)
|
||||
for {
|
||||
select {
|
||||
case <-crTrigger:
|
||||
klog.Infof("Scanning\n")
|
||||
case <-crTrigger.C:
|
||||
klog.Infof("Scanning")
|
||||
podResources, err := resScan.Scan()
|
||||
utils.KlogDump(1, "podResources are", " ", podResources)
|
||||
if err != nil {
|
||||
klog.Warningf("Scan failed: %v\n", err)
|
||||
klog.Warningf("Scan failed: %v", err)
|
||||
continue
|
||||
}
|
||||
zones = resAggr.Aggregate(podResources)
|
||||
|
@ -147,10 +147,6 @@ func (w *nfdTopologyUpdater) Run() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
if w.resourcemonitorArgs.SleepInterval > 0 {
|
||||
crTrigger = time.After(w.resourcemonitorArgs.SleepInterval)
|
||||
}
|
||||
|
||||
case <-w.certWatch.Events:
|
||||
klog.Infof("TLS certificate update, renewing connection to nfd-master")
|
||||
w.Disconnect()
|
||||
|
|
Loading…
Reference in a new issue