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

cluster: add envs to skip topology sanity check in scale-in process #1627

Merged
merged 4 commits into from
Nov 22, 2021

Conversation

AstroProfundis
Copy link
Contributor

What problem does this PR solve?

Close #1616

What is changed and how it works?

Add 2 new environment variables in pkg/cluster/operation:

  • SKIP_SCALEIN_TOPO_CHECK: If not empty, skip topology sanity check so that it's possible to delete the last PD, the last TiKV and the last TiSpark master node with worker node remains
  • FORCE_PD_ENDPOINTS: A common separated list of available PD endpoints. Used to overwrite pd list in the topology, so that when there is no PD available in the topology tiup-cluster acknowledged but some are working in the actual cluster, it's still possible to scale in other instances

These two environment are very dangerous and are highly possible to make the cluster broken, so they are not supposed to be documented in any public documentations, they are only supposed to be used by developers and expert users who know 100% what they are doing.

Check List

Tests

  • Not tested, use as your own risk...

Code changes

  • Has exported function/method change

Release notes:

NONE

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Nov 18, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • nexustar

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.

@AstroProfundis AstroProfundis self-assigned this Nov 18, 2021
@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 18, 2021
@AstroProfundis AstroProfundis changed the title Issue 1616 cluster: add envs to skip topology sanity check in scale-in process Nov 18, 2021
@codecov-commenter
Copy link

codecov-commenter commented Nov 18, 2021

Codecov Report

Merging #1627 (4c6a6a7) into master (d4de166) will increase coverage by 25.10%.
The diff coverage is 27.65%.

❗ Current head 4c6a6a7 differs from pull request most recent head de2315b. Consider uploading reports for the commit de2315b to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1627       +/-   ##
===========================================
+ Coverage   15.59%   40.70%   +25.10%     
===========================================
  Files         151      260      +109     
  Lines       15234    23349     +8115     
===========================================
+ Hits         2376     9504     +7128     
- Misses      12341    12457      +116     
- Partials      517     1388      +871     
Flag Coverage Δ
cluster 37.30% <27.65%> (?)
dm 26.13% <4.25%> (?)
integrate 40.70% <27.65%> (+25.10%) ⬆️
tiup ?
unittest ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/cluster/operation/operation.go 71.42% <ø> (ø)
pkg/cluster/operation/scale_in.go 51.32% <18.75%> (ø)
pkg/cluster/operation/destroy.go 52.75% <42.85%> (ø)
pkg/cluster/operation/upgrade.go 58.53% <50.00%> (ø)
pkg/repository/store/store.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/repository/utils/hash.go 0.00% <0.00%> (-83.34%) ⬇️
pkg/repository/model/publish.go 0.00% <0.00%> (-83.34%) ⬇️
pkg/repository/store/local.go 0.00% <0.00%> (-82.61%) ⬇️
pkg/repository/progress.go 23.07% <0.00%> (-76.93%) ⬇️
pkg/telemetry/meta.go 0.00% <0.00%> (-67.40%) ⬇️
... and 247 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d4de166...de2315b. Read the comment docs.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 18, 2021
@AstroProfundis
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 533a951

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 22, 2021
@ti-chi-bot ti-chi-bot merged commit a713f26 into pingcap:master Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support delete all TiKV or PD servers when there are other TiKV or PD servers not in local storage.
4 participants