mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
coverity 1311706: to generic exeption handling on xapi call
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
This commit is contained in:
parent
03e8176bab
commit
e62d952375
@ -5318,7 +5318,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
}
|
||||
|
||||
|
||||
public boolean AttachConfigDriveToMigratedVm(Connection conn, String vmName, String ipAddr) {
|
||||
public boolean attachConfigDriveToMigratedVm(Connection conn, String vmName, String ipAddr) {
|
||||
|
||||
// attach the config drive in destination host
|
||||
|
||||
@ -5375,8 +5375,14 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
|
||||
return true;
|
||||
|
||||
}catch (Exception ex) {
|
||||
s_logger.debug("Failed to attach config drive ISO to the VM "+ vmName + " In host " + ipAddr );
|
||||
} catch (BadServerResponse e) {
|
||||
s_logger.warn("Failed to attach config drive ISO to the VM "+ vmName + " In host " + ipAddr + " due to a bad server response.", e);
|
||||
return false;
|
||||
} catch (XenAPIException e) {
|
||||
s_logger.warn("Failed to attach config drive ISO to the VM "+ vmName + " In host " + ipAddr + " due to a xapi problem.", e);
|
||||
return false;
|
||||
} catch (XmlRpcException e) {
|
||||
s_logger.warn("Failed to attach config drive ISO to the VM "+ vmName + " In host " + ipAddr + " due to a problem in a remote call.", e);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ public final class CitrixMigrateCommandWrapper extends CommandWrapper<MigrateCom
|
||||
|
||||
// The iso can be attached to vm only once the vm is (present in the host) migrated.
|
||||
// Attach the config drive iso device to VM
|
||||
if (!citrixResourceBase.AttachConfigDriveToMigratedVm(conn, vmName, dstHostIpAddr)) {
|
||||
if (!citrixResourceBase.attachConfigDriveToMigratedVm(conn, vmName, dstHostIpAddr)) {
|
||||
s_logger.debug("Config drive ISO attach failed after migration for vm "+vmName);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user