trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [trafodion] svarnau commented on a change in pull request #1802: [TRAFODION-3272] Change installer settings: TRAF_LOG, TRAF_CONF, TRAF_VAR
Date Mon, 04 Mar 2019 19:09:00 GMT
svarnau commented on a change in pull request #1802: [TRAFODION-3272] Change installer settings:
TRAF_LOG, TRAF_CONF, TRAF_VAR
URL: https://github.com/apache/trafodion/pull/1802#discussion_r262200568
 
 

 ##########
 File path: install/python-installer/db_uninstall.py
 ##########
 @@ -63,26 +63,21 @@ def main():
     else:
         pwd = ''
 
-    node_list = ''
-    # parse node list from trafodion_config
-    if os.path.exists(TRAF_CFG_FILE):
-        with open(TRAF_CFG_FILE, 'r') as f:
-            traf_cfgs = f.readlines()
-        try:
-            line = [l for l in traf_cfgs if 'NODE_LIST' in l][0]
-            node_list = re.search(r'NODE_LIST="(.*)"', line).groups()[0]
-        except Exception as e:
-            err_m('Cannot find node list info from %s: %s' % (TRAF_CFG_FILE, e))
-    # parse node list from installation config file
-    elif options.cfgfile:
+    try:
+      traf_var = run_cmd_as_user(TRAF_USER,"echo $TRAF_VAR")
+      node_list = run_cmd_as_user(TRAF_USER,"trafconf -name")
+    except:
+      if options.cfgfile:
         if not os.path.exists(options.cfgfile):
             err_m('Cannot find config file \'%s\'' % options.cfgfile)
         config_file = options.cfgfile
         p = ParseInI(config_file, 'dbconfigs')
         cfgs = p.load()
+        traf_var = cfgs['traf_var']
         node_list = cfgs['node_list']
-    # user input
-    else:
+      # user input
+      else:
+        traf_conf = '/var/lib/trafodion'
 
 Review comment:
   Good catch. I will fix it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message