mirror of https://github.com/apache/cloudstack.git
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 <rohit.yadav@shapeblue.com> * move StorageSubSystemCommand instanceof check above as CopyCommand is a type of StorageSubSystemCommand Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
a3938b330a
commit
462a37d1b4
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue