You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sa...@apache.org on 2015/03/27 11:00:18 UTC

[1/2] git commit: updated refs/heads/master to e2fe8e6

Repository: cloudstack
Updated Branches:
  refs/heads/master 7144e9b35 -> e2fe8e649


CLOUDSTACK-8350: Volume attachment failed when user stops the VM during attaching DISK.


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

Branch: refs/heads/master
Commit: 5f5909141848649574c471ec2d2e8e295ef80a6c
Parents: 7144e9b
Author: Sanjay Tripathi <sa...@citrix.com>
Authored: Fri Mar 27 14:27:48 2015 +0530
Committer: Sanjay Tripathi <sa...@citrix.com>
Committed: Fri Mar 27 15:26:32 2015 +0530

----------------------------------------------------------------------
 server/src/com/cloud/storage/VolumeApiServiceImpl.java | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f590914/server/src/com/cloud/storage/VolumeApiServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeApiServiceImpl.java b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
index f04656a..cae1e1d 100644
--- a/server/src/com/cloud/storage/VolumeApiServiceImpl.java
+++ b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
@@ -1210,7 +1210,9 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
             destPrimaryStorage = _storagePoolDao.findById(exstingVolumeOfVm.getPoolId());
         }
 
-        if (destPrimaryStorage != null && (volumeToAttach.getState() == Volume.State.Allocated || volumeToAttach.getState() == Volume.State.Uploaded)) {
+        boolean volumeOnSecondary = volumeToAttach.getState() == Volume.State.Uploaded;
+
+        if (destPrimaryStorage != null && (volumeToAttach.getState() == Volume.State.Allocated || volumeOnSecondary)) {
             try {
                 newVolumeOnPrimaryStorage = _volumeMgr.createVolumeOnPrimaryStorage(vm, volumeToAttach, rootDiskHyperType, destPrimaryStorage);
             } catch (NoTransitionException e) {
@@ -1243,6 +1245,13 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
             }
         }
         VolumeVO newVol = _volsDao.findById(newVolumeOnPrimaryStorage.getId());
+        // Getting the fresh vm object in case of volume migration to check the current state of VM
+        if (moveVolumeNeeded || volumeOnSecondary) {
+            vm = _userVmDao.findById(vmId);
+            if (vm == null) {
+                throw new InvalidParameterValueException("VM not found.");
+            }
+        }
         newVol = sendAttachVolumeCommand(vm, newVol, deviceId);
         return newVol;
     }


[2/2] git commit: updated refs/heads/master to e2fe8e6

Posted by sa...@apache.org.
CLOUDSTACK-8351: Cloudstack https configuration wrong in server.xml


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

Branch: refs/heads/master
Commit: e2fe8e649919796545bdd825b18fc8b2c0c1da4b
Parents: 5f59091
Author: Sanjay Tripathi <sa...@citrix.com>
Authored: Fri Mar 27 15:10:54 2015 +0530
Committer: Sanjay Tripathi <sa...@citrix.com>
Committed: Fri Mar 27 15:29:17 2015 +0530

----------------------------------------------------------------------
 client/tomcatconf/server-nonssl.xml.in  | 4 ++--
 client/tomcatconf/server-ssl.xml.in     | 4 ++--
 client/tomcatconf/server7-nonssl.xml.in | 4 ++--
 client/tomcatconf/server7-ssl.xml.in    | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e2fe8e64/client/tomcatconf/server-nonssl.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/server-nonssl.xml.in b/client/tomcatconf/server-nonssl.xml.in
index e0debe4..01086fd 100755
--- a/client/tomcatconf/server-nonssl.xml.in
+++ b/client/tomcatconf/server-nonssl.xml.in
@@ -84,7 +84,7 @@
                maxThreads="150" scheme="https" secure="true"
                clientAuth="false" sslProtocol="TLS" sslEnabledProtocols="TLSv1.2,TLSv1.1"
                keystoreType="PKCS12"
