cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-8704) Schedule restart of router VMs ahead of user VMs as part of HA
Date Tue, 04 Aug 2015 08:41:04 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-8704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14653280#comment-14653280
] 

ASF GitHub Bot commented on CLOUDSTACK-8704:
--------------------------------------------

Github user DaanHoogland commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/656#discussion_r36167770
  
    --- Diff: server/src/com/cloud/ha/HighAvailabilityManagerImpl.java ---
    @@ -261,25 +264,21 @@ public void scheduleRestartForVmsOnHost(final HostVO host, boolean
investigate)
             // send an email alert that the host is down, include VMs
             HostPodVO podVO = _podDao.findById(host.getPodId());
             String hostDesc = "name: " + host.getName() + " (id:" + host.getId() + "), availability
zone: " + dcVO.getName() + ", pod: " + podVO.getName();
    +        _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_HOST, host.getDataCenterId(),
host.getPodId(), "Host is down, " + hostDesc,
    +                "Host [" + hostDesc + "] is down." + ((sb != null) ? sb.toString() :
""));
     
    -        _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_HOST, host.getDataCenterId(),
host.getPodId(), "Host is down, " + hostDesc, "Host [" + hostDesc +
    -            "] is down." +
    -            ((sb != null) ? sb.toString() : ""));
    -
    -        if (vms != null) {
    -            for (VMInstanceVO vm : vms) {
    -                if (s_logger.isDebugEnabled()) {
    -                    s_logger.debug("Notifying HA Mgr of to restart vm " + vm.getId()
+ "-" + vm.getInstanceName());
    -                }
    -                vm = _instanceDao.findByUuid(vm.getUuid());
    -                Long hostId = vm.getHostId();
    -                if (hostId != null && !hostId.equals(host.getId())) {
    -                    s_logger.debug("VM " + vm.getInstanceName() + " is not on down host
" + host.getId() + " it is on other host "
    -                            + hostId + " VM HA is done");
    -                    continue;
    -                }
    -                scheduleRestart(vm, investigate);
    +        for (VMInstanceVO vm : reorderedVMList) {
    +            if (s_logger.isDebugEnabled()) {
    +                s_logger.debug("Notifying HA Mgr of to restart vm " + vm.getId() + "-"
+ vm.getInstanceName());
    +            }
    +            vm = _instanceDao.findByUuid(vm.getUuid());
    +            Long hostId = vm.getHostId();
    +            if (hostId != null && !hostId.equals(host.getId())) {
    --- End diff --
    
    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).


> 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)

Mime
View raw message