You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/04/21 07:53:25 UTC

[jira] [Commented] (CLOUDSTACK-8855) Improve Error Message for Host Alert State

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

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

Github user bvbharatk commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/837#discussion_r60529246
  
    --- Diff: engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java ---
    @@ -971,33 +971,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");
             }
     
             if (host.getStatus() != Status.Up && host.getStatus() != Status.Alert && host.getStatus() != Status.Rebalancing) {
    -            s_logger.info("Unable to disconnect host because it is not in the correct state: host=" + hostId + "; Status=" + host.getStatus());
    -            return false;
    +            throw  new CloudRuntimeException("Unable to disconnect host because it is not in the correct state: host=" + hostId + "; Status=" + host.getStatus());
             }
     
             final AgentAttache attache = findAttache(hostId);
             if (attache == null) {
    -            s_logger.info("Unable to disconnect host because it is not connected to this server: " + hostId);
    -            return false;
    +            throw new CloudRuntimeException("Unable to disconnect host because it is not connected to this server: " + hostId);
             }
     
             disconnectWithoutInvestigation(attache, Event.ShutdownRequested);
    -        return true;
         }
     
         public boolean executeUserRequest(final long hostId, final Event event) throws AgentUnavailableException {
    --- End diff --
    
    @rodrigo93 
    This method is already a void. 


> 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.3.4#6332)