mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
CLOUDSTACK-2947: fix create template from snapshot, in case of mix zone-wide/cluster wide primary storage
This commit is contained in:
parent
09f50ca506
commit
6b9ea1761a
@ -123,6 +123,10 @@ under the License.
|
||||
<priority value="DEBUG"/>
|
||||
</category>
|
||||
|
||||
<category name="org.apache.cloudstack">
|
||||
<priority value="DEBUG"/>
|
||||
</category>
|
||||
|
||||
<category name="com.cloud.utils.nio">
|
||||
<priority value="INFO"/>
|
||||
</category>
|
||||
|
||||
@ -361,9 +361,15 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C
|
||||
if (pool.getStatus() != StoragePoolStatus.Up) {
|
||||
continue;
|
||||
}
|
||||
ClusterVO cluster = _clusterDao.findById(pool.getClusterId());
|
||||
if (type == cluster.getHypervisorType()) {
|
||||
retPools.add(pool);
|
||||
if (pool.getScope() == ScopeType.ZONE) {
|
||||
if (pool.getHypervisor() != null && pool.getHypervisor() == type) {
|
||||
retPools.add(pool);
|
||||
}
|
||||
} else {
|
||||
ClusterVO cluster = _clusterDao.findById(pool.getClusterId());
|
||||
if (type == cluster.getHypervisorType()) {
|
||||
retPools.add(pool);
|
||||
}
|
||||
}
|
||||
}
|
||||
Collections.shuffle(retPools);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user