nvazquez commented on a change in pull request #4646:
URL: https://github.com/apache/cloudstack/pull/4646#discussion_r714446603
##########
File path:
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
##########
@@ -654,6 +658,54 @@ public String interpret(final BufferedReader reader)
throws IOException {
}
}
+ /**
+ * setLiveMigrateFlags
+ *
+ * Sets the user configured live migration flags
+ *
+ * @param params
+ */
+ public void setLiveMigrateFlags(final Map<String, String> params) {
+ if (params.get(KVM_VM_MIGRATE_SPEED) != null) {
+ _migrateSpeed =
NumbersUtil.parseInt(params.get(KVM_VM_MIGRATE_SPEED), -1);
Review comment:
What about `NumbersUtil.parseInt(params.get(KVM_VM_MIGRATE_SPEED),
getDefaultMigrateSpeed());` instead? The next `if` block won't be needed
##########
File path:
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
##########
@@ -453,6 +457,12 @@
"Max length of vm userdata after base64 decoding. Default is 32768
and maximum is 1048576", true);
public static final ConfigKey<Boolean> MIGRATE_VM_ACROSS_CLUSTERS = new
ConfigKey<Boolean>(Boolean.class, "migrate.vm.across.clusters", "Advanced",
"false",
"Indicates whether the VM can be migrated to different cluster if
no host is found in same cluster",true, ConfigKey.Scope.Zone, null);
+ protected final ConfigKey<Integer> KvmVmMigrateSpeed = new
ConfigKey<>("Advanced", Integer.class, KVM_VM_MIGRATE_SPEED, "-1",
Review comment:
Would it make sense to reduce the scope of these setting to Cluster
level?
--
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]