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

Fix imported pump & drainer start script #903

Merged
merged 9 commits into from
Nov 17, 2020

Conversation

lucklove
Copy link
Member

Signed-off-by: lucklove gnu.crazier@gmail.com

What problem does this PR solve?

#797

What is changed and how it works?

  • don't add --node-id flag for imported instance in start scripts (to avoid node-id change)
  • fetch the real node id from pd(etcd) instead of hard coding one

Check List

Tests

  • Manual test (add detailed scripts or steps below)
    • case 1
      • deploy a cluster with pump
      • modify the --node-id flag to anything others
      • modify meta.yaml and set imported: true for pump
      • try to scale-in that pump server
      • destroy the cluster
    • case 2
      • deploy a cluster with pump
      • modify meta.yaml and set imported: true for pump
      • reload cluster
      • the generated run_pump.sh should not contain --node-id flag
    • case 3
      • deploy a cluster with pump
      • scale-in pump

Related changes

  • Need to cherry-pick to the release branch

Release notes:

NONE

Signed-off-by: lucklove <gnu.crazier@gmail.com>
@codecov-io
Copy link

codecov-io commented Nov 12, 2020

Codecov Report

Merging #903 (dfe6b1f) into master (ffa217f) will decrease coverage by 26.91%.
The diff coverage is 5.26%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #903       +/-   ##
===========================================
- Coverage   44.03%   17.11%   -26.92%     
===========================================
  Files         260      154      -106     
  Lines       18911    11700     -7211     
===========================================
- Hits         8328     2003     -6325     
- Misses       9291     9294        +3     
+ Partials     1292      403      -889     
Flag Coverage Δ
cluster ?
dm ?
integrate 17.11% <5.26%> (-21.07%) ⬇️
playground 22.09% <0.00%> (-0.07%) ⬇️
tiup 10.67% <5.88%> (-0.04%) ⬇️
unittest ?

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

Impacted Files Coverage Δ
components/playground/playground.go 41.09% <0.00%> (ø)
pkg/cluster/api/binlog.go 0.00% <0.00%> (-15.74%) ⬇️
pkg/cluster/spec/drainer.go 0.00% <0.00%> (-59.58%) ⬇️
pkg/cluster/spec/pump.go 0.00% <0.00%> (-62.64%) ⬇️
pkg/cluster/embed/autogen_pkger.go 100.00% <100.00%> (ø)
pkg/meta/paths.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/utils/utils.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/utils/semver.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/cluster/spec/validate.go 0.00% <0.00%> (-93.04%) ⬇️
pkg/telemetry/scrub.go 0.00% <0.00%> (-86.67%) ⬇️
... and 186 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 ffa217f...dfe6b1f. Read the comment docs.

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 13, 2020
Copy link
Contributor

@july2993 july2993 left a comment

Choose a reason for hiding this comment

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

better test with the clusters imported since this issue fixes those clusters.

@lucklove
Copy link
Member Author

lucklove commented Nov 13, 2020

better test with the clusters imported since this issue fixes those clusters.

OK, I'm trying to deploy one with ansible, it's a little challenging...

@lucklove lucklove merged commit bd9a03a into pingcap:master Nov 17, 2020
@lucklove lucklove deleted the fix-binlog branch November 17, 2020 08:03
@lucklove lucklove added this to the v1.2.4 milestone Nov 19, 2020
@lucklove lucklove modified the milestone: v1.2.4 Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants