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

vttablet: ignore errors if extracted gh-ost binary is identical to installed binary #6928

Merged

Conversation

shlomi-noach
Copy link
Contributor

Partial fix to #6924

This fix is most useful for development environments. When vttablet starts, it tries to extract gh-ost. If unable to, it checks whether gh-ost is already installed and is identical to the intended version. If so, vttablet ignores the error and proceeds.

… to installed binary

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
@shlomi-noach shlomi-noach requested a review from a team October 22, 2020 12:19
Copy link
Member

@deepthi deepthi left a comment

Choose a reason for hiding this comment

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

Found a typo.

ghostBinary, err := riceBox.Bytes("gh-ost")
if err != nil {
return err
}
if err := ioutil.WriteFile(binaryFileName, ghostBinary, 0755); err != nil {
// One possibility of failure is that gh-ost is up and running. In that case,
// let's pause and check if running h-ost is exact same binary as the one we wish to extract.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// let's pause and check if running h-ost is exact same binary as the one we wish to extract.
// let's pause and check if the running gh-ost is exact same binary as the one we wish to extract.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

typo fixed

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
@shlomi-noach shlomi-noach merged commit eb6377d into vitessio:master Nov 1, 2020
@shlomi-noach shlomi-noach deleted the vttablet-startup-extract-gh-ost branch November 1, 2020 09:00
@askdba askdba added this to the v9.0 milestone Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants