cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kous...@apache.org
Subject git commit: updated refs/heads/master to 88f64b2
Date Fri, 06 Dec 2013 04:19:07 GMT
Updated Branches:
  refs/heads/master 425723e16 -> 88f64b2b9


Changed 'MigrateCommand' to use the global setting value of 'execute.in.sequence.hypervisor.commands'

Signed-off-by: Koushik Das <koushik@apache.org>


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

Branch: refs/heads/master
Commit: 88f64b2b93a3898e7868e9e55c1feca57b2ed48e
Parents: 425723e
Author: Alex Ough <alex.ough@sungard.com>
Authored: Thu Dec 5 09:25:41 2013 -0600
Committer: Koushik Das <koushik@apache.org>
Committed: Fri Dec 6 09:41:50 2013 +0530

----------------------------------------------------------------------
 core/src/com/cloud/agent/api/MigrateCommand.java               | 6 ++++--
 engine/api/src/com/cloud/vm/VirtualMachineManager.java         | 2 +-
 .../src/com/cloud/vm/VirtualMachineManagerImpl.java            | 4 ++--
 setup/db/db/schema-430to440.sql                                | 4 +++-
 4 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/88f64b2b/core/src/com/cloud/agent/api/MigrateCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/MigrateCommand.java b/core/src/com/cloud/agent/api/MigrateCommand.java
index 0d8f70c..e79c8a5 100644
--- a/core/src/com/cloud/agent/api/MigrateCommand.java
+++ b/core/src/com/cloud/agent/api/MigrateCommand.java
@@ -24,15 +24,17 @@ public class MigrateCommand extends Command {
     String hostGuid;
     boolean isWindows;
     VirtualMachineTO vmTO;
+    boolean executeInSequence = false;
 
     protected MigrateCommand() {
     }
 
-    public MigrateCommand(String vmName, String destIp, boolean isWindows, VirtualMachineTO
vmTO) {
+    public MigrateCommand(String vmName, String destIp, boolean isWindows, VirtualMachineTO
vmTO, boolean executeInSequence) {
         this.vmName = vmName;
         this.destIp = destIp;
         this.isWindows = isWindows;
         this.vmTO = vmTO;
+        this.executeInSequence = executeInSequence;
     }
 
     public boolean isWindows() {
@@ -61,6 +63,6 @@ public class MigrateCommand extends Command {
 
     @Override
     public boolean executeInSequence() {
-        return true;
+        return executeInSequence;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/88f64b2b/engine/api/src/com/cloud/vm/VirtualMachineManager.java
----------------------------------------------------------------------
diff --git a/engine/api/src/com/cloud/vm/VirtualMachineManager.java b/engine/api/src/com/cloud/vm/VirtualMachineManager.java
index fbbed21..7292d65 100644
--- a/engine/api/src/com/cloud/vm/VirtualMachineManager.java
+++ b/engine/api/src/com/cloud/vm/VirtualMachineManager.java
@@ -49,7 +49,7 @@ import com.cloud.utils.fsm.NoTransitionException;
  */
 public interface VirtualMachineManager extends Manager {
     static final ConfigKey<Boolean> ExecuteInSequence = new ConfigKey<Boolean>("Advanced",
Boolean.class, "execute.in.sequence.hypervisor.commands", "false",
-        "If set to true, StartCommand, StopCommand, CopyCommand will be synchronized on the
agent side."
+        "If set to true, StartCommand, StopCommand, CopyCommand, MigrateCommand will be synchronized
on the agent side."
                 + " If set to false, these commands become asynchronous. Default value is
false.", true);
 
     public interface Topics {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/88f64b2b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
index 5136130..d4bbbe6 100755
--- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -1723,7 +1723,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
         boolean migrated = false;
         try {
             boolean isWindows = _guestOsCategoryDao.findById(_guestOsDao.findById(vm.getGuestOSId()).getCategoryId()).getName().equalsIgnoreCase("Windows");
-            MigrateCommand mc = new MigrateCommand(vm.getInstanceName(), dest.getHost().getPrivateIpAddress(),
isWindows, to);
+            MigrateCommand mc = new MigrateCommand(vm.getInstanceName(), dest.getHost().getPrivateIpAddress(),
isWindows, to, ExecuteInSequence.value());
             mc.setHostGuid(dest.getHost().getGuid());
 
             try {
@@ -3536,7 +3536,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
         boolean migrated = false;
         try {
             boolean isWindows = _guestOsCategoryDao.findById(_guestOsDao.findById(vm.getGuestOSId()).getCategoryId()).getName().equalsIgnoreCase("Windows");
-            MigrateCommand mc = new MigrateCommand(vm.getInstanceName(), dest.getHost().getPrivateIpAddress(),
isWindows, to);
+            MigrateCommand mc = new MigrateCommand(vm.getInstanceName(), dest.getHost().getPrivateIpAddress(),
isWindows, to, ExecuteInSequence.value());
             mc.setHostGuid(dest.getHost().getGuid());
 
             try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/88f64b2b/setup/db/db/schema-430to440.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-430to440.sql b/setup/db/db/schema-430to440.sql
index 8098ad8..f4dc2e6 100644
--- a/setup/db/db/schema-430to440.sql
+++ b/setup/db/db/schema-430to440.sql
@@ -211,4 +211,6 @@ CREATE VIEW `cloud`.`volume_view` AS
             left join
         `cloud`.`async_job` ON async_job.instance_id = volumes.id
             and async_job.instance_type = 'Volume'
-            and async_job.job_status = 0;
\ No newline at end of file
+            and async_job.job_status = 0;
+
+UPDATE `cloud`.`configuration` SET `description` = 'If set to true, StartCommand, StopCommand,
CopyCommand, MigrateCommand will be synchronized on the agent side. If set to false, these
commands become asynchronous. Default value is true.' WHERE `name` = 'execute.in.sequence.hypervisor.commands';


Mime
View raw message