weizhouapache commented on code in PR #8875:
URL: https://github.com/apache/cloudstack/pull/8875#discussion_r1549515586
##########
engine/storage/src/main/java/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java:
##########
@@ -265,4 +268,45 @@ public boolean deletePrimaryDataStore(DataStore store) {
return true;
}
-}
+ public void switchToZone(DataStore store) {
+ StoragePoolVO pool = dataStoreDao.findById(store.getId());
+ CapacityVO capacity = _capacityDao.findByHostIdType(store.getId(),
Capacity.CAPACITY_TYPE_STORAGE_ALLOCATED);
+ Transaction.execute(new TransactionCallbackNoReturn() {
+ public void doInTransactionWithoutResult(TransactionStatus status)
{
+ pool.setScope(ScopeType.ZONE);
+ pool.setPodId(null);
+ pool.setClusterId(null);
+ dataStoreDao.update(pool.getId(), pool);
Review Comment:
@abh1sar
it is set in recent releases.
However, in some older environments (earlier than #4307 ) , the hypervisor
type is NULL for cluster-wide pools.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]