New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix(volume): fix unexpected pod restart during resize storage size #5602
Fix(volume): fix unexpected pod restart during resize storage size #5602
Conversation
73a4db3
to
afa4e56
Compare
afa4e56
to
45f8f57
Compare
pkg/manager/utils/configmap.go
Outdated
if !equality.Semantic.DeepEqual(cmInAnno.Data, cm.Data) { | ||
return false, fmt.Errorf("unexpected ConfigMap data change. comp=%s, name=%s, nameInAnno=%s", componentType, cm.Name, cmNameInAnno) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To ensure no ConfigMap data changed between delete and recreate STS
@@ -235,6 +235,9 @@ func (m *tiproxyMemberManager) syncStatefulSet(tc *v1alpha1.TidbCluster) error { | |||
} | |||
|
|||
if stsNotExist { | |||
if _, err := mngerutils.KeepConfigMapNameUnchangedWhenCreateSTS(klog.V(4), m.deps.ConfigMapLister, tc, v1alpha1.PDMemberType, cm); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TiProxyMemberType
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed. ab80380
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5602 +/- ##
==========================================
+ Coverage 61.49% 67.78% +6.28%
==========================================
Files 235 246 +11
Lines 30337 34278 +3941
==========================================
+ Hits 18655 23234 +4579
+ Misses 9813 9134 -679
- Partials 1869 1910 +41
|
if the configmap has been changed during paused stage, the FindConfigMapNameFromTCAnno refuse the creation. But in some situations, configmap data changes are expected, for example: changing config when the cluster is paused.
/run-all-tests |
/run-pull-e2e-kind-across-kubernetes |
/run-all-tests |
/run-pull-e2e-kind-basic |
/run-pull-e2e-kind-across-kubernetes |
/run-pull-e2e-kind-tikv-scale-simultaneously |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: csuzhangxc The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
/cherry-pick release-1.5 |
@csuzhangxc: once the present PR merges, I will cherry-pick it on top of release-1.5 in the new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@csuzhangxc: new pull request created to branch In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This PR fixes #5601. Store currently using ConfigMap name into tc.annotations before delete STS when do resize storage size. And then retrieve it to overwrite ConfigMap name in the STS recreation to remain name unchanged.
What problem does this PR solve?
What is changed and how does it work?
Code changes
Tests
Side effects
Related changes
Release Notes
Please refer to Release Notes Language Style Guide before writing the release note.