cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-8855) Improve Error Message for Host Alert State
Date Wed, 03 Jan 2018 09:10:00 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-8855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16309336#comment-16309336
] 

ASF GitHub Bot commented on CLOUDSTACK-8855:
--------------------------------------------

marcaurele commented on a change in pull request #837: CLOUDSTACK-8855 Improve Error Message
for Host Alert State and reconnect host API.
URL: https://github.com/apache/cloudstack/pull/837#discussion_r159381276
 
 

 ##########
 File path: engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java
 ##########
 @@ -986,33 +986,28 @@ public Answer easySend(final Long hostId, final Command cmd) {
     }
 
     @Override
-    public boolean reconnect(final long hostId) {
+    public void reconnect(final long hostId) throws CloudRuntimeException, AgentUnavailableException{
         HostVO host;
 
         host = _hostDao.findById(hostId);
         if (host == null || host.getRemoved() != null) {
-            s_logger.warn("Unable to find host " + hostId);
-            return false;
+            throw new CloudRuntimeException("Unable to find host " + hostId);
         }
 
         if (host.getStatus() == Status.Disconnected) {
-            s_logger.info("Host is already disconnected, no work to be done");
-            return true;
+            throw new CloudRuntimeException("Host is already disconnected, no work to be
done");
 
 Review comment:
   It looks pretty wrong to throw an exception when no action should be taken. What are the
logic to throw an exception here?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Improve Error Message for Host Alert State
> ------------------------------------------
>
>                 Key: CLOUDSTACK-8855
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8855
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>    Affects Versions: 4.6.0
>            Reporter: Bharat Kumar
>            Assignee: Bharat Kumar
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message