Skip to content
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

feat: force upgrade PD when PD replicas number is less than 2 #4107

Merged
merged 9 commits into from
Aug 30, 2021

Conversation

mianhk
Copy link
Contributor

@mianhk mianhk commented Jul 30, 2021

What problem does this PR solve?

close #1241

What is changed and how does it work?

Code changes

  • Has Go code change
  • Has CI related scripts change

Tests

  • Unit test
  • E2E test
  • Manual test
  • No code

Side effects

  • Breaking backward compatibility
  • Other side effects:

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release Notes

Please refer to Release Notes Language Style Guide before writing the release note.

Force upgrade PD  when PD replicas number is less than 2

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jul 30, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • DanielZhangQD
  • csuzhangxc

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

return nil
})
framework.ExpectNoError(err, "failed to upgrade TidbCluster: %q", tc.Name)
err = oa.WaitForTidbClusterReady(tc, 10*time.Minute, 5*time.Second)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still hard to check no gracefulUpgrade occurred?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's hard to check that, at least, the upgrade succeeds without adding annotation.

@codecov-commenter
Copy link

codecov-commenter commented Aug 14, 2021

Codecov Report

Merging #4107 (e3cc842) into master (d27f806) will increase coverage by 0.88%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4107      +/-   ##
==========================================
+ Coverage   69.48%   70.37%   +0.88%     
==========================================
  Files         182      182              
  Lines       21228    21231       +3     
==========================================
+ Hits        14751    14942     +191     
+ Misses       5326     5128     -198     
- Partials     1151     1161      +10     
Flag Coverage Δ
e2e 57.69% <25.00%> (+2.07%) ⬆️
unittest 61.20% <100.00%> (-0.01%) ⬇️

ginkgo.By(fmt.Sprintf("Force Upgrading tidb cluster from %s to %s with ignoring PD error", tc.Spec.Version, utilimage.TiDBLatest))
err = controller.GuaranteedUpdate(genericCli, tc, func() error {
tc.Spec.PD.BaseImage = "pingcap/pd"
tc.Spec.Version = utilimage.TiDBLatest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to update the version.

@DanielZhangQD
Copy link
Contributor

/run-all-tests

Copy link
Contributor

@DanielZhangQD DanielZhangQD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@csuzhangxc
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 5d28000

@DanielZhangQD
Copy link
Contributor

/run-all-tests

@DanielZhangQD
Copy link
Contributor

/test pull-e2e-kind

1 similar comment
@DanielZhangQD
Copy link
Contributor

/test pull-e2e-kind

@ti-chi-bot
Copy link
Member

@mianhk: Your PR was out of date, I have automatically updated it for you.

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.

@DanielZhangQD
Copy link
Contributor

/run-all-tests

2 similar comments
@tisonkun
Copy link

/run-all-tests

@mianhk
Copy link
Contributor Author

mianhk commented Aug 29, 2021

/run-all-tests

@DanielZhangQD
Copy link
Contributor

/test pull-e2e-kind

1 similar comment
@DanielZhangQD
Copy link
Contributor

/test pull-e2e-kind

@ti-chi-bot ti-chi-bot merged commit 19d98f4 into pingcap:master Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PD should be force upgraded when there's only one replica
6 participants