Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,8 @@ static Boolean getFullCloneConfiguration(Long storeId) {
*/
List<String> getStoragePoolTagList(long poolId);

Answer sendToPool(long poolId, Command cmd) throws StorageUnavailableException;

Answer sendToPool(StoragePool pool, Command cmd) throws StorageUnavailableException;

Answer[] sendToPool(long poolId, Commands cmd) throws StorageUnavailableException;

Answer[] sendToPool(StoragePool pool, Commands cmds) throws StorageUnavailableException;

Expand All @@ -304,9 +301,8 @@ static Boolean getFullCloneConfiguration(Long storeId) {

/**
* Cleans up storage pools by removing unused templates.
* @param recurring - true if this cleanup is part of a recurring garbage collection thread
*/
void cleanupStorage(boolean recurring);
void cleanupStorage();

void createCapacityEntry(StoragePoolVO storagePool, short capacityType, long allocated);

Expand Down Expand Up @@ -340,7 +336,7 @@ static Boolean getFullCloneConfiguration(Long storeId) {

List<Long> getUpHostsInPool(long poolId);

void cleanupSecondaryStorage(boolean recurring);
void cleanupSecondaryStorage();

HypervisorType getHypervisorTypeFromFormat(ImageFormat format);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public List<StoragePool> select(DiskProfile dskCh, VirtualMachineProfile vmProfi
}

// Clean up all storage pools
storageMgr.cleanupStorage(false);
storageMgr.cleanupStorage();
// Determine what allocator to use
StoragePoolAllocator allocator;
if (dskCh.useLocalStorage()) {
Expand Down
18 changes: 4 additions & 14 deletions server/src/main/java/com/cloud/storage/StorageManagerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -1946,7 +1946,7 @@ private void cleanupInactiveTemplates() {
}

@Override
public void cleanupStorage(boolean recurring) {
public void cleanupStorage() {
GlobalLock scanLock = GlobalLock.getInternLock("storagemgr.cleanup");

try {
Expand Down Expand Up @@ -1987,7 +1987,7 @@ public void cleanupStorage(boolean recurring) {
}

cleanupSnapshotsFromStoreRefInDestroyingState();
cleanupSecondaryStorage(recurring);
cleanupSecondaryStorage();

List<VolumeVO> vols = volumeDao.listVolumesToBeDestroyed(new Date(System.currentTimeMillis() - ((long)StorageCleanupDelay.value() << 10)));
List<Long> rootVolumeVmIds = vols.stream()
Expand Down Expand Up @@ -2269,7 +2269,7 @@ private void handleManagedStorage(Volume volume) {

@Override
@DB
public void cleanupSecondaryStorage(boolean recurring) {
public void cleanupSecondaryStorage() {
// NOTE that object_store refactor will immediately delete the object from secondary storage when deleteTemplate etc api is issued.
// so here we don't need to issue DeleteCommand to resource anymore, only need to remove db entry.
try {
Expand Down Expand Up @@ -2944,7 +2944,7 @@ protected void runInContext() {
try {
logger.trace("Storage Garbage Collection Thread is running.");

cleanupStorage(true);
cleanupStorage();

} catch (Exception e) {
logger.error("Caught the following Exception", e);
Expand Down Expand Up @@ -3702,16 +3702,6 @@ public synchronized boolean registerHostListener(String providerName, Hypervisor
return true;
}

@Override
public Answer sendToPool(long poolId, Command cmd) throws StorageUnavailableException {
return null;
}

@Override
public Answer[] sendToPool(long poolId, Commands cmd) throws StorageUnavailableException {
return null;
}

@Override
public String getName() {
return null;
Expand Down
Loading