Repository navigation
CLOUDSTACK-8704: Schedule restart of router VMs ahead of user VMs as … - #656
Conversation
|
cloudstack-pull-rats #199 ABORTED |
There was a problem hiding this comment.
no biggy for this PR, but why is this chack needed? The vms are retrieved by the host id of the host being down in the first place (see line 240).
There was a problem hiding this comment.
@DaanHoogland The host check you are referring to existed even before this PR. One reason for the check is to ensure that the VM has not moved to another host since the time it was fetched using listByHostId(). If it has moved to another host (and vmsync has updated the host id) then no need to perform restart/HA.
|
cloudstack-pull-requests #896 ABORTED |
There was a problem hiding this comment.
I suppose this is needed for the extra tests. Can you explain?
There was a problem hiding this comment.
Yes. "_workers" is the set of worker threads that perform HA related tasks in HighAvaiabilityManagerImpl class. As part of the test wakeupWorkers() methods get invoked which needs _workers to be initialized.
|
code LGTM. |
|
cloudstack-pull-analysis #132 ABORTED |
There was a problem hiding this comment.
@koushik-das To identify VRs in this list, vm.getType().equals(VirtualMachine.Type.DomainRouter) would be better, instead of relying on the Vm name. Also, in the mentioned code SSVM and CPVM get higher priority than UserVms.
There was a problem hiding this comment.
@kishankavala Although the issue was seen only with VR, the fix is to schedule restart of system VMs ahead of user VMs.
|
@koushik-das Thanks for the fix! I was testing this on KVM tonight but run into an unrelated issue. Will try to verify your fix tomorrow so we can merge it soon. |
|
cloudstack-pull-requests #925 FAILURE |
|
cloudstack-pull-rats #228 SUCCESS |
|
@kishankavala Made the change to use VM type instead of name to distinguish between user and system VMs |
|
cloudstack-pull-analysis #161 SUCCESS |
|
@koushik-das I'll be testing this tonight and will merge if it's OK. Before I proceed, could you please squash the 3 commits into 1. I cannot merge it like this (because of the merge of master into your branch). |
|
@koushik-das you can solve it like this:
|
|
@remibergsma Will the following work?
|
|
Hi @koushik-das Sorry to step in like this, but I talked to @remibergsma and I think you can fix your branch by doing this: If you do this, please double-check the result (it should be your two commits together at the top), and then do to update this PR. I hope this helps. |
|
Thanks @miguelaferreira :-) |
|
Hi @koushik-das I was able to test your PR and it seems to do what you said: start the system VMs before the other instances. However, it doesn't solve the problem completely. In my case, I had two routers and a bunch of VMs. The routers started first, but when the first instance was started the router was not yet ready. CloudStack then destroyed the router, and on the next HA run about 5-10 minutes later everything was started properly. If you want my full logs, let me know and I'll put them somewhere. |
|
@remibergsma Thanks for testing the PR. This is a best-effort fix. The change just schedules the restart of the system VMs ahead of the user VMs. Now if there are fewer VMs for restart, there is a higher probability of all restart jobs getting executed at the same time by the HA-worker thread pool. In this case the fix won't be effective. If there are more VMs then the effectiveness of the fix increases. |
|
@koushik-das Check. If you fix the commits, I'll LGTM and merge. Let me know if you need help. |
cabc9ea to
23bfbf4
Compare
|
@remibergsma I have fixed the commits, please check. |
|
cloudstack-pull-rats #242 SUCCESS |
|
cloudstack-pull-requests #939 SUCCESS |
|
Travis failure is due to timeout. |
|
cloudstack-pull-analysis #175 SUCCESS |
|
@koushik-das Thanks, glad the merge commit is gone now. Do you want to keep two commits? I'd say squash them together. From the subject line I cannot tell the difference. Let me know and I'll proceed. |
|
@remibergsma Yes the commits can be squashed. |
|
@koushik-das Check, please squash and then force push again. After that I'll merge it. |
…part of HA VRs are scheduled for HA ahead of user VMs
23bfbf4 to
44c1ef0
Compare
|
cloudstack-pull-rats #247 SUCCESS |
|
cloudstack-pull-requests #944 ABORTED |
|
@koushik-das Thank you! |
CLOUDSTACK-8704: Schedule restart of router VMs ahead of user VMs as part of HA VRs are scheduled for HA ahead of user VMs. Refer to the bug for more details. * pr/656: CLOUDSTACK-8704: Schedule restart of router VMs ahead of user VMs as part of HA VRs are scheduled for HA ahead of user VMs Signed-off-by: Remi Bergsma <github@remi.nl>
|
@remibergsma ahum,... LGTM |
|
cloudstack-pull-analysis #180 SUCCESS |
|
@DaanHoogland You already gave your LGTM? See here: #656 (comment) |
Fixes #644 Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
…part of HA
VRs are scheduled for HA ahead of user VMs.
Refer to the bug for more details.