Repository: incubator-hawq Updated Branches: refs/heads/HAWQ-677 [created] a16fd9221
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/a16fd922 Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/a16fd922 Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/a16fd922 Branch: refs/heads/HAWQ-677 Commit: a16fd9221fbe491c8c2f549257d02bbd07211467 Parents: 1435927 Author: Bhuvnesh Chaudhary <[email protected]> Authored: Thu Apr 14 14:39:11 2016 -0700 Committer: Bhuvnesh Chaudhary <[email protected]> Committed: Thu Apr 14 14:39:11 2016 -0700 ---------------------------------------------------------------------- tools/bin/hawq_ctl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a16fd922/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")
