mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Change exception when orchestrating VM start (#9062)
* Remove info about the environment from exception when starting VM * Change to log4j2 syntax --------- Co-authored-by: Lucas Martins <lucas.martins@scclouds.com.br>
This commit is contained in:
parent
d41dc17b2c
commit
dc1556ca38
@ -95,6 +95,7 @@ import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
|
|||||||
import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
|
import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
|
||||||
import org.apache.cloudstack.storage.to.VolumeObjectTO;
|
import org.apache.cloudstack.storage.to.VolumeObjectTO;
|
||||||
import org.apache.cloudstack.utils.identity.ManagementServerNode;
|
import org.apache.cloudstack.utils.identity.ManagementServerNode;
|
||||||
|
import org.apache.cloudstack.utils.reflectiontostringbuilderutils.ReflectionToStringBuilderUtils;
|
||||||
import org.apache.cloudstack.vm.UnmanagedVMsManager;
|
import org.apache.cloudstack.vm.UnmanagedVMsManager;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.collections.MapUtils;
|
import org.apache.commons.collections.MapUtils;
|
||||||
@ -5451,9 +5452,9 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
|
|||||||
try {
|
try {
|
||||||
orchestrateStart(vm.getUuid(), work.getParams(), work.getPlan(), _dpMgr.getDeploymentPlannerByName(work.getDeploymentPlanner()));
|
orchestrateStart(vm.getUuid(), work.getParams(), work.getPlan(), _dpMgr.getDeploymentPlannerByName(work.getDeploymentPlanner()));
|
||||||
} catch (CloudRuntimeException e){
|
} catch (CloudRuntimeException e){
|
||||||
String message = String.format("Unable to orchestrate start %s due to [%s].", vm.toString(), e.getMessage());
|
logger.error("Unable to orchestrate start {} due to [{}].", vm, e.getMessage());
|
||||||
logger.warn(message, e);
|
CloudRuntimeException ex = new CloudRuntimeException(String.format("Unable to orchestrate the start of VM instance %s.",
|
||||||
CloudRuntimeException ex = new CloudRuntimeException(message);
|
ReflectionToStringBuilderUtils.reflectOnlySelectedFields(vm, "instanceName", "uuid")));
|
||||||
return new Pair<>(JobInfo.Status.FAILED, JobSerializerHelper.toObjectSerializedString(ex));
|
return new Pair<>(JobInfo.Status.FAILED, JobSerializerHelper.toObjectSerializedString(ex));
|
||||||
}
|
}
|
||||||
return new Pair<>(JobInfo.Status.SUCCEEDED, null);
|
return new Pair<>(JobInfo.Status.SUCCEEDED, null);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user