File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed
server/src/main/java/com/cloud/storage Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -504,7 +504,7 @@ public boolean isLocalStorageActiveOnHost(Long hostId) {
504504 List <StoragePoolHostVO > storagePoolHostRefs = _storagePoolHostDao .listByHostId (hostId );
505505 for (StoragePoolHostVO storagePoolHostRef : storagePoolHostRefs ) {
506506 StoragePoolVO PrimaryDataStoreVO = _storagePoolDao .findById (storagePoolHostRef .getPoolId ());
507- if (PrimaryDataStoreVO .getPoolType () == StoragePoolType .LVM || PrimaryDataStoreVO .getPoolType () == StoragePoolType .EXT ) {
507+ if (PrimaryDataStoreVO != null && ( PrimaryDataStoreVO .getPoolType () == StoragePoolType .LVM || PrimaryDataStoreVO .getPoolType () == StoragePoolType .EXT ) ) {
508508 SearchBuilder <VolumeVO > volumeSB = volumeDao .createSearchBuilder ();
509509 volumeSB .and ("poolId" , volumeSB .entity ().getPoolId (), SearchCriteria .Op .EQ );
510510 volumeSB .and ("removed" , volumeSB .entity ().getRemoved (), SearchCriteria .Op .NULL );
You can’t perform that action at this time.
0 commit comments