weizhouapache commented on a change in pull request #5373:
URL: https://github.com/apache/cloudstack/pull/5373#discussion_r697317698
##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -1411,7 +1411,15 @@ protected void
expungeVolumesInPrimaryStorageIfNeeded(VolumeVO volume) throws In
if (volOnPrimary != null) {
s_logger.info("Expunging volume " + volume.getId() + " from
primary data store");
AsyncCallFuture<VolumeApiResult> future =
volService.expungeVolumeAsync(volOnPrimary);
- future.get();
+ VolumeApiResult result = future.get();
+ if (result.isFailed()) {
+ s_logger.warn("Failed to expunge the volume " + volume + " in
primary storage");
+ String details = "";
+ if (result.getResult() != null &&
!result.getResult().isEmpty()) {
+ details = result.getResult();
+ }
+ throw new CloudRuntimeException(details);
+ }
Review comment:
@DaanHoogland sure. I will change it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]