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

engine: fix reboot on powering up VM #557

Merged
merged 1 commit into from Jul 28, 2022
Merged

Conversation

ljelinkova
Copy link
Collaborator

When the VM was powering UP and had the next run configuration, the cold reboot did not work. It had several reasons that have been fixed in this patch:

  1. the VM was just cleared based on getVmManager().getPowerOffTimeout()
  2. the VmAnalyzer:proceedDisappearedVm did not have RebootInProgress case and the default one was executed.
    However, the code never reached the setColdRebootFlag() as the VM was listed as asyncRunning and scheduled for rerun.
  3. the next run config was never applied as the VM was present in asyncRunning and never added to movedDown list.

Bug-Url: https://bugzilla.redhat.com/1912911

When the VM was powering UP and had the
next run configuration, the cold reboot did not
work. It had several reasons that have been fixed
in this patch:

1. the VM was just cleared based on getVmManager().getPowerOffTimeout()
2. the VmAnalyzer:proceedDisappearedVm did not have
RebootInProgress case and the default one was executed.
However, the code never reached the setColdRebootFlag() as
the VM was listed as asyncRunning and scheduled for rerun.
3. the next run config was never applied as the VM was present
in asyncRunning and never added to movedDown list.

Bug-Url: https://bugzilla.redhat.com/1912911
@ljelinkova
Copy link
Collaborator Author

/ost

Copy link
Member

@mz-pdm mz-pdm left a comment

Choose a reason for hiding this comment

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

Looks good to me but someone more familiar with the flows should approve it.

case PoweringDown:
if (getVmManager().isColdReboot()) {
setColdRebootFlag();
resourceManager.removeAsyncRunningVm(dbVm.getId());
Copy link
Member

Choose a reason for hiding this comment

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

Wondering what's the purpose of managing the "async running" VMs and what the VM removal from it here influences.

Copy link
Member

Choose a reason for hiding this comment

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

If I understand correctly, if a VM is in asyncRunningVms list, it means that the VM was just started, began migration or resuming. If such a VM goes down, it will be rerun. Otherwise, if the VM is not in asyncRunningVms list, it means that the VM was expected to go down and it should not be rerun.

Copy link
Member

Choose a reason for hiding this comment

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

I see, thank you for clarification. Then it indeed has its purpose here.

Copy link
Member

@smelamud smelamud left a comment

Choose a reason for hiding this comment

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

Looks good.

@sandrobonazzola sandrobonazzola added this to the ovirt-4.5.2 milestone Jul 27, 2022
@ahadas ahadas merged commit 14b24a8 into oVirt:master Jul 28, 2022
@ljelinkova ljelinkova deleted the reboot-vm branch August 10, 2022 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants