From 1491893bbc29089cfca938a4e417c1d09023ab04 Mon Sep 17 00:00:00 2001 From: alena Date: Mon, 22 Nov 2010 15:42:34 -0800 Subject: [PATCH] bug 7281: throw an exception when fail to get isoPath - happens when Secondary Storage vm is not in UP state in cloud.hosts table. status 7281: resolved fixed --- server/src/com/cloud/server/ManagementServerImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java index a526ddd34fc..1afc8713865 100755 --- a/server/src/com/cloud/server/ManagementServerImpl.java +++ b/server/src/com/cloud/server/ManagementServerImpl.java @@ -1008,7 +1008,10 @@ public class ManagementServerImpl implements ManagementServer { if (isIso) { Pair isoPath = _storageMgr.getAbsoluteIsoPath(templateId, dataCenterId); - assert(isoPath != null); + if (isoPath == null) { + s_logger.warn("Unable to get absolute path of the iso"); + throw new CloudRuntimeException("Unable to get absolute path of the iso"); + } try { started = _vmMgr.startVirtualMachine(userId, created.getId(), password, isoPath.first(), startEventId);