cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [cloudstack] 01/01: Merge remote-tracking branch 'origin/4.9'
Date Wed, 07 Jun 2017 06:14:57 GMT
This is an automated email from the ASF dual-hosted git repository.

bhaisaab pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit ed376fcad6a107fdb495a2c310fd4d1fe431c4dd
Merge: ccd623f 52232b9
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
AuthorDate: Wed Jun 7 11:21:27 2017 +0530

    Merge remote-tracking branch 'origin/4.9'
    
    Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

 .../cloudstack/api/command/user/vm/StopVMCmd.java  |  2 +-
 core/src/com/cloud/agent/api/StopCommand.java      | 13 ++++-
 .../com/cloud/vm/VirtualMachineManagerImpl.java    |  6 +--
 .../kvm/resource/LibvirtComputingResource.java     | 15 +++---
 .../wrapper/LibvirtStopCommandWrapper.java         |  3 +-
 .../hypervisor/vmware/resource/VmwareResource.java | 13 +++--
 .../xenserver/resource/CitrixResourceBase.java     | 11 ++--
 .../wrapper/xenbase/CitrixStopCommandWrapper.java  |  2 +-
 .../debian/config/opt/cloud/bin/configure.py       | 30 -----------
 .../debian/config/opt/cloud/bin/cs/CsVmPassword.py | 61 ++++++++++++++++++++++
 .../patches/debian/config/opt/cloud/bin/cs_vmp.py  | 27 ----------
 .../patches/debian/config/opt/cloud/bin/merge.py   | 20 +++----
 .../debian/config/opt/cloud/bin/update_config.py   | 22 +++++++-
 test/integration/smoke/test_vm_life_cycle.py       | 36 ++++++++++++-
 14 files changed, 172 insertions(+), 89 deletions(-)

diff --cc core/src/com/cloud/agent/api/StopCommand.java
index be68eef,869af3a..e1d68f8
--- a/core/src/com/cloud/agent/api/StopCommand.java
+++ b/core/src/com/cloud/agent/api/StopCommand.java
@@@ -28,7 -28,7 +28,8 @@@ public class StopCommand extends Reboot
      private String publicConsoleProxyIpAddress = null;
      private GPUDeviceTO gpuDevice;
      boolean checkBeforeCleanup = false;
 +    String controlIp = null;
+     boolean forceStop = false;
  
      protected StopCommand() {
      }
@@@ -84,11 -90,7 +91,15 @@@
          return this.checkBeforeCleanup;
      }
  
 +    public String getControlIp(){
 +        return controlIp;
 +    }
 +
 +    public void setControlIp(String controlIp){
-         this.controlIp =controlIp;
++        this.controlIp = controlIp;
++    }
++
+     public boolean isForceStop() {
+         return forceStop;
      }
  }
diff --cc engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
index 4106ccc,dfc48d5..8cc8de1
mode 100755,100644..100755
--- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@@ -1551,9 -1535,8 +1551,9 @@@ public class VirtualMachineManagerImpl 
          }
  
          vmGuru.prepareStop(profile);
-         StopCommand stpCmd = new StopCommand(vm, getExecuteInSequence(vm.getHypervisorType()),
false);
-         stpCmd.setControlIp(getControlNicIpForVM(vm));
-         final StopCommand stop = stpCmd;
+ 
+         final StopCommand stop = new StopCommand(vm, getExecuteInSequence(vm.getHypervisorType()),
false, cleanUpEvenIfUnableToStop);
++        stop.setControlIp(getControlNicIpForVM(vm));
  
          boolean stopped = false;
          Answer answer = null;
diff --cc plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index e763831,c88400b..71699c4
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@@ -2825,26 -2729,13 +2825,29 @@@ public class LibvirtComputingResource e
          DomainState state = null;
          Domain dm = null;
  
 +        // delete the metadata of vm snapshots before stopping
 +        try {
 +            dm = conn.domainLookupByName(vmName);
 +            cleanVMSnapshotMetadata(dm);
 +        } catch (LibvirtException e) {
 +            s_logger.debug("Failed to get vm :" + e.getMessage());
 +        } finally {
 +            try {
 +                if (dm != null) {
 +                    dm.free();
 +                }
 +            } catch (LibvirtException l) {
 +                s_logger.trace("Ignoring libvirt error.", l);
 +            }
 +        }
 +
          s_logger.debug("Try to stop the vm at first");
-         String ret = stopVM(conn, vmName, false);
+         if (forceStop) {
+             return stopVMInternal(conn, vmName, true);
+         }
+         String ret = stopVMInternal(conn, vmName, false);
          if (ret == Script.ERR_TIMEOUT) {
-             ret = stopVM(conn, vmName, true);
+             ret = stopVMInternal(conn, vmName, true);
          } else if (ret != null) {
              /*
               * There is a race condition between libvirt and qemu: libvirt

-- 
To stop receiving notification emails like this one, please contact
"commits@cloudstack.apache.org" <commits@cloudstack.apache.org>.

Mime
View raw message