mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
Disable creating StorPool logs when there isn't StorPool primary storage (#6317)
There is not need to create log files for StorPool driver when there isn't a StorPool primary storage
This commit is contained in:
parent
f8920b9312
commit
453bb57fd2
@ -89,9 +89,13 @@ public class StorPoolAbandonObjectsCollector extends ManagerBase implements Conf
|
||||
}
|
||||
|
||||
private void init() {
|
||||
List<StoragePoolVO> spPools = storagePoolDao.findPoolsByProvider(StorPoolUtil.SP_PROVIDER_NAME);
|
||||
if (CollectionUtils.isNotEmpty(spPools)) {
|
||||
StorPoolHelper.appendLogger(log, ABANDON_LOG, "abandon");
|
||||
}
|
||||
_volumeTagsUpdateExecutor = Executors.newScheduledThreadPool(2,
|
||||
new NamedThreadFactory("StorPoolAbandonObjectsCollector"));
|
||||
StorPoolHelper.appendLogger(log, ABANDON_LOG, "abandon");
|
||||
|
||||
if (volumeCheckupTagsInterval.value() > 0) {
|
||||
_volumeTagsUpdateExecutor.scheduleAtFixedRate(new StorPoolVolumesTagsUpdate(),
|
||||
volumeCheckupTagsInterval.value(), volumeCheckupTagsInterval.value(), TimeUnit.SECONDS);
|
||||
|
||||
@ -898,7 +898,7 @@ public class StorPoolPrimaryDataStoreDriver implements PrimaryDataStoreDriver {
|
||||
}
|
||||
|
||||
public void handleQualityOfServiceForVolumeMigration(VolumeInfo arg0, QualityOfServiceState arg1) {
|
||||
StorPoolUtil.spLog("handleQualityOfServiceForVolumeMigration with volume name=%s", arg0.getName());
|
||||
log.debug(String.format("handleQualityOfServiceForVolumeMigration with volume name=%s is not supported", arg0.getName()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -81,11 +81,11 @@ public class StorPoolSnapshotStrategy implements SnapshotStrategy {
|
||||
snapshotObj.processEvent(Snapshot.Event.BackupToSecondary);
|
||||
snapshotObj.processEvent(Snapshot.Event.OperationSucceeded);
|
||||
} catch (NoTransitionException ex) {
|
||||
StorPoolUtil.spLog("Failed to change state: " + ex.toString());
|
||||
log.debug("Failed to change state: " + ex.toString());
|
||||
try {
|
||||
snapshotObj.processEvent(Snapshot.Event.OperationFailed);
|
||||
} catch (NoTransitionException ex2) {
|
||||
StorPoolUtil.spLog("Failed to change state: " + ex2.toString());
|
||||
log.debug("Failed to change state: " + ex2.toString());
|
||||
}
|
||||
}
|
||||
return snapshotInfo;
|
||||
@ -126,7 +126,7 @@ public class StorPoolSnapshotStrategy implements SnapshotStrategy {
|
||||
|
||||
@Override
|
||||
public StrategyPriority canHandle(Snapshot snapshot, SnapshotOperation op) {
|
||||
StorPoolUtil.spLog("StorpoolSnapshotStrategy.canHandle: snapshot=%s, uuid=%s, op=%s", snapshot.getName(), snapshot.getUuid(), op);
|
||||
log.debug(String.format("StorpoolSnapshotStrategy.canHandle: snapshot=%s, uuid=%s, op=%s", snapshot.getName(), snapshot.getUuid(), op));
|
||||
|
||||
if (op != SnapshotOperation.DELETE) {
|
||||
return StrategyPriority.CANT_HANDLE;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user