sureshanaparti commented on code in PR #10860:
URL: https://github.com/apache/cloudstack/pull/10860#discussion_r2128325087
##########
server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java:
##########
@@ -4657,6 +4660,11 @@ private VolumeVO sendAttachVolumeCommand(UserVmVO vm,
VolumeVO volumeToAttach, L
try {
answer = (AttachAnswer)_agentMgr.send(hostId, cmd);
+ } catch (AgentUnavailableException e) {
+ if (host != null) {
+
volService.revokeAccess(volFactory.getVolume(volumeToAttach.getId()), host,
dataStore);
+ }
+ throw new CloudRuntimeException(String.format("%s. Please,
contact your system administrator", errorMsg));
Review Comment:
```suggestion
throw new CloudRuntimeException(String.format("%s.
Please contact your system administrator", errorMsg));
```
--
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]