Commit cd37aaaf authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #44487 from resouer/fix-ss-error

Automatic merge from submit-queue (batch tested with PRs 41498, 44487) Use len of pods in stateful set error **What this PR does / why we need it**: Sync stateful set reports wrong error, we need to fix it. **Release note**: ```release-note `NONE` ```
parents cdc0cbda cef629c6
...@@ -416,11 +416,10 @@ func (ssc *StatefulSetController) sync(key string) error { ...@@ -416,11 +416,10 @@ func (ssc *StatefulSetController) sync(key string) error {
// syncStatefulSet syncs a tuple of (statefulset, []*v1.Pod). // syncStatefulSet syncs a tuple of (statefulset, []*v1.Pod).
func (ssc *StatefulSetController) syncStatefulSet(set *apps.StatefulSet, pods []*v1.Pod) error { func (ssc *StatefulSetController) syncStatefulSet(set *apps.StatefulSet, pods []*v1.Pod) error {
glog.V(2).Infof("Syncing StatefulSet %v/%v with %d pods", set.Namespace, set.Name, len(pods)) glog.V(4).Infof("Syncing StatefulSet %v/%v with %d pods", set.Namespace, set.Name, len(pods))
if err := ssc.control.UpdateStatefulSet(set, pods); err != nil { if err := ssc.control.UpdateStatefulSet(set, pods); err != nil {
glog.V(2).Infof("Error syncing StatefulSet %s/%s with %d pods : %s", set.Namespace, set.Name, err)
return err return err
} }
glog.V(2).Infof("Successfully synced StatefulSet %s/%s successful", set.Namespace, set.Name) glog.V(4).Infof("Successfully synced StatefulSet %s/%s successful", set.Namespace, set.Name)
return nil return nil
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment