GutoVeronezi commented on a change in pull request #5789:
URL: https://github.com/apache/cloudstack/pull/5789#discussion_r773161741
##########
File path:
plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/driver/ScaleIOPrimaryDataStoreDriver.java
##########
@@ -629,7 +629,8 @@ public void copyAsync(DataObject srcData, DataObject
destData, Host destHost, As
private Answer copyTemplateToVolume(DataObject srcData, DataObject
destData, Host destHost) {
// Copy PowerFlex/ScaleIO template to volume
- LOGGER.debug("Initiating copy from PowerFlex template volume on host "
+ destHost != null ? destHost.getId() : "");
+ String debugMessage = "Initiating copy from PowerFlex template volume
on host ";
+ LOGGER.debug(destHost != null ? debugMessage + destHost.getId() :
debugMessage);
Review comment:
We could use `String.format` here:
```suggestion
LOGGER.debug(String.format("Initiating copy from PowerFlex template
volume on host %s", destHost != null ? destHost.getId() : ""));
```
##########
File path: server/src/main/java/com/cloud/storage/StorageManagerImpl.java
##########
@@ -2136,6 +2136,7 @@ public Host
findUpAndEnabledHostWithAccessToStoragePools(List<Long> poolIds) {
if (hostIds.isEmpty()) {
return null;
}
+ Collections.shuffle(hostIds);
Review comment:
I think we could add some log to this method, about which host was
selected (or not).
##########
File path:
plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/driver/ScaleIOPrimaryDataStoreDriver.java
##########
@@ -648,7 +649,8 @@ private Answer copyTemplateToVolume(DataObject srcData,
DataObject destData, Hos
private Answer copyVolume(DataObject srcData, DataObject destData, Host
destHost) {
// Copy PowerFlex/ScaleIO volume
- LOGGER.debug("Initiating copy from PowerFlex volume on host " +
destHost != null ? destHost.getId() : "");
+ String debugMessage = "Initiating copy from PowerFlex volume on host ";
+ LOGGER.debug(destHost != null ? debugMessage + destHost.getId() :
debugMessage);
Review comment:
We also could use `String.format` here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]