cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From weiz...@apache.org
Subject git commit: updated refs/heads/4.1 to 630d256
Date Thu, 08 Aug 2013 14:46:09 GMT
Updated Branches:
  refs/heads/4.1 a77f77c07 -> 630d2561d


CLOUDSTACK-2729: use spd.getTargetPath instead of mount path to fix issue on local storage
(cherry picked from commit b2ed632396fb57fedd7f88d36408299167f963c0)


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

Branch: refs/heads/4.1
Commit: 630d2561d2b13882892799507613823bcc04b4ac
Parents: a77f77c
Author: Wei Zhou <w.zhou@leaseweb.com>
Authored: Thu Aug 8 16:37:36 2013 +0200
Committer: Wei Zhou <w.zhou@leaseweb.com>
Committed: Thu Aug 8 16:43:47 2013 +0200

----------------------------------------------------------------------
 .../hypervisor/kvm/storage/LibvirtStorageAdaptor.java     | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/630d2561/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
index 3f0e6e5..a0936fb 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
@@ -883,15 +883,17 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
             pool.refresh(0);
             return;
         }
-        String lockFile = _mountPoint + File.separator + pool.getUUIDString() + File.separator
+ _lockfile;
+        String lockFile = spd.getTargetPath() + File.separator + _lockfile;
+        s_logger.debug("Attempting to lock pool " + pool.getName() + " with file " + lockFile);
         if (lock(lockFile, 30)) {
             try {
                 pool.refresh(0);
             } finally {
+                s_logger.debug("Releasing the lock on pool " + pool.getName() + " with file
" + lockFile);
                 unlock(lockFile);
             }
         } else {
-            throw new CloudRuntimeException("Can not get file lock to refresh the pool "
+ pool.getUUIDString());
+            throw new CloudRuntimeException("Can not get file lock to refresh the pool "
+ pool.getName());
         }
     }
 
@@ -902,14 +904,16 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
             return;
         }
         String lockFile = pool.getLocalPath() + File.separator + _lockfile;
+        s_logger.debug("Attempting to lock pool " + pool.getName() + " with file " + lockFile);
         if (lock(lockFile, 30)) {
             try {
                 vol.delete(0);
             } finally {
+                s_logger.debug("Releasing the lock on pool " + pool.getName() + " with file
" + lockFile);
                 unlock(lockFile);
             }
         } else {
-            throw new CloudRuntimeException("Can not get file lock to delete the volume "
+ vol.getPath());
+            throw new CloudRuntimeException("Can not get file lock to delete the volume "
+ vol.getName());
         }
     }
 


Mime
View raw message