mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-23 02:26:52 +00:00
Merge pull request #949 from lavalamp/bugFix
Add comment for clarity and logging for debugging.
This commit is contained in:
commit
5756a635c9
@ -116,13 +116,17 @@ func (rm *ReplicationManager) watchControllers(resourceVersion *uint64) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
glog.Infof("Got watch: %#v", event)
|
glog.Infof("Got watch: %#v", event)
|
||||||
if rc, ok := event.Object.(*api.ReplicationController); !ok {
|
rc, ok := event.Object.(*api.ReplicationController)
|
||||||
|
if !ok {
|
||||||
glog.Errorf("unexpected object: %#v", event.Object)
|
glog.Errorf("unexpected object: %#v", event.Object)
|
||||||
} else {
|
continue
|
||||||
// If we get disconnected, start where we left off.
|
|
||||||
*resourceVersion = rc.ResourceVersion + 1
|
|
||||||
rm.syncHandler(*rc)
|
|
||||||
}
|
}
|
||||||
|
// If we get disconnected, start where we left off.
|
||||||
|
*resourceVersion = rc.ResourceVersion + 1
|
||||||
|
// Sync even if this is a deletion event, to ensure that we leave
|
||||||
|
// it in the desired state.
|
||||||
|
glog.Infof("About to sync from watch: %v", rc.ID)
|
||||||
|
rm.syncHandler(*rc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -187,6 +191,7 @@ func (rm *ReplicationManager) synchronize() {
|
|||||||
for ix := range controllerSpecs {
|
for ix := range controllerSpecs {
|
||||||
go func(ix int) {
|
go func(ix int) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
|
glog.Infof("periodic sync of %v", controllerSpecs[ix].ID)
|
||||||
err := rm.syncHandler(controllerSpecs[ix])
|
err := rm.syncHandler(controllerSpecs[ix])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Errorf("Error synchronizing: %#v", err)
|
glog.Errorf("Error synchronizing: %#v", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user