cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [1/2] git commit: updated refs/heads/master to 479733f
Date Mon, 17 Aug 2015 10:04:00 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 4223c519d -> 479733f9f


CLOUDSTACK-8737: Remove out-of-band VR reboot code based on persistent VR configuration changes
Removed out-of-band VR reboot code


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f2f29525
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f2f29525
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f2f29525

Branch: refs/heads/master
Commit: f2f29525aed3fa21d5f6b3c3d9399b8df70467f3
Parents: caa524b
Author: Koushik Das <koushik@apache.org>
Authored: Mon Aug 17 14:49:32 2015 +0530
Committer: Koushik Das <koushik@apache.org>
Committed: Mon Aug 17 14:49:32 2015 +0530

----------------------------------------------------------------------
 .../router/VirtualNetworkApplianceManager.java  |  3 ---
 .../VirtualNetworkApplianceManagerImpl.java     | 26 ++++++--------------
 setup/db/db/schema-452to460-cleanup.sql         |  5 +++-
 3 files changed, 11 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f2f29525/server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java
index 20ee2a1..a291b35 100644
--- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java
@@ -44,7 +44,6 @@ public interface VirtualNetworkApplianceManager extends Manager, VirtualNetworkA
     static final String RouterTemplateOvm3CK = "router.template.ovm3";
     static final String SetServiceMonitorCK = "network.router.EnableServiceMonitoring";
     static final String RouterAlertsCheckIntervalCK = "router.alerts.check.interval";
-    static final String RouterReprovisionOnOutOfBandMigrationCK = "router.reboot.when.outofband.migrated";
 
     static final ConfigKey<String> RouterTemplateXen = new ConfigKey<String>(String.class,
RouterTemplateXenCK, "Advanced", "SystemVM Template (XenServer)",
             "Name of the default router template on Xenserver.", true, ConfigKey.Scope.Zone,
null);
@@ -68,8 +67,6 @@ public interface VirtualNetworkApplianceManager extends Manager, VirtualNetworkA
             "If true, router minimum required version is checked before sending command",
false);
     static final ConfigKey<Boolean> UseExternalDnsServers = new ConfigKey<Boolean>(Boolean.class,
"use.external.dns", "Advanced", "false",
             "Bypass internal dns, use external dns1 and dns2", true, ConfigKey.Scope.Zone,
null);
-    static final ConfigKey<Boolean> RouterReprovisionOnOutOfBandMigration = new ConfigKey<Boolean>(Boolean.class,
RouterReprovisionOnOutOfBandMigrationCK, "Advanced", "false",
-            "Reboot routers when they are migrated out of band in order to reprovision",
true, ConfigKey.Scope.Zone, null);
 
     public static final int DEFAULT_ROUTER_VM_RAMSIZE = 256;            // 256M
     public static final int DEFAULT_ROUTER_CPU_MHZ = 500;                // 500 MHz

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f2f29525/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
index 8ec7417..5a69855 100644
--- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -405,7 +405,6 @@ Configurable, StateListener<State, VirtualMachine.Event, VirtualMachine>
{
     ScheduledExecutorService _checkExecutor;
     ScheduledExecutorService _networkStatsUpdateExecutor;
     ExecutorService _rvrStatusUpdateExecutor;
-    ExecutorService _rebootRouterExecutor;
 
     BlockingQueue<Long> _vrUpdateQueue = null;
 
@@ -572,7 +571,6 @@ Configurable, StateListener<State, VirtualMachine.Event, VirtualMachine>
{
         _executor = Executors.newScheduledThreadPool(1, new NamedThreadFactory("RouterMonitor"));
         _checkExecutor = Executors.newScheduledThreadPool(1, new NamedThreadFactory("RouterStatusMonitor"));
         _networkStatsUpdateExecutor = Executors.newScheduledThreadPool(1, new NamedThreadFactory("NetworkStatsUpdater"));
-        _rebootRouterExecutor = Executors.newCachedThreadPool(new NamedThreadFactory("RebootRouterTask"));
 
         VirtualMachine.State.getStateMachine().registerListener(this);
 
@@ -2604,7 +2602,7 @@ Configurable, StateListener<State, VirtualMachine.Event, VirtualMachine>
{
 
     @Override
     public ConfigKey<?>[] getConfigKeys() {
-        return new ConfigKey<?>[] { UseExternalDnsServers, routerVersionCheckEnabled,
SetServiceMonitor, RouterAlertsCheckInterval, RouterReprovisionOnOutOfBandMigration };
+        return new ConfigKey<?>[] { UseExternalDnsServers, routerVersionCheckEnabled,
SetServiceMonitor, RouterAlertsCheckInterval };
     }
 
     @Override
@@ -2615,30 +2613,20 @@ Configurable, StateListener<State, VirtualMachine.Event, VirtualMachine>
{
 
     @Override
     public boolean postStateTransitionEvent(final StateMachine2.Transition<State, VirtualMachine.Event>
transition, final VirtualMachine vo, final boolean status, final Object opaque) {
-        final State oldState = transition.getCurrentState();
         final State newState = transition.getToState();
         final VirtualMachine.Event event = transition.getEvent();
-        boolean reprovision_out_of_band = RouterReprovisionOnOutOfBandMigration.value();
-        if (
-            (vo.getType() == VirtualMachine.Type.DomainRouter) &&
-            ((oldState == State.Stopped) || (reprovision_out_of_band && isOutOfBandMigrated(opaque)))
&&
-            (event == VirtualMachine.Event.FollowAgentPowerOnReport) &&
-            (newState == State.Running)) {
-                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) && (vo.getType() == VirtualMachine.Type.DomainRouter))
{
-                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);
-            }
+        if (vo.getType() == VirtualMachine.Type.DomainRouter &&
+            event == VirtualMachine.Event.FollowAgentPowerOnReport &&
+            newState == State.Running &&
+            isOutOfBandMigrated(opaque)) {
+                s_logger.debug("Virtual router " + vo.getInstanceName() + " is powered-on
out-of-band");
         }
 
         return true;
     }
 
     private boolean isOutOfBandMigrated(final Object opaque) {
+        // opaque -> <hostId, powerHostId>
         if (opaque != null && opaque instanceof Pair<?, ?>) {
             final Pair<?, ?> pair = (Pair<?, ?>)opaque;
             final Object first = pair.first();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f2f29525/setup/db/db/schema-452to460-cleanup.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-452to460-cleanup.sql b/setup/db/db/schema-452to460-cleanup.sql
index 4bbaa95..db5ce11 100644
--- a/setup/db/db/schema-452to460-cleanup.sql
+++ b/setup/db/db/schema-452to460-cleanup.sql
@@ -16,5 +16,8 @@
 -- under the License.
 
 --
--- Schema cleanup from 4.5.1 to 4.6.0
+-- Schema cleanup from 4.5.2 to 4.6.0
 --
+
+DELETE FROM `cloud`.`configuration` where name='router.reboot.when.outofband.migrated';
+


Mime
View raw message