[
https://issues.apache.org/jira/browse/CLOUDSTACK-8704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14659506#comment-14659506
]
ASF GitHub Bot commented on CLOUDSTACK-8704:
--------------------------------------------
Github user kishankavala commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/656#discussion_r36381969
--- Diff: server/src/com/cloud/ha/HighAvailabilityManagerImpl.java ---
@@ -242,16 +242,19 @@ public void scheduleRestartForVmsOnHost(final HostVO
host, boolean investigate)
// send an email alert that the host is down
StringBuilder sb = null;
+ List<VMInstanceVO> reorderedVMList = new ArrayList<VMInstanceVO>();
if ((vms != null) && !vms.isEmpty()) {
sb = new StringBuilder();
- sb.append(" Starting HA on the following VMs: ");
+ sb.append(" Starting HA on the following VMs:");
// collect list of vm names for the alert email
- VMInstanceVO vm = vms.get(0);
- if (vm.isHaEnabled()) {
- sb.append(" " + vm);
- }
- for (int i = 1; i < vms.size(); i++) {
- vm = vms.get(i);
+ for (int i = 0; i < vms.size(); i++) {
+ VMInstanceVO vm = vms.get(i);
+ String name = vm.getInstanceName();
+ if (name.startsWith("i-")) {
--- End diff --
@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.
> Schedule restart of router VMs ahead of user VMs as part of HA
> --------------------------------------------------------------
>
> Key: CLOUDSTACK-8704
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8704
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Management Server
> Affects Versions: 4.5.0
> Reporter: Koushik Das
> Assignee: Koushik Das
> Fix For: 4.6.0
>
>
> When a host is detected as Down, HA-enabled VMs running on it are scheduled
> for restart. There may be scenarios where both user VM and corresponding VR
> is on the same host and scheduled for restart. In such cases user VM restart
> will fail in initial attempts until VR is restarted. One way to reduce these
> occurrences is to schedule VR restart ahead of user VMs.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)