You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2019/03/25 08:27:30 UTC
[cloudstack] branch master updated: server: make snapshotting on
KVM non-blocking (#3209)
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/master by this push:
new 462a37d server: make snapshotting on KVM non-blocking (#3209)
462a37d is described below
commit 462a37d1b4d394c9b600ee68c0ea877b0eee1af0
Author: Rohit Yadav <ro...@apache.org>
AuthorDate: Mon Mar 25 13:57:21 2019 +0530
server: make snapshotting on KVM non-blocking (#3209)
* server: make snapshotting on KVM non-blocking
This references and uses an already fixed solution from
https://github.com/MissionCriticalCloud/cosmic/pull/68 to make
snapshotting on KVM non-blocking.
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
* move StorageSubSystemCommand instanceof check above as CopyCommand is a type of StorageSubSystemCommand
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
---
server/src/main/java/com/cloud/hypervisor/KVMGuru.java | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/server/src/main/java/com/cloud/hypervisor/KVMGuru.java b/server/src/main/java/com/cloud/hypervisor/KVMGuru.java
index df6038d..c512f06 100644
--- a/server/src/main/java/com/cloud/hypervisor/KVMGuru.java
+++ b/server/src/main/java/com/cloud/hypervisor/KVMGuru.java
@@ -126,6 +126,10 @@ public class KVMGuru extends HypervisorGuruBase implements HypervisorGuru {
@Override
public Pair<Boolean, Long> getCommandHostDelegation(long hostId, Command cmd) {
+ if (cmd instanceof StorageSubSystemCommand) {
+ StorageSubSystemCommand c = (StorageSubSystemCommand)cmd;
+ c.setExecuteInSequence(false);
+ }
if (cmd instanceof CopyCommand) {
CopyCommand c = (CopyCommand) cmd;
boolean inSeq = true;
@@ -137,12 +141,11 @@ public class KVMGuru extends HypervisorGuruBase implements HypervisorGuru {
inSeq = false;
}
c.setExecuteInSequence(inSeq);
+ if (c.getSrcTO().getHypervisorType() == HypervisorType.KVM) {
+ return new Pair<>(true, hostId);
+ }
}
- if (cmd instanceof StorageSubSystemCommand) {
- StorageSubSystemCommand c = (StorageSubSystemCommand)cmd;
- c.setExecuteInSequence(false);
- }
- return new Pair<Boolean, Long>(false, new Long(hostId));
+ return new Pair<>(false, hostId);
}
@Override