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

Make ceph tool behave more kindly when it can't connect #739

Closed
wants to merge 2 commits into from

Conversation

gregsfortytwo
Copy link
Member

We add the option to time out on all functions, and set a default timeout when --help is called, in order to print out what help is available locally.

We might have cluster_handle defined, but not have
successfully connected. Instead, check if it's in
the connected state.

Signed-off-by: Greg Farnum <greg@inktank.com>
Set up a check_for_local_options() function and a try_failure_options()
function. If we have "local options" (presently just "--help"), set a
2-second timeout on the cluster connection; if we fail, go into
try_failure_options(). try_failure_options() will do whatever is
appropriate given the passed-in commands; again, right now it just
prints out the help text if that was asked for.

To facilitate this and let people work around extreme network issues, add
a "--cluster-timeout" option and pass that into the cluster connect() function.
This can now be used to override our new default 2-second timeout on --help, or
to set a timeout after which other commands will give up (they presently will
try forever).

Signed-off-by: Greg Farnum <greg@inktank.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants