Handle absent of lease SD when starting ha vm #660
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch looks like a hack but as we don't have enough time
to do that more cleanly for 4.5.3, we go this way in order to
address a significant issue with disaster recovery:
When registering an highly avilable VM on the secondary site
and trying to start it, the latter operation may fail due to
filtering hosts that didn't report a proper state for the
storage domain on which the VM lease was created.
The proposed solution is to add the VM to HaAutoStartVmsRunner
so we would keep trying to start it in that case. Specifically,
when we fail to find a host due to the filterng that is done
by VmLeasesReadyFilterPolicyUnit on an attempt to start the
VM by a request we get from outside (i.e., not internal
execution), we switch the VM to Down state with exit reason
that reflects an Error and then add it to the aforementioned
runner service.
Bug-Url: https://bugzilla.redhat.com/1974535