Open olivierlambert opened 3 years ago
So by design XAPi won't try to evacuate non HA protected VM.
But the error message is quite misleading: HOST_NOT_ENOUGH_FREE_MEMORY
. IMHO a specific error message would be much better and more understable from a user POV. Something like VM_NOT_HA_PROTECTED_CANT_EVACUATE
.
What do you think? I think I talked about it with @psafont
I think having a specific message makes sense, flipping the what and the why in the name makes sense to me: VM_CANT_EVACUATE_NOT_PROTECTED
@robhoes any better ideas on the name of the error?
I think that we first need to understand where the error comes from. I wouldn't expect an error at all. A request to evacuate a host should just do that, regardless of the HA protection status of the VMs on that host.
I think the reasoning is when HA is enabled, you need to save RAM for HA protected VMs when evacuating. From my understanding it was a conscious choice evn though imho you still should try to migrate other vms after the protected ones.
I 'll try to point at the code why the error is thrown error here but I need to search a bit as it was not easy to figure out.
I still get this message on a recent 8.3 installation. It surprises me, because there is plenty of memory for all VMs on either host. The error also does not show the host so it's cryptic in that way. Perhaps an improvement could be that when HA is not enabled the memory would be calculated, or the error could be improved to indicate that HA is not enabled for a host ( and which one ).
Hi there!
So I'm reporting an issue I can easily reproduce in XCP-ng and CH 8.2 [1]. It's pretty easy to trigger, but the error message is completely… unrelated.
To trigger the issue, be sure to have:
Now try to do a
host.evacuate
. It will fail withHOST_NOT_ENOUGH_FREE_MEMORY
, regardless the amount of memory available. This does not happen if the VM is HA protected.Obviously, we did the test on a 1GiB VM while having 100GiB+ free memory on all hosts.
We also have public reports about this: https://xcp-ng.org/forum/post/36829 but also private tickets reporting the same behaviour.
Here is a trace as an example (
host.restart
is doinghost.evacuate
anyway):[1]: it's likely the issue is affect far older version of XCP-ng and XenServer, as if it was always there before. See this old issue which reported the exact same symptom 5 years ago: https://github.com/vatesfr/xen-orchestra/issues/1351