sureshanaparti commented on a change in pull request #5750:
URL: https://github.com/apache/cloudstack/pull/5750#discussion_r778698334
##########
File path:
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/DataMigrationUtility.java
##########
@@ -87,19 +92,22 @@
* the migration is terminated.
*/
private boolean filesReadyToMigrate(Long srcDataStoreId) {
- String[] validStates = new String[]{"Ready", "Allocated",
"Destroying", "Destroyed", "Failed"};
+ State[] validStates = {State.Ready, State.Allocated, State.Destroying,
State.Destroyed, State.Failed};
boolean isReady = true;
List<TemplateDataStoreVO> templates =
templateDataStoreDao.listByStoreId(srcDataStoreId);
for (TemplateDataStoreVO template : templates) {
- isReady &=
(Arrays.asList(validStates).contains(template.getState().toString()));
+ isReady &=
(Arrays.asList(validStates).contains(template.getState()));
+ LOGGER.trace(String.format("template state: ",
template.getState()));
Review comment:
ignore toString() part, the state is not logged in the trace, check
other similar logs as well.
--
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]