mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Explicitly handle errors received during watch
Log them as Error and then continue.
This commit is contained in:
		@@ -21,9 +21,11 @@ import (
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
 | 
			
		||||
	"github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors"
 | 
			
		||||
	"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
 | 
			
		||||
	"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
 | 
			
		||||
	"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
 | 
			
		||||
	"github.com/GoogleCloudPlatform/kubernetes/pkg/watch"
 | 
			
		||||
	"github.com/golang/glog"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
@@ -122,6 +124,10 @@ func (rm *ReplicationManager) watchControllers(resourceVersion *string) {
 | 
			
		||||
				// that called us call us again.
 | 
			
		||||
				return
 | 
			
		||||
			}
 | 
			
		||||
			if event.Type == watch.Error {
 | 
			
		||||
				glog.Errorf("error from watch during sync: %v", errors.FromObject(event.Object))
 | 
			
		||||
				continue
 | 
			
		||||
			}
 | 
			
		||||
			glog.V(4).Infof("Got watch: %#v", event)
 | 
			
		||||
			rc, ok := event.Object.(*api.ReplicationController)
 | 
			
		||||
			if !ok {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user