Skip to content

Commit

Permalink
Merge branch 'master' into ebs_validate_volume_number
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot[bot] authored Sep 27, 2023
2 parents 33d85b4 + 3f8c788 commit 010c96b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/manager/volumes/pvc_modifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,8 @@ func (p *pvcModifier) endEvictLeader(tc *v1alpha1.TidbCluster, pod *corev1.Pod)
if _, err := p.deps.KubeClientset.CoreV1().Pods(pod.Namespace).Update(context.TODO(), pod, metav1.UpdateOptions{}); err != nil {
return fmt.Errorf("delete leader eviction annotation to pod %s/%s failed: %s", pod.Namespace, pod.Name, err)
}
}

if !isLeaderEvictionFinished(tc, pod) {
// Return an error once after deleting annotation, to give pod_control a chance to stop the eviction.
// (but do not block / re-check in case the eviction here maybe manually requested by user via annotation)
return fmt.Errorf("wait for leader eviction of %s/%s finished", pod.Namespace, pod.Name)
}

Expand Down

0 comments on commit 010c96b

Please sign in to comment.