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 join script #285

Merged
merged 3 commits into from
Feb 26, 2019
Merged

fix join script #285

merged 3 commits into from
Feb 26, 2019

Conversation

weekface
Copy link
Contributor

@weekface weekface commented Feb 26, 2019

If the data directory has a join file, start pd-server with --join =args(it can't be empty), which is the contents of the join file, otherwise request the discovery service.

@tennix @xiaojingchen @onlymellb PTAL

@weekface
Copy link
Contributor Author

/run-e2e-tests

# The --join args must be:
# --join=http://demo-pd-0.demo-pd-peer.demo.svc:2380,http://demo-pd-1.demo-pd-peer.demo.svc:2380
join=`cat /var/lib/pd/join | tr "," "\n" | awk -F'=' '{print $2}' | tr "\n" ","`
join=${join%?}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it is better to use join=${join%,} instead of join=${join%?}, the former will only delete the last string that is a comma, the latter always deletes the last string, so the former is safer.

@weekface
Copy link
Contributor Author

/run-e2e-tests

Copy link
Member

@tennix tennix left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@onlymellb onlymellb left a comment

Choose a reason for hiding this comment

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

LGTM

@onlymellb onlymellb merged commit d23ff85 into pingcap:master Feb 26, 2019
@weekface weekface deleted the fix-join branch February 26, 2019 07:43
@weekface weekface added the test/stability stability tests label Feb 27, 2019
shuijing198799 pushed a commit to shuijing198799/tidb-operator that referenced this pull request Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test/stability stability tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants