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

Handle VM not accessible during reboot #1367

Merged
merged 3 commits into from Sep 30, 2021
Merged

Conversation

electrofelix
Copy link
Contributor

@electrofelix electrofelix commented Sep 30, 2021

To support commands requesting a reboot of a VM after execution, the
query of ssh_info needs to avoid triggering an error when the IP address
is not yet retrievable as this indicates the VM would not be reachable.

Wrap the returning of the state in the driver to distinguish between the
following states:

  • :running - indicates the machine is available
  • :inaccessible - the machine is running but not yet available to
    connect

This is based on the behaviour from the virtualbox provider.

Includes some rudimentary tests to exercise the driver state code.

Closes: #1366

To support commands requesting a reboot of a VM after execution, the
query of ssh_info needs to avoid triggering an error when the IP address
is not yet retrievable as this indicates the VM would not be reachable.

Wrap the returning of the state in the driver to distinguish between the
following states:
* :running - indicates the machine is available
* :inaccessible - the machine is running but not yet available to
  connect

This is based on the behaviour from the virtualbox provider.

Includes some rudimentary tests to exercise the driver state code.
@electrofelix electrofelix marked this pull request as ready for review September 30, 2021 12:20
@electrofelix electrofelix enabled auto-merge (squash) September 30, 2021 12:28
@electrofelix electrofelix merged commit 81b6fb7 into master Sep 30, 2021
@electrofelix electrofelix deleted the handle-command-reboot-wait branch September 30, 2021 12:35
mmguero pushed a commit to mmguero-dev/vagrant-libvirt that referenced this pull request Oct 19, 2021
To support commands requesting a reboot of a VM after execution, the
query of ssh_info needs to avoid triggering an error when the IP address
is not yet retrievable as this indicates the VM would not be reachable.

Wrap the returning of the state in the driver to distinguish between the
following states:
- :running - indicates the machine is available
- :inaccessible - the machine is running but not yet available to
  connect

This is based on the behaviour from the virtualbox provider.

Includes some rudimentary tests to exercise the driver state code.

Closes: vagrant-libvirt#1366
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.

Vagrant up times out after a provisioner reboots the VM
1 participant