Skip to content

Commit 31f28f6

Browse files
GaOrtigaGabrielDaanHoogland
authored
Limit infrastructure details revealed to the end user after a failed migration on KVM (#8680)
* remove details when error occurs * Update plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java Co-authored-by: dahn <[email protected]> --------- Co-authored-by: Gabriel <[email protected]> Co-authored-by: dahn <[email protected]>
1 parent 45daa1c commit 31f28f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,8 @@ Use VIR_DOMAIN_XML_SECURE (value = 1) prior to v1.0.0.
308308
logger.error(String.format("Can't migrate domain [%s] due to: [%s].", vmName, e.getMessage()), e);
309309
result = e.getMessage();
310310
if (result.startsWith("unable to connect to server") && result.endsWith("refused")) {
311-
result = String.format("Migration was refused connection to destination: %s. Please check libvirt configuration compatibility and firewall rules on the source and destination hosts.", destinationUri);
311+
logger.debug("Migration failed as connection to destination [{}] was refused. Please check libvirt configuration compatibility and firewall rules on the source and destination hosts.", destinationUri);
312+
result = String.format("Failed to migrate domain [%s].", vmName);
312313
}
313314
} catch (final InterruptedException
314315
| ExecutionException

0 commit comments

Comments
 (0)