You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by su...@apache.org on 2017/05/31 18:47:43 UTC

[42/50] [abbrv] incubator-trafodion git commit: Added persist node section to Python installer scripts.

Added persist node section to Python installer scripts.


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

Branch: refs/heads/master
Commit: 5196656354789906f53fe7ff5d4500725010131a
Parents: 16ef85d
Author: Zalo Correa <za...@esgyn.com>
Authored: Tue May 2 18:33:20 2017 -0700
Committer: Zalo Correa <za...@esgyn.com>
Committed: Tue May 2 18:33:20 2017 -0700

----------------------------------------------------------------------
 core/sqf/sql/scripts/sqconfig.persist           | 87 ++++++++++++++++++++
 .../python-installer/scripts/traf_sqconfig.py   | 13 ++-
 2 files changed, 92 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/51966563/core/sqf/sql/scripts/sqconfig.persist
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/sqconfig.persist b/core/sqf/sql/scripts/sqconfig.persist
new file mode 100644
index 0000000..4de7fd8
--- /dev/null
+++ b/core/sqf/sql/scripts/sqconfig.persist
@@ -0,0 +1,87 @@
+# @@@ START COPYRIGHT @@@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# @@@ END COPYRIGHT @@@
+
+begin persist
+
+#
+# The following PROCESS_TYPEs are persistent and have special process management:
+#    DTM
+#    TMID
+#    SSMP
+#    PSD
+#    WDG
+#
+# Generic persistent processes are of PROCESS_TYPE:
+#    PERSIST
+#
+
+PERSIST_PROCESS_KEYS = DTM,TMID,SSCP,SSMP,PSD,WDG
+
+DTM_PROCESS_NAME     = $TM%nid+
+DTM_PROCESS_TYPE     = DTM
+DTM_PROGRAM_NAME     = tm
+DTM_REQUIRES_DTM     = N
+DTM_STDOUT           = stdout_DTM%nid
+DTM_PERSIST_RETRIES  = 2,30
+DTM_PERSIST_ZONES    = %zid
+
+TMID_PROCESS_NAME    = $TMID
+TMID_PROCESS_TYPE    = TMID
+TMID_PROGRAM_NAME    = idtmsrv
+TMID_REQUIRES_DTM    = N
+TMID_STDOUT          = stdout_TMID
+TMID_PERSIST_RETRIES = 2,30
+TMID_PERSIST_ZONES   = %zid+
+
+SSCP_PROCESS_NAME    = $ZSC%nid+
+SSCP_PROCESS_TYPE    = PERSIST
+SSCP_PROGRAM_NAME    = mxsscp
+SSCP_REQUIRES_DTM    = Y
+SSCP_STDOUT          = stdout_ZSC%nid
+SSCP_PERSIST_RETRIES = 10,60
+SSCP_PERSIST_ZONES   = %zid
+
+SSMP_PROCESS_NAME    = $ZSM%nid+
+SSMP_PROCESS_TYPE    = SSMP
+SSMP_PROGRAM_NAME    = mxssmp
+SSMP_REQUIRES_DTM    = Y
+SSMP_STDOUT          = stdout_ZSM%nid
+SSMP_PERSIST_RETRIES = 10,60
+SSMP_PERSIST_ZONES   = %zid
+
+PSD_PROCESS_NAME     = $PSD%nid+
+PSD_PROCESS_TYPE     = PSD
+PSD_PROGRAM_NAME     = pstartd
+PSD_REQUIRES_DTM     = N
+PSD_STDOUT           = stdout_PSD%nid
+PSD_PERSIST_RETRIES  = 10,60
+PSD_PERSIST_ZONES    = %zid
+
+WDG_PROCESS_NAME     = $WDG%nid+
+WDG_PROCESS_TYPE     = WDG
+WDG_PROGRAM_NAME     = sqwatchdog
+WDG_REQUIRES_DTM     = N
+WDG_STDOUT           = stdout_WDG%nid
+WDG_PERSIST_RETRIES  = 10,60
+WDG_PERSIST_ZONES    = %zid
+
+end persist
+

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/51966563/install/python-installer/scripts/traf_sqconfig.py
----------------------------------------------------------------------
diff --git a/install/python-installer/scripts/traf_sqconfig.py b/install/python-installer/scripts/traf_sqconfig.py
index 31f8799..0bdbf74 100755
--- a/install/python-installer/scripts/traf_sqconfig.py
+++ b/install/python-installer/scripts/traf_sqconfig.py
@@ -38,6 +38,7 @@ def run():
     traf_home = os.environ['TRAF_HOME']
     if traf_home == '': err('TRAF_HOME var is empty')
     sqconfig_file = traf_home + '/sql/scripts/sqconfig'
+    sqconfig_persist_file = traf_home + '/sql/scripts/sqconfig.persist'
 
     core, processor = run_cmd("lscpu|grep -E '(^CPU\(s\)|^Socket\(s\))'|awk '{print $2}'").split('\n')[:2]
     core = int(core)-1 if int(core) <= 256 else 255
@@ -51,18 +52,14 @@ def run():
             lines.append(line)
 
     lines.append('end node\n')
-    lines.append('\n')
-    lines.append('begin overflow\n')
-
-    for scratch_loc in scratch_locs:
-        line = 'hdd %s\n' % scratch_loc
-        lines.append(line)
-
-    lines.append('end overflow\n')
 
+    # write out the node section
     with open(sqconfig_file, 'w') as f:
         f.writelines(lines)
 
+    # append the current persist section
+    run_cmd('sed \'1,20d\' %s >> %s' % (sqconfig_file, sqconfig_persist_file))
+
     print 'sqconfig generated successfully!'
 
     run_cmd('sqgen')