You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pr...@apache.org on 2014/01/17 23:29:11 UTC

git commit: updated refs/heads/4.3 to c2902db

Updated Branches:
  refs/heads/4.3 67bb66e54 -> c2902db0b


CLOUDSTACK-5895: CreateVolumeFromSnapshot can fail in a multiple pod environment with tagged storagepool

Changes:

    After finding the storagepool suitable to create the volume, we should not look for more pods


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

Branch: refs/heads/4.3
Commit: c2902db0b11c9bc8cf11e38aee8b4f683fe39cea
Parents: 67bb66e
Author: Prachi Damle <pr...@cloud.com>
Authored: Fri Jan 17 11:56:04 2014 -0800
Committer: Prachi Damle <pr...@cloud.com>
Committed: Fri Jan 17 14:05:22 2014 -0800

----------------------------------------------------------------------
 .../engine/orchestration/VolumeOrchestrator.java    | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c2902db0/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
index edc5985..1b8bd72 100644
--- a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
@@ -339,6 +339,12 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati
                 while ((pool = findStoragePool(dskCh, dc, pod.first(), null, null, null, poolsToAvoid)) != null) {
                     break;
                 }
+                if (pool != null) {
+                    if (s_logger.isDebugEnabled()) {
+                        s_logger.debug("Found a suitable pool for create volume: " + pool.getId());
+                    }
+                    break;
+                }
             }
         }
 
@@ -802,7 +808,7 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati
                 } catch (NoTransitionException e) {
                     s_logger.debug("Unable to destroy existing volume: " + e.toString());
                 }
-                
+
                 return newVolume;
             }
         });
@@ -1262,7 +1268,7 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati
         }
         return true;
     }
-    
+
     public static final ConfigKey<Long> MaxVolumeSize = new ConfigKey<Long>(Long.class,
         "storage.max.volume.size",
         "Storage",
@@ -1341,7 +1347,7 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati
         VolumeVO vol = _volsDao.findById(volumeId);
         return dataStoreMgr.getPrimaryDataStore(vol.getPoolId()).getUuid();
     }
-    
+
     @Override
     public void updateVolumeDiskChain(long volumeId, String path, String chainInfo) {
         VolumeVO vol = _volsDao.findById(volumeId);
@@ -1351,10 +1357,10 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati
             return;
         if(!vol.getPath().equalsIgnoreCase(path))
             needUpdate = true;
-        
+
         if(chainInfo != null && (vol.getChainInfo() == null || !chainInfo.equalsIgnoreCase(vol.getChainInfo())))
         	needUpdate = true;
-        
+
         if(needUpdate) {
         	s_logger.info("Update volume disk chain info. vol: " + vol.getId() + ", " + vol.getPath() + " -> " + path
         		+ ", " + vol.getChainInfo() + " -> " + chainInfo);