Merge pull request #822 from DaanHoogland/CID-1324349

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

* pr/822:
  CID 1324349: conditionally return -1 or the dc id for the volume

Signed-off-by: Remi Bergsma <github@remi.nl>
This commit is contained in:
Remi Bergsma 2015-10-24 20:21:44 +02:00
commit 3d2b6f7434
1 changed files with 2 additions and 1 deletions

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);