Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

Commit

Permalink
add enable_ha env in bashrc
Browse files Browse the repository at this point in the history
  • Loading branch information
mkby committed Nov 7, 2016
1 parent f1c3340 commit ed2f03e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions install/python-installer/bashrc.template
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions install/python-installer/db_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,13 +494,15 @@ 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')
g('dcs_backup_nodes')
# 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')
Expand Down
1 change: 0 additions & 1 deletion install/python-installer/traf_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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!'

Expand Down
3 changes: 2 additions & 1 deletion install/python-installer/traf_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit ed2f03e

Please sign in to comment.