Skip to content

host.reboot: fix detection of host up/down #332

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

ydirson
Copy link
Contributor

@ydirson ydirson commented Jun 25, 2025

When rebooting a master host, and no VM is running, it can get down fast enough that the ssh connection is closed on us. In this case (which we already handled) trying to open a new ssh connection to query xapi is never going to succeed. Even when a xapi master answers a slave is not enabled it is a bit of a stretch to conclude the host is down already.

Especially, the test for "host up" uses ping, and the host might still respond to a few pings before it actually shuts down. Instead, for robustness of the "host up" test, it is much more logical to use ping as well to decide the host is down.

When rebooting a master host, and no VM is running, it can get down fast
enough that the ssh connection is closed on us.  In this case (which we
already handled) trying to open a new ssh connection to query xapi is never
going to succeed. Even when a xapi master answers a slave is not enabled
it is a bit of a stretch to conclude the host is down already.

Especially, the test for "host up" uses ping, and the host might still
respond to a few pings before it actually shuts down.  Instead, for
robustness of the "host up" test, it is much more logical to use ping as
well to decide the host is down.
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.

1 participant