CID 1324349: conditionally return -1 or the dc id for the volume

This commit is contained in:
Daan Hoogland 2015-09-14 15:22:52 +02:00
parent 5cacd99570
commit 24500bd0e4

View File

@ -239,7 +239,8 @@ public abstract class BaseImageStoreDriverImpl implements ImageStoreDriver {
result.setResult(answer.getErrorString());
caller.complete(result);
String msg = "Failed to upload volume: " + obj.getUuid() + " with error: " + answer.getErrorString();
_alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_UPLOAD_FAILED, volStoreVO.getZoneId(), null, msg, msg);
_alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_UPLOAD_FAILED,
(volStoreVO == null ? -1L : volStoreVO.getZoneId()), null, msg, msg);
s_logger.error(msg);
} else if (answer.getDownloadStatus() == VMTemplateStorageResourceAssoc.Status.DOWNLOADED) {
CreateCmdResult result = new CreateCmdResult(null, null);