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

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

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

    https://github.com/apache/cloudstack/pull/666#discussion_r36580162
  
    --- Diff: 
server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java ---
    @@ -2627,7 +2627,7 @@ public boolean postStateTransitionEvent(final 
StateMachine2.Transition<State, Vi
                     s_logger.info("Schedule a router reboot task as router " + 
vo.getId() + " is powered-on out-of-band. we need to reboot to refresh network 
rules");
                     _rebootRouterExecutor.execute(new RebootTask(vo.getId()));
             } else {
    -            if (isOutOfBandMigrated(opaque)) {
    +            if (isOutOfBandMigrated(opaque) && (vo.getType() == 
VirtualMachine.Type.DomainRouter)) {
    --- End diff --
    
    @koushik-das A first shot:
    
            final VirtualMachine.Event event = transition.getEvent();
            boolean outOfBandMigrated = isOutOfBandMigrated(opaque);
            boolean reprovision_out_of_band = 
RouterReprovisionOnOutOfBandMigration.value() && outOfBandMigrated;
            if ( (vo.getType() == VirtualMachine.Type.DomainRouter)) {
                if (
                        (event == 
VirtualMachine.Event.FollowAgentPowerOnReport) &&
                        (newState == State.Running) &&
                        ((oldState == State.Stopped) || 
(reprovision_out_of_band))
                    ) {
                    s_logger.info("Schedule a router reboot task as router " + 
vo.getId() + " is powered-on out-of-band. we need to reboot to refresh network 
rules");
                    _rebootRouterExecutor.execute(new RebootTask(vo.getId()));
                } else {
                    if (outOfBandMigrated) {
                        final String title = "Router has been migrated out of 
band: " + vo.getInstanceName();
                        final String context =
                                "An out of band migration of router " + 
vo.getInstanceName() + "(" + vo.getUuid() + ") was detected. No automated 
action was performed.";
                        
_alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_DOMAIN_ROUTER, 
vo.getDataCenterId(), vo.getPodIdToDeployIn(), title, context);
                    }
                }
            }
    It can probably be more clean up even. I saw none but dummy tests are there 
for this class so I want to create that as well before committing


> Received out-of-band alert from migrating user instance
> -------------------------------------------------------
>
>                 Key: CLOUDSTACK-8709
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8709
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>    Affects Versions: 4.4.4
>         Environment: Seen on KVM and ACS 4.4.4
>            Reporter: Remi Bergsma
>            Assignee: Remi Bergsma
>             Fix For: 4.6.0
>
>
> When migrating an instance using migrateVirtualMachine API call, this alert 
> is generated:
> 2015-08-05 14:53:03,057 WARN  [apache.cloudstack.alerts] 
> (Work-Job-Executor-2:ctx-58ebe691 job-803495/job-803497 ctx-7eb41cc0)  
> alertType:: 9 // dataCenterId:: 2 // podId:: 4 // clusterId:: null // 
> message:: Router has been migrated out of band: i-625-20061-VM
> Problem:
> - this is not a router
> - there is a migrate in progress, that leads to a VM that is running on 
> multiple hypervisors for a short while.
> - this could also happen when one migrates a router to another hypervisor
> Not verified on master yet.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to