You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by sv...@apache.org on 2016/11/09 18:55:09 UTC
[5/6] incubator-trafodion git commit: add enable_ha env in bashrc
add enable_ha env in bashrc
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/ed2f03eb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/ed2f03eb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/ed2f03eb
Branch: refs/heads/master
Commit: ed2f03ebdb0e373b205abcba6769dd6455cd6ec3
Parents: f1c3340
Author: Eason <hf...@gmail.com>
Authored: Mon Nov 7 23:17:14 2016 +0800
Committer: Eason <hf...@gmail.com>
Committed: Mon Nov 7 23:17:14 2016 +0800
----------------------------------------------------------------------
install/python-installer/bashrc.template | 1 +
install/python-installer/db_install.py | 2 ++
install/python-installer/traf_package.py | 1 -
install/python-installer/traf_user.py | 3 ++-
4 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ed2f03eb/install/python-installer/bashrc.template
----------------------------------------------------------------------
diff --git a/install/python-installer/bashrc.template b/install/python-installer/bashrc.template
index ceed82a..d820285 100644
--- a/install/python-installer/bashrc.template
+++ b/install/python-installer/bashrc.template
@@ -49,6 +49,7 @@ export NODE_LIST="{{ node_list }}"
export MY_NODES="{{ my_nodes }}"
export node_count="{{ node_count }}"
export HADOOP_TYPE="{{ hadoop_type }}"
+export ENABLE_HA="{{ enable_ha }}"
#-------------------------------------------
# Execute the sqenv.sh script if it exists.
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ed2f03eb/install/python-installer/db_install.py
----------------------------------------------------------------------
diff --git a/install/python-installer/db_install.py b/install/python-installer/db_install.py
index 6ad676e..73cacaa 100755
--- a/install/python-installer/db_install.py
+++ b/install/python-installer/db_install.py
@@ -494,6 +494,7 @@ def user_input(options, prompt_mode=True, pwd=''):
# DCS HA
g('dcs_ha')
+ cfgs['enable_ha'] = 'false'
if cfgs['dcs_ha'].upper() == 'Y':
g('dcs_floating_ip')
g('dcs_interface')
@@ -501,6 +502,7 @@ def user_input(options, prompt_mode=True, pwd=''):
# check dcs backup nodes should exist in node list
if sorted(list(set((cfgs['dcs_backup_nodes'] + ',' + cfgs['node_list']).split(',')))) != sorted(cfgs['node_list'].split(',')):
log_err('Invalid DCS backup nodes, please pick up from node list')
+ cfgs['enable_ha'] = 'true'
if need_java_home:
g('java_home')
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ed2f03eb/install/python-installer/traf_package.py
----------------------------------------------------------------------
diff --git a/install/python-installer/traf_package.py b/install/python-installer/traf_package.py
index d0dbe39..c7cc043 100755
--- a/install/python-installer/traf_package.py
+++ b/install/python-installer/traf_package.py
@@ -36,7 +36,6 @@ def run():
TRAF_PACKAGE_FILE = '/tmp/' + dbcfgs['traf_package'].split('/')[-1]
run_cmd('mkdir -p %s' % TRAF_DIR)
run_cmd('tar xf %s -C %s' % (TRAF_PACKAGE_FILE, TRAF_DIR))
- run_cmd('rm -rf %s' % TRAF_PACKAGE_FILE)
print 'Trafodion package extracted successfully!'
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ed2f03eb/install/python-installer/traf_user.py
----------------------------------------------------------------------
diff --git a/install/python-installer/traf_user.py b/install/python-installer/traf_user.py
index 554ba2d..28e2c81 100755
--- a/install/python-installer/traf_user.py
+++ b/install/python-installer/traf_user.py
@@ -87,7 +87,8 @@ def run():
'{{ sq_home }}': SQ_ROOT,
'{{ hadoop_type }}': hadoop_type,
'{{ node_list }}': ' '.join(nodes),
- '{{ node_count }}':str(len(nodes)),
+ '{{ node_count }}': str(len(nodes)),
+ '{{ enable_ha }}': dbcfgs['enable_ha'],
'{{ my_nodes }}': ' -w ' + ' -w '.join(nodes)
}