File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ package nfdgarbagecollector
18
18
19
19
import (
20
20
"context"
21
+ "fmt"
21
22
"time"
22
23
23
24
topologyclientset "github.com/k8stopologyawareschedwg/noderesourcetopology-api/pkg/generated/clientset/versioned"
@@ -208,7 +209,15 @@ func (n *nfdGarbageCollector) startNodeInformer() error {
208
209
209
210
// start informers
210
211
n .factory .Start (n .stopChan )
211
- n .factory .WaitForCacheSync (n .stopChan )
212
+
213
+ start := time .Now ()
214
+ ret := n .factory .WaitForCacheSync (n .stopChan )
215
+ for res , ok := range ret {
216
+ if ! ok {
217
+ return fmt .Errorf ("node informer cache failed to sync (%s)" , res )
218
+ }
219
+ }
220
+ klog .InfoS ("node informer cache synced" , "duration" , time .Since (start ))
212
221
213
222
return nil
214
223
}
You can’t perform that action at this time.
0 commit comments