-	       keystoreFile="conf\cloud-localhost.pk12" 
+	       keystoreFile="conf/cloud-localhost.pk12" 
 	       keystorePass="password"
                />
     -->
@@ -169,7 +169,7 @@
                maxThreads="150" scheme="https" secure="true"
                clientAuth="false" sslProtocol="TLS" 
                keystoreType="PKCS12"
-	       keystoreFile="conf\cloud-localhost.pk12" 
+	       keystoreFile="conf/cloud-localhost.pk12" 
 	       keystorePass="password"
                />
     -->

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e2fe8e64/client/tomcatconf/server-ssl.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/server-ssl.xml.in b/client/tomcatconf/server-ssl.xml.in
index 2e61251..729bf1a 100755
--- a/client/tomcatconf/server-ssl.xml.in
+++ b/client/tomcatconf/server-ssl.xml.in
@@ -84,7 +84,7 @@
                maxThreads="150" scheme="https" secure="true"
                clientAuth="false" sslProtocol="TLS" sslEnabledProtocols="TLSv1.2,TLSv1.1"
                keystoreType="PKCS12"
-	       keystoreFile="conf\cloud-localhost.pk12" 
+	       keystoreFile="conf/cloud-localhost.pk12" 
 	       keystorePass="password"
                />
     -->
@@ -190,7 +190,7 @@
                maxThreads="150" scheme="https" secure="true"
                clientAuth="false" sslProtocol="TLS" 
                keystoreType="PKCS12"
-	       keystoreFile="conf\cloud-localhost.pk12" 
+	       keystoreFile="conf/cloud-localhost.pk12" 
 	       keystorePass="password"
                />
     -->

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e2fe8e64/client/tomcatconf/server7-nonssl.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/server7-nonssl.xml.in b/client/tomcatconf/server7-nonssl.xml.in
index 7ea251a..d59f829 100755
--- a/client/tomcatconf/server7-nonssl.xml.in
+++ b/client/tomcatconf/server7-nonssl.xml.in
@@ -84,7 +84,7 @@
                maxThreads="150" scheme="https" secure="true"
                clientAuth="false" sslProtocol="TLS" sslEnabledProtocols="TLSv1.2,TLSv1.1"
                keystoreType="PKCS12"
-	       keystoreFile="conf\cloud-localhost.pk12"
+	       keystoreFile="conf/cloud-localhost.pk12"
 	       keystorePass="password"
                />
     -->
@@ -169,7 +169,7 @@
                maxThreads="150" scheme="https" secure="true"
                clientAuth="false" sslProtocol="TLS"
                keystoreType="PKCS12"
-	       keystoreFile="conf\cloud-localhost.pk12"
+	       keystoreFile="conf/cloud-localhost.pk12"
 	       keystorePass="password"
                />
     -->

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e2fe8e64/client/tomcatconf/server7-ssl.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/server7-ssl.xml.in b/client/tomcatconf/server7-ssl.xml.in
index 97421ba..2c30651 100755
--- a/client/tomcatconf/server7-ssl.xml.in
+++ b/client/tomcatconf/server7-ssl.xml.in
@@ -84,7 +84,7 @@
                maxThreads="150" scheme="https" secure="true"
                clientAuth="false" sslProtocol="TLS" sslEnabledProtocols="TLSv1.2,TLSv1.1"
                keystoreType="PKCS12"
-	       keystoreFile="conf\cloud-localhost.pk12"
+	       keystoreFile="conf/cloud-localhost.pk12"
 	       keystorePass="password"
                />
     -->
@@ -190,7 +190,7 @@
                maxThreads="150" scheme="https" secure="true"
                clientAuth="false" sslProtocol="TLS"
                keystoreType="PKCS12"
-	       keystoreFile="conf\cloud-localhost.pk12"
+	       keystoreFile="conf/cloud-localhost.pk12"
 	       keystorePass="password"
                />
     -->