Repository: incubator-hawq Updated Branches: refs/heads/master e90db50e9 -> 2a72dfc67
HAWQ-677 Propagated ignore-bad-hosts flag to stop all segments Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/2a72dfc6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/2a72dfc6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/2a72dfc6 Branch: refs/heads/master Commit: 2a72dfc6781318ca4df796ccaa93007a37347a29 Parents: e90db50 Author: Bhuvnesh Chaudhary <[email protected]> Authored: Thu Apr 14 14:39:11 2016 -0700 Committer: rlei <[email protected]> Committed: Fri Apr 15 11:16:09 2016 +0800 ---------------------------------------------------------------------- tools/bin/hawq_ctl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2a72dfc6/tools/bin/hawq_ctl ---------------------------------------------------------------------- diff --git a/tools/bin/hawq_ctl b/tools/bin/hawq_ctl index 32752b6..aaab010 100755 --- a/tools/bin/hawq_ctl +++ b/tools/bin/hawq_ctl @@ -1199,8 +1199,9 @@ def hawq_activate_standby(opts, hawq_dict): else: logger.info("HAWQ master is not running, skip") + ignore_bad_hosts = '--ignore-bad-hosts' if opts.ignore_bad_hosts else '' logger.info("Stopping all the running segments") - cmd = "%s; hawq stop allsegments -a -M fast -q;" % source_hawq_env + cmd = "%s; hawq stop allsegments -a -M fast -q %s;" % (source_hawq_env, ignore_bad_hosts) result = remote_ssh(cmd, old_standby_host_name, '') if result != 0: logger.error("Stop segments failed, abort") @@ -1220,7 +1221,6 @@ def hawq_activate_standby(opts, hawq_dict): # Set current standby host name as the new master host name in configuration. logger.info("Update master host name in hawq-site.xml") - ignore_bad_hosts = '--ignore-bad-hosts' if opts.ignore_bad_hosts else '' cmd = "%s; hawq config -c hawq_master_address_host -v %s --skipvalidation -q %s" % (source_hawq_env, hawq_dict['hawq_standby_address_host'], ignore_bad_hosts) check_return_code(remote_ssh(cmd, old_standby_host_name, ''), logger, "Set hawq_master_address_host failed")
