trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sure...@apache.org
Subject [1/2] incubator-trafodion git commit: [TRAFODION-2476] pyinstaller - error in DCS HA configuration
Date Thu, 16 Feb 2017 16:43:28 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 4cc4305c7 -> 0465926da


[TRAFODION-2476] pyinstaller - error in DCS HA configuration


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/bd21beb5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/bd21beb5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/bd21beb5

Branch: refs/heads/master
Commit: bd21beb5fe77ba394cd5029062d6378505906fc7
Parents: 18cc630
Author: Eason <hfutmkby@gmail.com>
Authored: Fri Feb 10 23:43:47 2017 +0800
Committer: Eason <hfutmkby@gmail.com>
Committed: Fri Feb 10 23:43:47 2017 +0800

----------------------------------------------------------------------
 dcs/bin/dcs-config.sh                         | 2 +-
 install/python-installer/scripts/dcs_setup.py | 8 +++++++-
 install/python-installer/scripts/traf_user.py | 4 +++-
 3 files changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/bd21beb5/dcs/bin/dcs-config.sh
----------------------------------------------------------------------
diff --git a/dcs/bin/dcs-config.sh b/dcs/bin/dcs-config.sh
index bff96fa..b823807 100755
--- a/dcs/bin/dcs-config.sh
+++ b/dcs/bin/dcs-config.sh
@@ -87,7 +87,7 @@ fi
 if [ -f "${TRAF_HOME}/sqenv.sh" ]; then
   savedir=`pwd`
   cd $TRAF_HOME
-  . sqenv.sh
+  . ./sqenv.sh
   cd $savedir
 fi
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/bd21beb5/install/python-installer/scripts/dcs_setup.py
----------------------------------------------------------------------
diff --git a/install/python-installer/scripts/dcs_setup.py b/install/python-installer/scripts/dcs_setup.py
index 70e2239..bb8a712 100755
--- a/install/python-installer/scripts/dcs_setup.py
+++ b/install/python-installer/scripts/dcs_setup.py
@@ -42,6 +42,7 @@ def run():
     DCS_BKMASTER_FILE = DCS_CONF_DIR + '/backup-masters'
     DCS_SITE_FILE = DCS_CONF_DIR + '/dcs-site.xml'
     REST_SITE_FILE = '%s/rest-%s/conf/rest-site.xml' % (TRAF_HOME, TRAF_VER)
+    TRAFODION_CFG_FILE = '/etc/trafodion/trafodion_config'
 
     ### dcs setting ###
     # servers
@@ -77,8 +78,13 @@ def run():
         p.add_property('dcs.master.floating.ip.external.ip.address', dcs_floating_ip)
         p.rm_property('dcs.dns.interface')
 
+        # set DCS_MASTER_FLOATING_IP ENV for trafci
+        dcs_floating_ip_cfg = 'export DCS_MASTER_FLOATING_IP=%s' % dcs_floating_ip
+        append_file(TRAFODION_CFG_FILE, dcs_floating_ip_cfg)
+
         # modify backup_master
-        write_file(DCS_BKMASTER_FILE, dcs_backup_nodes)
+        for dcs_backup_node in dcs_backup_nodes.split(','):
+            append_file(DCS_BKMASTER_FILE, dcs_backup_node)
 
     p.write_xml()
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/bd21beb5/install/python-installer/scripts/traf_user.py
----------------------------------------------------------------------
diff --git a/install/python-installer/scripts/traf_user.py b/install/python-installer/scripts/traf_user.py
index 1d60ca0..3fa9237 100755
--- a/install/python-installer/scripts/traf_user.py
+++ b/install/python-installer/scripts/traf_user.py
@@ -26,6 +26,7 @@
 import os
 import sys
 import json
+import socket
 from common import ParseXML, run_cmd, append_file, mod_file, write_file, \
                    cmd_output, run_cmd_as_user, err, TMP_DIR
 
@@ -104,8 +105,9 @@ export ENABLE_HA="%s"
 export ZOOKEEPER_NODES="%s"
 export ZOOKEEPER_PORT="%s"
 export SECURE_HADOOP="%s"
+export CLUSTERNAME="%s"
 """ % (TRAF_HOME, dbcfgs['java_home'], ' '.join(nodes), ' -w ' + ' -w '.join(nodes),
-       str(len(nodes)), hadoop_type, dbcfgs['enable_ha'], zk_nodes, zk_port, dbcfgs['secure_hadoop'])
+       str(len(nodes)), hadoop_type, dbcfgs['enable_ha'], zk_nodes, zk_port, dbcfgs['secure_hadoop'],
socket.gethostname())
 
     run_cmd('mkdir -p %s' % TRAFODION_CFG_DIR)
     write_file(TRAFODION_CFG_FILE, trafodion_config)


Mime
View raw message