Skip to content

Conversation

@shlomi-noach
Copy link
Contributor

Running gh-ost with --check-flag is a way of testing for existence of other flags. You may be using different versions of gh-ost, possibly testing a new version that has a new feature. It's now possible to validate that gh-ost supports a flag.

Running with --check-flag doesn't actually do anything. The app terminates immediately, with:

  • return code 0 if all flags are good (flags that normally require a value must get such value)
  • return code 1 if one or more flags are not recognized, or are missing a value.

Examples:

Returning exit code 0

  • gh-ost --check-flag --initially-drop-socket-file
  • gh-ost --check-flag --initially-drop-socket-file --nice-ratio 0

Returning nonzero exit code

  • gh-ost --check-flag --no-such-flag
  • gh-ost --check-flag --initially-drop-socket-file --nice-ratio

@shlomi-noach
Copy link
Contributor Author

We will be using this new feature in our automation scripts; for example, we might want to execute a resurrect ; the flag will let us know if --resurrect is supported.

@shlomi-noach shlomi-noach merged commit 6bcf515 into master Dec 30, 2016
@shlomi-noach shlomi-noach deleted the check-flag branch December 30, 2016 05:58
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.

2 participants