Skip to content

Commit 2be6c48

Browse files
rebase fixes
1 parent 1bc40eb commit 2be6c48

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/ScaleIOStorageAdaptor.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -183,16 +183,16 @@ private void validateMdmState(Map<String, String> details) {
183183

184184
// be as much verbose as possible, otherwise it will be difficult to troubleshoot operational issue without logs
185185
if (StringUtils.isEmpty(configValue)) {
186-
LOGGER.debug(String.format("Skipped ScaleIO validation as property %s not sent by Management Server", configKey));
186+
logger.debug(String.format("Skipped ScaleIO validation as property %s not sent by Management Server", configKey));
187187
} else if (Boolean.valueOf(configValue).equals(Boolean.FALSE)) {
188-
LOGGER.debug(String.format("Skipped ScaleIO validation as property %s received as %s", configKey, configValue));
188+
logger.debug(String.format("Skipped ScaleIO validation as property %s received as %s", configKey, configValue));
189189
} else {
190190
Collection<String> mdmsConfig = ScaleIOUtil.getMdmsFromConfig();
191191
Collection<String> mdmsCli = ScaleIOUtil.getMdmsFromCli();
192192
if (!mdmsCli.equals(mdmsConfig)) {
193193
String msg = String.format("MDM addresses from memory and configuration file don't match. " +
194194
"Memory values: %s, configuration file values: %s", mdmsCli, mdmsConfig);
195-
LOGGER.warn(msg);
195+
logger.warn(msg);
196196
throw new CloudRuntimeException(msg);
197197
}
198198
}
@@ -661,7 +661,7 @@ public Ternary<Boolean, Map<String, String>, String> prepareStorageClient(String
661661
if (!ScaleIOUtil.isMdmPresent(mdmAddresses[0])) {
662662
return new Ternary<>(false, null, "Failed to add MDMs");
663663
} else {
664-
LOGGER.debug(String.format("MDMs %s added to storage pool %s", mdms, uuid));
664+
logger.debug(String.format("MDMs %s added to storage pool %s", mdms, uuid));
665665
applyTimeout(details);
666666
}
667667
}
@@ -692,9 +692,9 @@ public Pair<Boolean, String> unprepareStorageClient(String uuid, Map<String, Str
692692
String configValue = details.get(configKey);
693693

694694
if (StringUtils.isEmpty(configValue)) {
695-
LOGGER.debug(String.format("Configuration key %s not provided", configKey));
695+
logger.debug(String.format("Configuration key %s not provided", configKey));
696696
} else {
697-
LOGGER.debug(String.format("Configuration key %s provided as %s", configKey, configValue));
697+
logger.debug(String.format("Configuration key %s provided as %s", configKey, configValue));
698698
}
699699
Boolean blockUnprepare = Boolean.valueOf(configValue);
700700
if (!ScaleIOUtil.isRemoveMdmCliSupported() && !ScaleIOUtil.getVolumeIds().isEmpty() && Boolean.TRUE.equals(blockUnprepare)) {
@@ -706,7 +706,7 @@ public Pair<Boolean, String> unprepareStorageClient(String uuid, Map<String, Str
706706
if (ScaleIOUtil.isMdmPresent(mdmAddresses[0])) {
707707
return new Pair<>(false, "Failed to remove MDMs, unable to unprepare the SDC client");
708708
} else {
709-
LOGGER.debug(String.format("MDMs %s removed from storage pool %s", mdms, uuid));
709+
logger.debug(String.format("MDMs %s removed from storage pool %s", mdms, uuid));
710710
applyTimeout(details);
711711
}
712712
}
@@ -735,24 +735,24 @@ private void applyTimeout(Map<String, String> details) {
735735
String configValue = details.get(configKey);
736736

737737
if (StringUtils.isEmpty(configValue)) {
738-
LOGGER.debug(String.format("Apply timeout value not defined in property %s, skip", configKey));
738+
logger.debug(String.format("Apply timeout value not defined in property %s, skip", configKey));
739739
return;
740740
}
741741
long timeoutMs;
742742
try {
743743
timeoutMs = Long.parseLong(configValue);
744744
} catch (NumberFormatException e) {
745-
LOGGER.warn(String.format("Invalid apply timeout value defined in property %s, skip", configKey), e);
745+
logger.warn(String.format("Invalid apply timeout value defined in property %s, skip", configKey), e);
746746
return;
747747
}
748748
if (timeoutMs < 1) {
749-
LOGGER.warn(String.format("Apply timeout value is too small (%s ms), skipping", timeoutMs));
749+
logger.warn(String.format("Apply timeout value is too small (%s ms), skipping", timeoutMs));
750750
return;
751751
}
752752
try {
753753
Thread.sleep(timeoutMs);
754754
} catch (InterruptedException e) {
755-
LOGGER.warn(String.format("Apply timeout %s ms interrupted", timeoutMs), e);
755+
logger.warn(String.format("Apply timeout %s ms interrupted", timeoutMs), e);
756756
}
757757
}
758758

plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/util/ScaleIOUtil.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
package org.apache.cloudstack.storage.datastore.util;
1919

20-
import org.apache.commons.collections.CollectionUtils;
2120
import org.apache.logging.log4j.Logger;
2221
import org.apache.logging.log4j.LogManager;
2322

0 commit comments

Comments
 (0)