You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by nv...@apache.org on 2026/04/18 02:39:25 UTC
(cloudstack) branch 4.22 updated: [KVM] Reorder migration logs to prevent populating agent logs on migrations (#12883)
This is an automated email from the ASF dual-hosted git repository.
nvazquez pushed a commit to branch 4.22
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.22 by this push:
new be89e6f7c37 [KVM] Reorder migration logs to prevent populating agent logs on migrations (#12883)
be89e6f7c37 is described below
commit be89e6f7c3784672cd0a9f8d0a0101c670162dd2
Author: Nicolas Vazquez <ni...@gmail.com>
AuthorDate: Fri Apr 17 23:39:19 2026 -0300
[KVM] Reorder migration logs to prevent populating agent logs on migrations (#12883)
* Move logs for values of the migration settings out of the loop
* Apply suggestions from code review
Co-authored-by: Suresh Kumar Anaparti <su...@gmail.com>
---------
Co-authored-by: Suresh Kumar Anaparti <su...@gmail.com>
---
.../kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java
index 43607edc53a..f54918bbc22 100644
--- a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java
+++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java
@@ -259,6 +259,12 @@ public final class LibvirtMigrateCommandWrapper extends CommandWrapper<MigrateCo
final int migrateDowntime = libvirtComputingResource.getMigrateDowntime();
boolean isMigrateDowntimeSet = false;
+ final int migrateWait = libvirtComputingResource.getMigrateWait();
+ logger.info("vm.migrate.wait value set to: {} secs for VM: {}", migrateWait, vmName);
+
+ final int migratePauseAfter = libvirtComputingResource.getMigratePauseAfter();
+ logger.info("vm.migrate.pauseafter value set to: {} ms for VM: {}", migratePauseAfter, vmName);
+
while (!executor.isTerminated()) {
Thread.sleep(100);
sleeptime += 100;
@@ -278,8 +284,6 @@ public final class LibvirtMigrateCommandWrapper extends CommandWrapper<MigrateCo
}
// abort the vm migration if the job is executed more than vm.migrate.wait
- final int migrateWait = libvirtComputingResource.getMigrateWait();
- logger.info("vm.migrate.wait value set to: {}for VM: {}", migrateWait, vmName);
if (migrateWait > 0 && sleeptime > migrateWait * 1000) {
DomainState state = null;
try {
@@ -306,8 +310,6 @@ public final class LibvirtMigrateCommandWrapper extends CommandWrapper<MigrateCo
}
// pause vm if we meet the vm.migrate.pauseafter threshold and not already paused
- final int migratePauseAfter = libvirtComputingResource.getMigratePauseAfter();
- logger.info("vm.migrate.pauseafter value set to: {} for VM: {}", migratePauseAfter, vmName);
if (migratePauseAfter > 0 && sleeptime > migratePauseAfter) {
DomainState state = null;
try {