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

ASF GitHub Bot commented on HAWQ-109:
-------------------------------------

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

    https://github.com/apache/incubator-hawq/pull/59#discussion_r43373963
  
    --- Diff: tools/bin/hawq_ctl ---
    @@ -886,24 +897,47 @@ def hawq_activate_standby(opts, hawq_dict):
         if result != 0:
             logger.debug("Stop cluster failed, try to stop it immediately.")
             cmd = "%s; hawq stop cluster -a -M immediate;" % source_hawq_env
    -        local_ssh(cmd)
    +        result = local_ssh(cmd)
    +        if result != 0:
    +            logger.error("Stop cluster failed, exit.")
    +            sys.exit(1)
         cmd = "%s; hawq config -c hawq_master_address_host -v %s 
--skipvalidation -q" % (source_hawq_env, hawq_dict['hawq_standby_address_host'])
    -    local_ssh(cmd)
    +    result = local_ssh(cmd)
    +    if result != 0:
    +        logger.error("Set hawq_master_address_host  failed.")
    --- End diff --
    
    extra space before "failed"


> Fix exit code of hawq command line tools
> ----------------------------------------
>
>                 Key: HAWQ-109
>                 URL: https://issues.apache.org/jira/browse/HAWQ-109
>             Project: Apache HAWQ
>          Issue Type: Bug
>          Components: Command Line Tools
>            Reporter: Radar Lei
>            Assignee: Radar Lei
>
> If hawq command fails to perform a specific operation, we should ensure that 
> the return code is non-zero.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to