You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2020/04/23 12:24:14 UTC
[cloudstack] 01/03: Update AncientDataMotionStrategy.java
This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch volume-migration
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit 326d6f9e26f1a2f1d4d95ff3a99e7476d0711173
Author: div8cn <35...@users.noreply.github.com>
AuthorDate: Tue Mar 10 23:04:18 2020 +0800
Update AncientDataMotionStrategy.java
fix When secondary storage usage is> 90%, VOLUME migration across primary storage will cause the migration to fail and lose VOLUME
---
.../apache/cloudstack/storage/motion/AncientDataMotionStrategy.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java b/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
index bc49a53..327ff67 100644
--- a/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
+++ b/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
@@ -468,6 +468,9 @@ public class AncientDataMotionStrategy implements DataMotionStrategy {
if (answer != null && !answer.getResult()) {
errMsg = answer.getDetails();
}
+ if (answer == null) {
+ errMsg = "answer is null, set to error for CopyCommandResult";
+ }
} catch (Exception e) {
s_logger.debug("copy failed", e);
errMsg = e.toString();