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)); ``` ########## server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java: ########## @@ -3165,6 +3166,8 @@ private Volume orchestrateDetachVolumeFromVM(long vmId, long volumeId) { try { answer = _agentMgr.send(hostId, cmd); + } catch (AgentUnavailableException e) { + 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: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org