StatefulSet should not launch Pod i, if a Pod in the sequence [0,i) has its
DeletionTimestamp set. Fixes 44229. Rename isTerminated to isTerminating Adds a test case for at the unit level to prevent regression
This commit is contained in:
@@ -132,6 +132,13 @@ func (ssc *defaultStatefulSetControl) UpdateStatefulSet(set *apps.StatefulSet, p
|
||||
if !isCreated(replicas[i]) {
|
||||
return ssc.podControl.CreateStatefulPod(set, replicas[i])
|
||||
}
|
||||
// If we find a Pod that is currently terminating, we must wait until graceful deletion
|
||||
// completes before we continue to make progress.
|
||||
if isTerminating(replicas[i]) {
|
||||
glog.V(2).Infof("StatefulSet %s is waiting for Pod %s to Terminate",
|
||||
set.Name, replicas[i].Name)
|
||||
return nil
|
||||
}
|
||||
// If we have a Pod that has been created but is not running and ready we can not make progress.
|
||||
// We must ensure that all for each Pod, when we create it, all of its predecessors, with respect to its
|
||||
// ordinal, are Running and Ready.
|
||||
|
Reference in New Issue
Block a user