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/master to 6d86af8
Date Fri, 09 Aug 2013 06:59:12 GMT
Updated Branches:
  refs/heads/master 75cd6cce4 -> 6d86af85b


CLOUDSTACK-2729: increase waiting timeout for global file lock to 300 seconds


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

Branch: refs/heads/master
Commit: 6d86af85baa57bb20ec9642cbd1cd82c002dcfef
Parents: 75cd6cc
Author: Wei Zhou <w.zhou@leaseweb.com>
Authored: Fri Aug 9 08:58:46 2013 +0200
Committer: Wei Zhou <w.zhou@leaseweb.com>
Committed: Fri Aug 9 08:58:46 2013 +0200

----------------------------------------------------------------------
 .../com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6d86af85/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 8993094..8147e58 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
@@ -73,6 +73,7 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
     private String _mountPoint = "/mnt";
     private String _manageSnapshotPath;
     private String _lockfile = "KVMFILELOCK" + File.separator + ".lock";
+    private static final int ACQUIRE_GLOBAL_FILELOCK_TIMEOUT_FOR_KVM = 300; // 300 seconds
 
     private String rbdTemplateSnapName = "cloudstack-base-snap";
     private int rbdFeatures = (1<<0); /* Feature 1<<0 means layering in RBD format
2 */
@@ -1175,7 +1176,7 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
         }
         String lockFile = spd.getTargetPath() + File.separator + _lockfile;
         s_logger.debug("Attempting to lock pool " + pool.getName() + " with file " + lockFile);
-        if (lock(lockFile, 30)) {
+        if (lock(lockFile, ACQUIRE_GLOBAL_FILELOCK_TIMEOUT_FOR_KVM)) {
             try {
                 pool.refresh(0);
             } finally {
@@ -1195,7 +1196,7 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
         }
         String lockFile = pool.getLocalPath() + File.separator + _lockfile;
         s_logger.debug("Attempting to lock pool " + pool.getName() + " with file " + lockFile);
-        if (lock(lockFile, 30)) {
+        if (lock(lockFile, ACQUIRE_GLOBAL_FILELOCK_TIMEOUT_FOR_KVM)) {
             try {
                 vol.delete(0);
             } finally {


Mime
View raw message