Skip to content

Commit b8884ef

Browse files
authored
server: create DB entry for storage pool capacity when create storage pool (#4805)
* server: create DB entry for storage pool capacity when create storage pool * Revert "server: create DB entry for storage pool capacity when create storage pool" This reverts commit e790167. * server: create DB entry for storage pool capacity when create zone-wide storage pools
1 parent caa55a5 commit b8884ef

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

engine/storage/src/main/java/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ public DataStore attachCluster(DataStore store) {
173173

174174
public DataStore attachZone(DataStore store) {
175175
StoragePoolVO pool = this.dataStoreDao.findById(store.getId());
176+
storageMgr.createCapacityEntry(pool.getId());
176177
pool.setScope(ScopeType.ZONE);
177178
pool.setStatus(StoragePoolStatus.Up);
178179
this.dataStoreDao.update(pool.getId(), pool);
@@ -181,6 +182,7 @@ public DataStore attachZone(DataStore store) {
181182

182183
public DataStore attachZone(DataStore store, HypervisorType hypervisor) {
183184
StoragePoolVO pool = this.dataStoreDao.findById(store.getId());
185+
storageMgr.createCapacityEntry(pool.getId());
184186
pool.setScope(ScopeType.ZONE);
185187
pool.setHypervisor(hypervisor);
186188
pool.setStatus(StoragePoolStatus.Up);

0 commit comments

Comments
 (0)