cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaanHoogland <...@git.apache.org>
Subject [GitHub] cloudstack pull request: CLOUDSTACK-8709 No out of band migrate al...
Date Sat, 08 Aug 2015 17:34:57 GMT
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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message