mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-7940: Exception printed completely on the UI. Not in a readable format.
This commit is contained in:
parent
4e896938ee
commit
dda2994936
@ -1924,7 +1924,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
|
||||
Answer ma = _agentMgr.send(vm.getLastHostId(), mc);
|
||||
if (ma == null || !ma.getResult()) {
|
||||
String details = (ma != null) ? ma.getDetails() : "null answer returned";
|
||||
throw new CloudRuntimeException("Unable to migrate due to " + details);
|
||||
throw new CloudRuntimeException(details);
|
||||
}
|
||||
} catch (OperationTimedoutException e) {
|
||||
if (e.isActive()) {
|
||||
|
||||
@ -968,7 +968,7 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati
|
||||
CommandResult result = future.get();
|
||||
if (result.isFailed()) {
|
||||
s_logger.debug("Failed to migrated vm " + vm + " along with its volumes. " + result.getResult());
|
||||
throw new CloudRuntimeException("Failed to migrated vm " + vm + " along with its volumes. " + result.getResult());
|
||||
throw new CloudRuntimeException("Failed to migrated vm " + vm + " along with its volumes. ");
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("Failed to migrated vm " + vm + " along with its volumes.", e);
|
||||
|
||||
@ -2953,9 +2953,8 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
}
|
||||
return new MigrateAnswer(cmd, true, "migration succeeded", null);
|
||||
} catch (Exception e) {
|
||||
String msg = "Catch Exception " + e.getClass().getName() + ": Migration failed due to " + e.toString();
|
||||
s_logger.warn(msg, e);
|
||||
return new MigrateAnswer(cmd, false, msg, null);
|
||||
s_logger.warn(e.getMessage(), e);
|
||||
return new MigrateAnswer(cmd, false, e.getMessage(), null);
|
||||
}
|
||||
|
||||
}
|
||||
@ -3360,7 +3359,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
throw new CloudRuntimeException("migrate VM catch HandleInvalid and VM is not running on dest host");
|
||||
}
|
||||
} catch (XenAPIException e) {
|
||||
String msg = "Unable to migrate VM(" + vmName + ") from host(" + _host.uuid + ") due to " + e.toString();
|
||||
String msg = "Unable to migrate VM(" + vmName + ") from host(" + _host.uuid + ")";
|
||||
s_logger.warn(msg, e);
|
||||
throw new CloudRuntimeException(msg);
|
||||
} finally {
|
||||
|
||||
@ -154,7 +154,7 @@ public class XenServerStorageMotionStrategy implements DataMotionStrategy {
|
||||
throw new CloudRuntimeException("Error while migrating the vm " + vm + " to host " + destHost);
|
||||
} else if (!receiveAnswer.getResult()) {
|
||||
s_logger.error("Migration with storage of vm " + vm + " failed. Details: " + receiveAnswer.getDetails());
|
||||
throw new CloudRuntimeException("Error while migrating the vm " + vm + " to host " + destHost + ". " + receiveAnswer.getDetails());
|
||||
throw new CloudRuntimeException("Error while migrating the vm " + vm + " to host " + destHost);
|
||||
}
|
||||
|
||||
MigrateWithStorageSendCommand sendCmd =
|
||||
@ -165,7 +165,7 @@ public class XenServerStorageMotionStrategy implements DataMotionStrategy {
|
||||
throw new CloudRuntimeException("Error while migrating the vm " + vm + " to host " + destHost);
|
||||
} else if (!sendAnswer.getResult()) {
|
||||
s_logger.error("Migration with storage of vm " + vm + " failed. Details: " + sendAnswer.getDetails());
|
||||
throw new CloudRuntimeException("Error while migrating the vm " + vm + " to host " + destHost + ". " + sendAnswer.getDetails());
|
||||
throw new CloudRuntimeException("Error while migrating the vm " + vm + " to host " + destHost);
|
||||
}
|
||||
|
||||
MigrateWithStorageCompleteCommand command = new MigrateWithStorageCompleteCommand(to);
|
||||
@ -175,7 +175,7 @@ public class XenServerStorageMotionStrategy implements DataMotionStrategy {
|
||||
throw new CloudRuntimeException("Error while migrating the vm " + vm + " to host " + destHost);
|
||||
} else if (!answer.getResult()) {
|
||||
s_logger.error("Migration with storage of vm " + vm + " failed. Details: " + answer.getDetails());
|
||||
throw new CloudRuntimeException("Error while migrating the vm " + vm + " to host " + destHost + ". " + answer.getDetails());
|
||||
throw new CloudRuntimeException("Error while migrating the vm " + vm + " to host " + destHost);
|
||||
} else {
|
||||
// Update the volume details after migration.
|
||||
updateVolumePathsAfterMigration(volumeToPool, answer.getVolumeTos());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user