Repository: trafodion
Updated Branches:
  refs/heads/master aec5108ad -> d48a88741


[TRAFODION-2883] Preliminary Scale Enhacements
- Increased cluster node limit to 1024
- Added timestamps to node down system message
- Added timestamps and values to registry change notifications
- Fixed monitor trace causing memory overwrites


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

Branch: refs/heads/master
Commit: 887051c8a1ba57b0ad47278dce2fc9361a2afb9c
Parents: 087af70
Author: Zalo Correa <[email protected]>
Authored: Tue Feb 20 16:57:40 2018 -0800
Committer: Zalo Correa <[email protected]>
Committed: Tue Feb 20 16:57:40 2018 -0800

----------------------------------------------------------------------
 core/sqf/monitor/linux/cluster.cxx     |   3 +-
 core/sqf/monitor/linux/monitor.cxx     | 170 ++++++++++++-----
 core/sqf/monitor/linux/msgdef.h        |  48 +----
 core/sqf/monitor/linux/pnode.cxx       |  13 ++
 core/sqf/monitor/linux/reqprocinfo.cxx |  83 +++++----
 core/sqf/monitor/linux/reqqueue.cxx    |   9 +-
 core/sqf/monitor/linux/shell.cxx       | 273 ++++++++++++++++------------
 core/sqf/monitor/test/runtest          |   3 +-
 core/sqf/sqenvcom.sh                   |   7 +
 core/sqf/sql/scripts/sqnodes.pm        |   4 +-
 core/sqf/src/tm/tm_internal.h          |   1 -
 core/sqf/src/tm/tmlibmsg.h             |   4 +-
 core/sqf/src/tm/tools/dtmci.cpp        |   2 -
 core/sqf/src/tm/tools/pwd.cpp          |   2 -
 core/sqf/src/tm/tools/tmshutdown.cpp   |   1 -
 15 files changed, 379 insertions(+), 244 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/887051c8/core/sqf/monitor/linux/cluster.cxx
----------------------------------------------------------------------
diff --git a/core/sqf/monitor/linux/cluster.cxx 
b/core/sqf/monitor/linux/cluster.cxx
index c22e8ea..49697dd 100644
--- a/core/sqf/monitor/linux/cluster.cxx
+++ b/core/sqf/monitor/linux/cluster.cxx
@@ -4166,8 +4166,8 @@ void CCluster::ReIntegrateSock( int initProblem )
     {
         for (int i=0; i<pnodeCount; i++)
         {
-            if (Node[nodeInfo[i].pnid] == NULL) continue;
             if (nodeInfo[i].pnid == -1) continue;
+            if (Node[nodeInfo[i].pnid] == NULL) continue;
             trace_printf( "%s@%d - Node info for pnid=%d (%s)\n"
                           "        Node[%d] commPort=%s\n"
                           "        Node[%d] syncPort=%s\n"
@@ -4181,6 +4181,7 @@ void CCluster::ReIntegrateSock( int initProblem )
         }
         for ( int i =0; i < pnodeCount; i++ )
         {
+            if (nodeInfo[i].pnid == -1) continue;
             trace_printf( "%s@%d socks_[%d]=%d, sockPorts_[%d]=%d\n"
                         , method_name, __LINE__
                         , nodeInfo[i].pnid, socks_[nodeInfo[i].pnid]

http://git-wip-us.apache.org/repos/asf/trafodion/blob/887051c8/core/sqf/monitor/linux/monitor.cxx
----------------------------------------------------------------------
diff --git a/core/sqf/monitor/linux/monitor.cxx 
b/core/sqf/monitor/linux/monitor.cxx
index c5dd28b..70df7cc 100755
--- a/core/sqf/monitor/linux/monitor.cxx
+++ b/core/sqf/monitor/linux/monitor.cxx
@@ -524,6 +524,7 @@ char * CMonitor::ProcCopy(char *bufPtr, CProcess *process)
     const char method_name[] = "CMonitor::ProcCopy";
     TRACE_ENTRY;
 
+    int  stringDataLen = 0;
     struct clone_def *procObj = (struct clone_def *)bufPtr;
 
     procObj->nid = process->GetNid();
@@ -555,36 +556,94 @@ char * CMonitor::ProcCopy(char *bufPtr, CProcess *process)
                         , process->GetPid()
                         , process->GetVerifier() );
 
-    char * stringData = &procObj->stringData;
+    char *stringData = &procObj->stringData;
 
-    // Copy the program name
-    procObj->nameLen = strlen(process->GetName()) + 1;
-    memcpy(stringData, process->GetName(),  procObj->nameLen );
-    stringData += procObj->nameLen;
+    if (strlen(process->GetName()))
+    {
+        // Copy the program name
+        procObj->nameLen = strlen(process->GetName()) + 1;
+        memcpy(stringData, process->GetName(),  procObj->nameLen );
+        stringData += procObj->nameLen;
+        stringDataLen = procObj->nameLen;
+    }
+    else
+    {
+        procObj->nameLen = 0;
+    }
 
-    // Copy the port
-    procObj->portLen = strlen(process->GetPort()) + 1;
-    memcpy(stringData, process->GetPort(),  procObj->portLen );
-    stringData += procObj->portLen;
+    if (strlen(process->GetPort()))
+    {
+        // Copy the port
+        procObj->portLen = strlen(process->GetPort()) + 1;
+        memcpy(stringData, process->GetPort(),  procObj->portLen );
+        stringData += procObj->portLen;
+        stringDataLen += procObj->portLen;
+    }
+    else
+    {
+        procObj->portLen = 0;
+    }
 
     if (process->IsPersistent())
     {
-        // Copy the standard in file name
-        procObj->infileLen = strlen(process->infile()) + 1;
-        memcpy(stringData, process->infile(), procObj->infileLen);
-        stringData += procObj->infileLen;
+        if (strlen(process->infile()))
+        {
+            // Copy the standard in file name
+            procObj->infileLen = strlen(process->infile()) + 1;
+            memcpy(stringData, process->infile(), procObj->infileLen);
+            stringData += procObj->infileLen;
+            stringDataLen += procObj->infileLen;
+        }
+        else
+        {
+            procObj->infileLen = 0;
+        }
 
-        // Copy the standard out file name
-        procObj->outfileLen = strlen(process->outfile()) + 1;
-        memcpy(stringData, process->outfile(),  procObj->outfileLen );
-        stringData += procObj->outfileLen;
+        if (strlen(process->outfile()))
+        {
+            // Copy the standard out file name
+            procObj->outfileLen = strlen(process->outfile()) + 1;
+            memcpy(stringData, process->outfile(),  procObj->outfileLen );
+            stringData += procObj->outfileLen;
+            stringDataLen += procObj->outfileLen;
+        }
+        else
+        {
+            procObj->outfileLen = 0;
+        }
 
-        // Copy the program argument strings
         procObj->argvLen =  process->userArgvLen();
-        memcpy(stringData, process->userArgv(), procObj->argvLen);
-        stringData += procObj->argvLen;
+        if (procObj->argvLen)
+        {
+            // Copy the program argument strings
+            memcpy(stringData, process->userArgv(), procObj->argvLen);
+            stringData += procObj->argvLen;
+            stringDataLen += procObj->argvLen;
+        }
+
+        procObj->persistent = true;
 
-        procObj->persistent = true; 
+        if (trace_settings & (TRACE_REQUEST | TRACE_INIT | TRACE_RECOVERY))
+                trace_printf( "%s@%d - Packing process string data:\n"
+                              "        name(%d)       =%s\n"
+                              "        port(%d)       =%s\n"
+                              "        infile(%d)     =%s\n"
+                              "        outfile(%d)    =%s\n"
+                              "        userArgv(%d)   =%s\n"
+                              "        stringData(%d) =%s\n"
+                            , method_name, __LINE__
+                            , procObj->nameLen
+                            , process->GetName()
+                            , procObj->portLen
+                            , process->GetPort()
+                            , procObj->infileLen
+                            , process->infile()
+                            , procObj->outfileLen
+                            , process->outfile()
+                            , procObj->argvLen
+                            , procObj->argvLen?process->userArgv():"" 
+                            , stringDataLen
+                            , stringDataLen?&procObj->stringData:"" );
     }
     else
     {
@@ -658,6 +717,9 @@ void CMonitor::UnpackProcObjs( char *&buffer, int procCount 
)
 
     CNode * node = NULL;
     CProcess * process = NULL;
+    int  stringDataLen;
+    char *name = NULL;
+    char *port = NULL;
     char *infile = NULL;
     char *outfile = NULL;
     char *userargv = NULL;
@@ -671,45 +733,72 @@ void CMonitor::UnpackProcObjs( char *&buffer, int 
procCount )
     {
         procObj = (struct clone_def *)buffer;
 
+        stringDataLen = 0;
         stringData = &procObj->stringData;
   
         node = Nodes->GetLNode (procObj->nid)->GetNode();
 
-        if (procObj->infileLen)
+        if (procObj->nameLen)
         {
-            infile = &stringData[procObj->nameLen + procObj->portLen];
+            name = &procObj->stringData;
+            stringDataLen += procObj->nameLen;
         }
-        else
+          
+        if (procObj->portLen)
         {
-            infile = NULL;
+            port = &stringData[stringDataLen];
+            stringDataLen += procObj->portLen;
         }
           
-        if (procObj->outfileLen)
+        if (procObj->infileLen)
         {
-            outfile = &stringData[procObj->nameLen + procObj->portLen + 
procObj->infileLen];
+            infile = &stringData[stringDataLen];
+            stringDataLen += procObj->infileLen;
         }
-        else
+          
+        if (procObj->outfileLen)
         {
-            outfile = NULL;
+            outfile = &stringData[stringDataLen];
+            stringDataLen += procObj->outfileLen;
         }
 
         if (procObj->argvLen)
         {
-            userargv = &stringData[procObj->nameLen + procObj->portLen 
-                                    + procObj->infileLen + 
procObj->outfileLen];
-        }
-        else
-        {
-            userargv = NULL;
+            userargv = &stringData[stringDataLen];
+            stringDataLen += procObj->argvLen;
         }
 
+        if (trace_settings & (TRACE_REQUEST | TRACE_INIT | TRACE_RECOVERY))
+                trace_printf( "%s@%d - Unpacking process string data:\n"
+                              "        stringData(%d) =%s\n"
+                              "        name(%d)       =%s\n"
+                              "        port(%d)       =%s\n"
+                              "        infile(%d)     =%s\n"
+                              "        outfile(%d)    =%s\n"
+                              "        userArgc       =%d\n"
+                              "        userArgv(%d)   =%s\n"
+                            , method_name, __LINE__
+                            , stringDataLen
+                            , stringDataLen?&procObj->stringData:""
+                            , procObj->nameLen
+                            , procObj->nameLen?name:""
+                            , procObj->portLen
+                            , procObj->portLen?port:""
+                            , procObj->infileLen
+                            , procObj->infileLen?infile:""
+                            , procObj->outfileLen
+                            , procObj->outfileLen?outfile:""
+                            , procObj->argc
+                            , procObj->argvLen
+                            , procObj->argvLen?userargv:"" );
+
         process = node->CloneProcess (procObj->nid,
                                       procObj->type,
                                       procObj->priority,
                                       procObj->backup,
                                       procObj->unhooked,
-                                      &stringData[0], // process name
-                                      &stringData[procObj->nameLen],  // port
+                                      procObj->nameLen?name:(char *)"",
+                                      procObj->portLen?port:(char *)"",
                                       procObj->os_pid,
                                       procObj->verifier, 
                                       procObj->parent_nid,
@@ -720,8 +809,8 @@ void CMonitor::UnpackProcObjs( char *&buffer, int procCount 
)
                                       procObj->pathStrId,
                                       procObj->ldpathStrId,
                                       procObj->programStrId,
-                                      infile, 
-                                      outfile,
+                                      procObj->infileLen?infile:(char *)"",
+                                      procObj->outfileLen?outfile:(char *)"",
                                       &procObj->creation_time);
 
         if ( process && procObj->argvLen )
@@ -734,8 +823,7 @@ void CMonitor::UnpackProcObjs( char *&buffer, int procCount 
)
             process->SetPersistent(true);
         }
 
-        buffer = &stringData[procObj->nameLen + procObj->portLen + 
procObj->infileLen 
-                              + procObj->outfileLen + procObj->argvLen];
+        buffer = &stringData[stringDataLen];
     }
 
     TRACE_EXIT;

http://git-wip-us.apache.org/repos/asf/trafodion/blob/887051c8/core/sqf/monitor/linux/msgdef.h
----------------------------------------------------------------------
diff --git a/core/sqf/monitor/linux/msgdef.h b/core/sqf/monitor/linux/msgdef.h
index 3f5c8c8..3532ac8 100644
--- a/core/sqf/monitor/linux/msgdef.h
+++ b/core/sqf/monitor/linux/msgdef.h
@@ -61,9 +61,11 @@
                                // NOTE: Increase with caution as this number
                                //  is also used to gather local CPU statistics
                                //  and a large number may degrade performance
-#define MAX_NODES        256   // This can be higher when needed and will
+#define MAX_NODES TC_NODES_MAX // This can be higher when needed and will
                                // have performance implications
-                               // Increment by 64 to match node state bitmask
+                               // NOTE: Must increment by 64 to match node 
state
+                               //       bitmask. See trafconfig.h TC_NODES_MAX 
in
+                               //       Trafodion Configuration API
 #define MAX_LNODES_PER_NODE 1  // The 1 is a per physical node limit 
                                // (it can be more, but it is not currently 
used)
 #define MAX_LNODES       (MAX_NODES*MAX_LNODES_PER_NODE)  
@@ -211,20 +213,9 @@ typedef enum {
     RoleType_Aggregation = 0x0002,          // Maps to ZoneType_Aggregation, 
Backend or Any
     RoleType_Storage     = 0x0004           // Maps to ZoneType_Storage, 
Backend or Any
 } RoleType;
-#if 0
-typedef enum {
-    ZoneType_Undefined   = 0x0000,          // No zone type defined
-    ZoneType_Edge        = 0x0001,          // Zone of service only nodes
-    ZoneType_Aggregation = 0x0002,          // Zone of compute only nodes
-    ZoneType_Storage     = 0x0004,          // Zone of storage only nodes
-    ZoneType_Excluded    = 0x0010,          // Excluded cores
-    ZoneType_Any         = ( ZoneType_Edge | ZoneType_Aggregation | 
ZoneType_Storage ),
-    ZoneType_Frontend    = ( ZoneType_Edge | ZoneType_Aggregation ),
-    ZoneType_Backend     = ( ZoneType_Aggregation | ZoneType_Storage )
-} ZoneType;
-#else
+
 typedef TcZoneType_t ZoneType;
-#endif
+
 // Service Request types
 // note: other data structures depend on the ordering of the REQTYPE elements.
 //       if the ordering changes corresponding changes must be made to 
@@ -330,32 +321,9 @@ typedef enum {
                                             // types, add any new message 
types 
                                             // before this one
 } MSGTYPE;
-#if 0
-typedef enum {
-    ProcessType_Undefined=0,                // No process type as been defined
-    ProcessType_TSE,                        // Identifies a Table Storage 
Engine (DP2)
-    ProcessType_DTM,                        // Identifies a Distributed 
Transaction Monitor process
-    ProcessType_ASE,                        // Identifies a Audit Storage 
Engine (ADP)
-    ProcessType_Generic,                    // Identifies a generic process
-    ProcessType_Watchdog,                   // Identifies the monitor's 
watchdog processes
-    ProcessType_AMP,                        // Identifies a AMP process
-    ProcessType_Backout,                    // Identifies a Backout process
-    ProcessType_VolumeRecovery,             // Identifies a Volume Recovery 
process
-    ProcessType_MXOSRVR,                    // Identifies a MXOSRVR process
-    ProcessType_SPX,                        // Identifies a SeaPilot ProXy 
process
-    ProcessType_SSMP,                       // Identifies a SQL Statistics 
Merge Process (SSMP)
-    ProcessType_PSD,                        // Identifies the monitor's 
process start daemon processes
-    ProcessType_SMS,                        // Identifies a SeaMonster Service 
process
-    ProcessType_TMID,                       // Identifies a Transaction 
Management ID process
-    ProcessType_PERSIST,                    // Identifies a generic persistent 
process
-
-    ProcessType_Invalid                     // marks the end of the process
-                                            // types, add any new process
-                                            // types before this one
-} PROCESSTYPE;
-#else
+
 typedef TcProcessType_t PROCESSTYPE;
-#endif
+
 typedef enum {
     ShutdownLevel_Undefined=-1,
     ShutdownLevel_Normal=0,                 // Wait for all transactions and 
processes to end

http://git-wip-us.apache.org/repos/asf/trafodion/blob/887051c8/core/sqf/monitor/linux/pnode.cxx
----------------------------------------------------------------------
diff --git a/core/sqf/monitor/linux/pnode.cxx b/core/sqf/monitor/linux/pnode.cxx
index 8aa0671..75c2137 100644
--- a/core/sqf/monitor/linux/pnode.cxx
+++ b/core/sqf/monitor/linux/pnode.cxx
@@ -1977,6 +1977,13 @@ void CNodeContainer::UnpackNodeMappings( intBuffPtr_t 
&buffer, int nodeMapCount
 
     int pnid, pnidConfig;
 
+    // lock sync thread since we are making a change the monitor's
+    // operational view of the cluster
+    if ( !Emulate_Down )
+    {
+        Monitor->EnterSyncCycle();
+    }
+
     for (int count = 0; count < nodeMapCount; count++)
     {
         pnidConfig = *buffer++;
@@ -1991,6 +1998,12 @@ void CNodeContainer::UnpackNodeMappings( intBuffPtr_t 
&buffer, int nodeMapCount
 
     UpdateCluster();
 
+    // unlock sync thread
+    if ( !Emulate_Down )
+    {
+        Monitor->ExitSyncCycle();
+    }
+
     TRACE_EXIT;
     return;
 }

http://git-wip-us.apache.org/repos/asf/trafodion/blob/887051c8/core/sqf/monitor/linux/reqprocinfo.cxx
----------------------------------------------------------------------
diff --git a/core/sqf/monitor/linux/reqprocinfo.cxx 
b/core/sqf/monitor/linux/reqprocinfo.cxx
index f7eeefe..4148f36 100644
--- a/core/sqf/monitor/linux/reqprocinfo.cxx
+++ b/core/sqf/monitor/linux/reqprocinfo.cxx
@@ -287,11 +287,14 @@ void CExtProcInfoReq::performRequest()
     verifier_ = msg_->u.request.u.process_info.verifier;
     processName_ = msg_->u.request.u.process_info.process_name;
 
+    int       pnid = -1;
     int       target_nid = -1;
     int       target_pid = -1;
     string    target_process_name;
     Verifier_t target_verifier = -1;
-    CProcess *requester = NULL;
+    CClusterConfig *clusterConfig = NULL;
+    CLNodeConfig   *lnodeConfig = NULL; 
+    CProcess       *requester = NULL;
 
     target_nid = msg_->u.request.u.process_info.target_nid;
     target_pid = msg_->u.request.u.process_info.target_pid;
@@ -390,42 +393,54 @@ void CExtProcInfoReq::performRequest()
                             , msg_->u.request.u.process_info.type);
             }
 
-            if (target_pid == -1)
+            clusterConfig = Nodes->GetClusterConfig();
+            if (clusterConfig)
             {
-                // get info for all processes in node
-                if (target_nid >= 0 && target_nid < 
Nodes->GetLNodesConfigMax())
+                if (clusterConfig->IsConfigReady())
                 {
-                    count = 
ProcessInfo_BuildReply(Nodes->GetNode(target_nid)->GetFirstProcess(), 
-                                                   msg_,
-                                                   
msg_->u.request.u.process_info.type,
-                                                   false,
-                                                   
msg_->u.request.u.process_info.target_process_pattern);
-                }
-            }
-            else
-            {
-                // get info for single process in node
-                if ((requester->GetType() == ProcessType_TSE ||
-                     requester->GetType() == ProcessType_ASE ||
-                     requester->GetType() == ProcessType_AMP)  &&
-                    (requester->GetNid() == target_nid &&
-                     requester->GetPid() == target_pid))
-                {
-                    ProcessInfo_CopyData(requester,
-                                         
msg_->u.reply.u.process_info.process[0]);
-                    count = 1;
-                }
-                else if (target_nid >= 0 && target_nid < 
Nodes->GetLNodesConfigMax())
-                { // find by nid/pid (check node state, don't check process 
state, backup is Ok)
-                    CProcess *process = Nodes->GetProcess( target_nid
-                                                         , target_pid
-                                                         , target_verifier
-                                                         , true, false, true );
-                    if (process)
+                    lnodeConfig = clusterConfig->GetLNodeConfig( target_nid );
+                    if (lnodeConfig)
                     {
-                        ProcessInfo_CopyData(process,
-                                             
msg_->u.reply.u.process_info.process[0]);
-                        count = 1;
+                        
+                        if (target_pid == -1)
+                        {
+                            // get info for all processes in node
+                            if (target_nid >= 0 && target_nid < 
Nodes->GetLNodesConfigMax())
+                            {
+                                count = 
ProcessInfo_BuildReply(Nodes->GetNode(target_nid)->GetFirstProcess(), 
+                                                               msg_,
+                                                               
msg_->u.request.u.process_info.type,
+                                                               false,
+                                                               
msg_->u.request.u.process_info.target_process_pattern);
+                            }
+                        }
+                        else
+                        {
+                            // get info for single process in node
+                            if ((requester->GetType() == ProcessType_TSE ||
+                                 requester->GetType() == ProcessType_ASE ||
+                                 requester->GetType() == ProcessType_AMP)  &&
+                                (requester->GetNid() == target_nid &&
+                                 requester->GetPid() == target_pid))
+                            {
+                                ProcessInfo_CopyData(requester,
+                                                     
msg_->u.reply.u.process_info.process[0]);
+                                count = 1;
+                            }
+                            else if (target_nid >= 0 && target_nid < 
Nodes->GetLNodesConfigMax())
+                            { // find by nid/pid (check node state, don't 
check process state, backup is Ok)
+                                CProcess *process = Nodes->GetProcess( 
target_nid
+                                                                     , 
target_pid
+                                                                     , 
target_verifier
+                                                                     , true, 
false, true );
+                                if (process)
+                                {
+                                    ProcessInfo_CopyData(process,
+                                                         
msg_->u.reply.u.process_info.process[0]);
+                                    count = 1;
+                                }
+                            }
+                        }
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/trafodion/blob/887051c8/core/sqf/monitor/linux/reqqueue.cxx
----------------------------------------------------------------------
diff --git a/core/sqf/monitor/linux/reqqueue.cxx 
b/core/sqf/monitor/linux/reqqueue.cxx
index becb0cd..e4e8dbd 100644
--- a/core/sqf/monitor/linux/reqqueue.cxx
+++ b/core/sqf/monitor/linux/reqqueue.cxx
@@ -2355,7 +2355,6 @@ void CIntReviveReq::performRequest()
     if (trace_settings & (TRACE_REQUEST | TRACE_INIT | TRACE_RECOVERY))
         trace_printf("%s@%d - Spare Nodes List unpacked\n", method_name, 
__LINE__);
 
-    //Nodes->UnpackNodeMappings( (intBuffPtr_t&)buffer, header.nodeMapCount_ );
     Nodes->UnpackNodeMappings( (intBuffPtr_t&)buffer, header.nodeMapCount_ );
 
     if (trace_settings & (TRACE_REQUEST | TRACE_INIT | TRACE_RECOVERY))
@@ -2469,8 +2468,8 @@ void CIntSnapshotReq::performRequest()
     }
 
     // estimate size of snapshot buffer
-    // about 100 bytes per process, 2 times total
-    int procSize = Nodes->ProcessCount() * 2 * 100;
+    // about 500 bytes per process, 2 times total
+    int procSize = Nodes->ProcessCount() * 2 * 500;
     int idsSize = Nodes->GetSNodesCount() * sizeof(int); // spare pnids
     idsSize += (Nodes->GetPNodesCount() + Nodes->GetLNodesCount()) * 
sizeof(int); // pnid/nid map
     idsSize += Nodes->GetLNodesCount() * sizeof(int);    // nids
@@ -2481,7 +2480,7 @@ void CIntSnapshotReq::performRequest()
 
     mem_log_write(MON_REQQUEUE_SNAPSHOT_4, procSize, idsSize);
 
-    snapshotBuf = (char *) malloc (procSize + idsSize); 
+    snapshotBuf = (char *) malloc (procSize + idsSize);
 
     if (!snapshotBuf) 
     {
@@ -2497,6 +2496,7 @@ void CIntSnapshotReq::performRequest()
 
     clock_gettime(CLOCK_REALTIME, &startTime);
 
+    memset( snapshotBuf, 0, (procSize + idsSize) );
     char *buf = snapshotBuf;
 
     CCluster::snapShotHeader_t header;
@@ -2550,6 +2550,7 @@ void CIntSnapshotReq::performRequest()
         return;
     }
         
+    memset( compBuf, 0, compSize );
     z_result = compress((Bytef *)compBuf, (unsigned long *)&compSize, 
                         (Bytef *)snapshotBuf, header.fullSize_);
  

http://git-wip-us.apache.org/repos/asf/trafodion/blob/887051c8/core/sqf/monitor/linux/shell.cxx
----------------------------------------------------------------------
diff --git a/core/sqf/monitor/linux/shell.cxx b/core/sqf/monitor/linux/shell.cxx
index 5ad73ab..7d7db50 100644
--- a/core/sqf/monitor/linux/shell.cxx
+++ b/core/sqf/monitor/linux/shell.cxx
@@ -1102,15 +1102,16 @@ void recv_notice_msg(struct message_def *recv_msg, int )
     switch (recv_msg->type )
     {
     case MsgType_Change:
-        printf ("[%s] Configuration Change Notice for Group: %s Key: %s\n", 
-                MyName, 
+        printf ("[%s] %s - Configuration Change Notice for Group: %s Key: %s 
Value: %s\n", 
+                MyName, time_string(),
                 recv_msg->u.request.u.change.group,
-                recv_msg->u.request.u.change.key);
+                recv_msg->u.request.u.change.key,
+                recv_msg->u.request.u.change.value);
         break;
 
     case MsgType_Event:
-        printf("[%s] Event %d received\n",
-               MyName, recv_msg->u.request.u.event_notice.event_id);
+        printf("[%s] %s - Event %d received\n",
+               MyName, time_string(), 
recv_msg->u.request.u.event_notice.event_id);
         break;
 
     case MsgType_NodeAdded:
@@ -1177,8 +1178,8 @@ void recv_notice_msg(struct message_def *recv_msg, int )
         break;
 
     case MsgType_NodeDown:
-        printf ("[%s] Node %d (%s) is DOWN\n", 
-                MyName, recv_msg->u.request.u.down.nid,
+        printf ("[%s] %s - Node %d (%s) is DOWN\n", 
+                MyName, time_string(), recv_msg->u.request.u.down.nid,
                 recv_msg->u.request.u.down.node_name );
         NodeState[recv_msg->u.request.u.down.nid] = false;
 
@@ -1211,15 +1212,15 @@ void recv_notice_msg(struct message_def *recv_msg, int )
 
 
     case MsgType_NodePrepare:
-        printf("[%s] Node %s (%d) node-up preparation, takeover=%s\n",
-               MyName, recv_msg->u.request.u.prepare.node_name,
+        printf("[%s] %s - Node %s (%d) node-up preparation, takeover=%s\n",
+               MyName, time_string(), recv_msg->u.request.u.prepare.node_name,
                recv_msg->u.request.u.prepare.nid,
                ((recv_msg->u.request.u.prepare.takeover)? "true": "false"));
         break;
 
     case MsgType_NodeQuiesce:
-        printf ("[%s] Node %d (%s) is QUIESCEd\n", 
-                MyName, msg->u.request.u.quiesce.nid,
+        printf ("[%s] %s - Node %d (%s) is QUIESCEd\n", 
+                MyName, time_string(), msg->u.request.u.quiesce.nid,
                 msg->u.request.u.quiesce.node_name );
         NodeState[msg->u.request.u.quiesce.nid] = false;
         if ( waitDeathPending )
@@ -1248,15 +1249,15 @@ void recv_notice_msg(struct message_def *recv_msg, int )
     case MsgType_ProcessCreated:
         if ( recv_msg->u.request.u.process_created.return_code == MPI_SUCCESS )
         {
-            printf ("[%s] Process %s successfully created. Nid=%d, Pid=%d\n",
-                    MyName, recv_msg->u.request.u.process_created.process_name,
+            printf ("[%s] %s - Process %s successfully created. Nid=%d, 
Pid=%d\n",
+                    MyName, time_string(), 
recv_msg->u.request.u.process_created.process_name,
                     recv_msg->u.request.u.process_created.nid,
                     recv_msg->u.request.u.process_created.pid);
         }
         else
         {
-            printf ("[%s] Process %s NOT created. Nid=%d, Pid=%d\n",
-                    MyName, recv_msg->u.request.u.process_created.process_name,
+            printf ("[%s] %s - Process %s NOT created. Nid=%d, Pid=%d\n",
+                    MyName, time_string(), 
recv_msg->u.request.u.process_created.process_name,
                     recv_msg->u.request.u.process_created.nid,
                     recv_msg->u.request.u.process_created.pid);
         }
@@ -1265,15 +1266,15 @@ void recv_notice_msg(struct message_def *recv_msg, int )
     case MsgType_ProcessDeath:
         if ( recv_msg->u.request.u.death.aborted )
         {
-            printf ("[%s] Process %s abnormally terminated. Nid=%d, Pid=%d\n",
-                    MyName, recv_msg->u.request.u.death.process_name, 
+            printf ("[%s] %s - Process %s abnormally terminated. Nid=%d, 
Pid=%d\n",
+                    MyName, time_string(), 
recv_msg->u.request.u.death.process_name, 
                     recv_msg->u.request.u.death.nid,
                     recv_msg->u.request.u.death.pid);
         }
         else
         {
-            printf ("[%s] Process %s terminated normally. Nid=%d, Pid=%d\n", 
-                    MyName, recv_msg->u.request.u.death.process_name, 
+            printf ("[%s] %s - Process %s terminated normally. Nid=%d, 
Pid=%d\n", 
+                    MyName, time_string(), 
recv_msg->u.request.u.death.process_name, 
                     recv_msg->u.request.u.death.nid,
                     recv_msg->u.request.u.death.pid);
         }
@@ -1298,18 +1299,18 @@ void recv_notice_msg(struct message_def *recv_msg, int )
         break;
 
     case MsgType_Shutdown:
-        printf("[%s] Shutdown notice, level=%d received\n",
-               MyName, recv_msg->u.request.u.shutdown.level);
+        printf("[%s] %s - Shutdown notice, level=%d received\n",
+               MyName, time_string(), recv_msg->u.request.u.shutdown.level);
         nodePendingComplete();
         break;
 
     case MsgType_TmSyncAbort:
-        printf("[%s] TmSync abort notice received\n",
-               MyName);
+        printf("[%s] %s - TmSync abort notice received\n",
+               MyName, time_string());
         break;
     case MsgType_TmSyncCommit:
-        printf("[%s] TmSync commit notice received\n",
-               MyName);
+        printf("[%s] %s - TmSync commit notice received\n",
+               MyName, time_string());
         break;
 
     case MsgType_ReintegrationError:
@@ -1321,8 +1322,8 @@ void recv_notice_msg(struct message_def *recv_msg, int )
         break;
 
     default:
-        printf("[%s] Unexpected notice type(%d) received\n",
-               MyName, recv_msg->type);
+        printf("[%s] %s - Unexpected notice type(%d) received\n",
+               MyName, time_string(), recv_msg->type);
 
     }
 
@@ -3868,7 +3869,7 @@ int node_up( int nid, char *node_name, bool nowait )
     // If this is a real cluster
     if ( nid == -1 )
     {
-        // Get current physical state of target nodes
+        // Get current physical state of all nodes
         if ( !update_node_state( node_name, false ) )
         {
             return( rc ) ;
@@ -4133,7 +4134,8 @@ void persist_config( char *prefix )
     }
     if (!foundConfig)
     {
-        printf ("[%s] Persistent process configuration does not exist\n", 
MyName);
+        printf("[%s] %s - Persistent process configuration does not exist\n"
+              , MyName, time_string() );
     }
 }
 
@@ -4213,7 +4215,8 @@ void persist_info( char *prefix )
     }
     if (!foundConfig)
     {
-        printf ("[%s] Persistent process configuration does not exist\n", 
MyName);
+        printf("[%s] %s - Persistent process configuration does not exist\n"
+              , MyName, time_string() );
     }
 }
 
@@ -4268,7 +4271,9 @@ bool persist_process_kill( CPersistConfig *persistConfig )
                                           , persistZones );
             if ( !find_process( processName ) )
             {
-                printf( "Persistent process %s does not exist\n", processName);
+                printf( "[%s] %s - Persistent process %s does not exist\n"
+                      , MyName, time_string()
+                      , processName );
                 continue;
             }
             kill_process( -1, -1, processName, true );
@@ -4288,7 +4293,9 @@ bool persist_process_kill( CPersistConfig *persistConfig )
                                       , persistZones );
         if ( !find_process( processName ) )
         {
-            printf( "Persistent process %s does not exist\n", processName);
+            printf( "[%s] %s - Persistent process %s does not exist\n"
+                  , MyName, time_string()
+                  , processName );
             break;
         }
         kill_process( -1, -1, processName, true );
@@ -4306,7 +4313,9 @@ bool persist_process_kill( CPersistConfig *persistConfig )
                                       , persistZones );
         if ( !find_process( processName ) )
         {
-            printf( "Persistent process %s does not exist\n", processName);
+            printf( "[%s] %s - Persistent process %s does not exist\n"
+                  , MyName, time_string()
+                  , processName );
             break;
         }
         kill_process( -1, -1, processName, true );
@@ -4377,7 +4386,9 @@ bool persist_process_start( CPersistConfig *persistConfig 
)
                                           , persistZones );
             if ( find_process( processName ) )
             {
-                printf( "Persistent process %s already exists\n", processName);
+                printf( "[%s] %s - Persistent process %s already exists\n"
+                      , MyName, time_string()
+                      , processName );
                 continue;
             }
             if (programArgc)
@@ -4403,7 +4414,9 @@ bool persist_process_start( CPersistConfig *persistConfig 
)
                                //, (char *)persistConfig->GetProgramName() );
             if (pid > 0)
             {
-                printf( "Persistent process %s created\n", processName);
+                printf( "[%s] %s - Persistent process %s created\n"
+                      , MyName, time_string()
+                      , processName );
                 if (process_type == ProcessType_DTM)
                 {
                     DTMexists = true;
@@ -4431,7 +4444,9 @@ bool persist_process_start( CPersistConfig *persistConfig 
)
                                       , persistZones );
         if ( find_process( processName ) )
         {
-            printf( "Persistent process %s already exists\n", processName);
+            printf( "[%s] %s - Persistent process %s already exists\n"
+                  , MyName, time_string()
+                  , processName );
             break;
         }
         if (programArgc)
@@ -4456,7 +4471,9 @@ bool persist_process_start( CPersistConfig *persistConfig 
)
                            , programNameAndArgs );
         if (pid > 0)
         {
-            printf( "Persistent process %s created\n", processName);
+            printf( "[%s] %s - Persistent process %s created\n"
+                  , MyName, time_string()
+                  , processName );
             if (process_type == ProcessType_DTM)
             {
                 DTMexists = true;
@@ -4482,7 +4499,9 @@ bool persist_process_start( CPersistConfig *persistConfig 
)
                                       , persistZones );
         if ( find_process( processName ) )
         {
-            printf( "Persistent process %s already exists\n", processName);
+            printf( "[%s] %s - Persistent process %s already exists\n"
+                  , MyName, time_string()
+                  , processName );
             break;
         }
         if (programArgc)
@@ -4507,7 +4526,9 @@ bool persist_process_start( CPersistConfig *persistConfig 
)
                            , programNameAndArgs );
         if (pid > 0)
         {
-            printf( "Persistent process %s created\n", processName);
+            printf( "[%s] %s - Persistent process %s created\n"
+                  , MyName, time_string()
+                  , processName );
             if (process_type == ProcessType_DTM)
             {
                 DTMexists = true;
@@ -4516,8 +4537,8 @@ bool persist_process_start( CPersistConfig *persistConfig 
)
         else
         {
             if ( trace_settings & TRACE_SHELL_CMD )
-                trace_printf("%s@%d [%s] persistexec failed!\n",
-                             method_name, __LINE__, MyName);
+                trace_printf("%s@%d [%s] persist exec failed!\n"
+                             , method_name, __LINE__, MyName);
         }
         break;
     default:
@@ -6177,7 +6198,7 @@ void help_cmd (void)
     printf ("[%s] -- persist exec <persist-process-prefix>\n", MyName);
     printf ("[%s] -- persist info [<persist-process-prefix>]\n", MyName);
     printf ("[%s] -- persist kill <persist-process-prefix>\n", MyName);
-    printf ("[%s] -- ps [{CS|DTM|GEN|PSD|SMS|SSMP|WDG}] 
[<process_name>|<nid,pid>]\n", MyName);
+    printf ("[%s] -- ps [{CS|DTM|GEN|PSD|SMS|SSMP|WDG}] 
[<nid>|<process_name>|<nid,pid>]\n", MyName);
     printf ("[%s] -- pwd\n", MyName);
     printf ("[%s] -- quit\n", MyName);
     printf ("[%s] -- scanbufs\n", MyName);
@@ -6372,6 +6393,7 @@ void monstats_cmd (char *)
 void node_cmd (char *cmd_tail)
 {
     int nid;
+    int pnid;
     char token[MAX_TOKEN];
     char delimiter;
     char *cmd = cmd_tail;
@@ -6423,7 +6445,7 @@ void node_cmd (char *cmd_tail)
                 {
                     sprintf( msgString, "[%s] Node add is not available with 
Virtual Nodes!",MyName);
                     write_startup_log( msgString );
-                    printf ("[%s] Node add is not available with Virtual 
Nodes!\n", MyName);    
+                    printf ("%s\n", msgString);
                 }
                 else
                 {
@@ -6474,7 +6496,7 @@ void node_cmd (char *cmd_tail)
                 {
                     sprintf( msgString, "[%s] Node delete is not available 
with Virtual Nodes!",MyName);
                     write_startup_log( msgString );
-                    printf ("[%s] Node delete is not available with Virtual 
Nodes!\n", MyName);    
+                    printf ("%s\n", msgString);
                 }
                 else
                 {
@@ -6487,7 +6509,7 @@ void node_cmd (char *cmd_tail)
                     {
                         sprintf( msgString, "[%s] Node delete is not enabled, 
to enable export SQ_ELASTICY_ENABLED=1",MyName);
                         write_startup_log( msgString );
-                        printf ("[%s] Node delete is not enabled, to enable 
export SQ_ELASTICY_ENABLED=1\n", MyName);    
+                        printf ("%s\n", msgString);
                     }
                 }
             }
@@ -6516,15 +6538,15 @@ void node_cmd (char *cmd_tail)
                 if ( *cmd )
                 {
                     nid = atoi (cmd);
-                    if ((!isNumeric(cmd)) || (nid >= LNodesConfigMax) || (nid 
< 0))
+                    pnid = get_pnid_by_nid( nid );
+                    if ( pnid == -1 )
                     {
-                        printf ("[%s] Invalid nid\n", MyName);
-                    }
-                    else
-                    {
-                        node_info(nid);
-                        CurNodes = NumLNodes-NumDown;
+                        printf( "[%s] Node id %d does not exist in 
configuration!\n"
+                              , MyName, nid );
+                        return;
                     }
+                    node_info(nid);
+                    CurNodes = NumLNodes-NumDown;
                 }
                 else
                 {
@@ -6546,7 +6568,7 @@ void node_cmd (char *cmd_tail)
                 {
                     sprintf( msgString, "[%s] Node name is not available with 
Virtual Nodes!",MyName);
                     write_startup_log( msgString );
-                    printf ("[%s] Node name is not available with Virtual 
Nodes!\n", MyName);    
+                    printf ("%s\n", msgString);
                 }
                 else
                 {
@@ -6559,7 +6581,7 @@ void node_cmd (char *cmd_tail)
                     {
                         sprintf( msgString, "[%s] Node name is not enabled, to 
enable export SQ_ELASTICY_ENABLED=1",MyName);
                         write_startup_log( msgString );
-                        printf ("[%s] Node name is not enabled, to enable 
export SQ_ELASTICY_ENABLED=1\n", MyName);    
+                        printf ("%s\n", msgString);
                     }
                 }
             }
@@ -6714,9 +6736,9 @@ void node_config_cmd( char *cmd )
 
     char *cmd_tail = cmd;
     char delim;
-    char msgString[MAX_BUFFER] = { 0 };
     char token[MAX_TOKEN] = { 0 };
     int nid = -1;
+    int pnid = -1;
 
     if ( trace_settings & TRACE_SHELL_CMD )
         trace_printf ("%s@%d [%s] processing node config command.\n",
@@ -6730,33 +6752,22 @@ void node_config_cmd( char *cmd )
         if ( isNumeric( token ) )
         {
             nid = atoi (token);
-            if (nid < 0 || nid > LNodesConfigMax - 1)
+            pnid = get_pnid_by_nid( nid );
+            if ( pnid == -1 )
             {
-                sprintf( msgString, "[%s] Node id is not configured!",MyName);
-                write_startup_log( msgString );
-                printf ("%s\n", msgString);
-               return;
+                printf( "[%s] Node id %d does not exist in configuration!\n"
+                      , MyName, nid );
+                return;
             }
-            snprintf( msgString, sizeof(msgString)
-                    , "[%s] Executing node config. (nid=%s)"
-                    , MyName, token );
-            write_startup_log( msgString );
         }
         else
         {
             if ( get_node_name( token ) != 0 ) 
             {
-                sprintf( msgString, "[%s] Node %s is not configured!"
-                       , MyName, token);
-                write_startup_log( msgString );
-                printf( "[%s] Node %s is not configured!\n"
-                      , MyName, token);
+                printf( "[%s] Node %s does not exist in configuration!\n"
+                      , MyName, token );
                 return;
             }
-            snprintf( msgString, sizeof(msgString)
-                    , "[%s] Executing node config. (node_name=%s)"
-                    , MyName, token );
-            write_startup_log( msgString );
         }
     }
 
@@ -6793,11 +6804,10 @@ void node_delete_cmd( char *cmd )
         {
             if ( get_node_name( token ) != 0 ) 
             {
-                sprintf( msgString, "[%s] Node %s is not configured!"
+                sprintf( msgString, "[%s] Node %s does not exist in 
configuration!"
                        , MyName, token);
                 write_startup_log( msgString );
-                printf( "[%s] Node %s is not configured!\n"
-                      , MyName, token);
+                printf ("%s\n", msgString);
                 return;
             }
             STRCPY(node_name, token);
@@ -6805,13 +6815,14 @@ void node_delete_cmd( char *cmd )
                     , "[%s] Executing node delete. (node_name=%s)"
                     , MyName, node_name );
             write_startup_log( msgString );
+            printf ("%s\n", msgString);
         }
     }
     else
     {
         sprintf( msgString, "[%s] Invalid node delete options syntax!",MyName);
         write_startup_log( msgString );
-        printf ("[%s] Invalid node delete options syntax!\n", MyName);
+        printf ("%s\n", msgString);
         return;
     }
 
@@ -6824,6 +6835,7 @@ void node_down_cmd( char *cmd )
 
     int numLNodes = -1;
     int nid;
+    int pnid;
     char *cmd_tail = cmd;
     char delim;
     char msgString[MAX_BUFFER] = { 0 };
@@ -6852,41 +6864,45 @@ void node_down_cmd( char *cmd )
         }
         write_startup_log( msgString );
         printf ("%s\n", msgString);
+
         nid = atoi (token);
-        if (nid < 0 || nid > LNodesConfigMax - 1)
+        pnid = get_pnid_by_nid( nid );
+        if ( pnid == -1 )
         {
-            sprintf( msgString, "[%s] Invalid node id!",MyName);
+            sprintf( msgString, "[%s] Node id %d does not exist in 
configuration!"
+                   , MyName, nid);
             write_startup_log( msgString );
             printf ("%s\n", msgString);
-           return;
+            return;
         }
     }
     else
     {
-        if ( get_node_name( token ) != 0 ) 
-        {
-            sprintf( msgString, "[%s] Node %s is not configured!"
-                   , MyName, token);
-            write_startup_log( msgString );
-            printf ("%s\n", msgString);
-            return;
-        }
-        STRCPY(node_name, token);
-        nid = get_first_nid( node_name );
         if (cmd_tail[0] != 0)
         {
             snprintf( msgString, sizeof(msgString)
                     , "[%s] Executing node down. (node_name=%s) \"%s\""
-                    , MyName, node_name, cmd_tail );
+                    , MyName, token, cmd_tail );
         }
         else
         {
             snprintf( msgString, sizeof(msgString)
                     , "[%s] Executing node down. (node_name=%s)"
-                    , MyName, node_name );
+                    , MyName, token );
         }
         write_startup_log( msgString );
         printf ("%s\n", msgString);
+
+        if ( get_node_name( token ) != 0 ) 
+        {
+            sprintf( msgString, "[%s] Node %s does not exist in configuration!"
+                   , MyName, token);
+            write_startup_log( msgString );
+            printf ("%s\n", msgString);
+            return;
+        }
+        STRCPY(node_name, token);
+        nid = get_first_nid( node_name );
     }
 
     numLNodes = get_lnodes_count( nid );
@@ -6895,7 +6911,6 @@ void node_down_cmd( char *cmd )
         return;
     }
 
-    int pnid;
     int zid = -1;
     STATE state;
 
@@ -6907,7 +6922,7 @@ void node_down_cmd( char *cmd )
     {
         sprintf( msgString, "[%s] Node is already down! (nid=%d, state=%s)\n", 
MyName, nid, StateString(state) );
         write_startup_log( msgString );
-        printf ("[%s] Node is already down! (nid=%d, state=%s)\n", MyName, 
nid, StateString(state) );
+        printf ("%s\n", msgString);
         return;
     }
     else
@@ -6918,7 +6933,7 @@ void node_down_cmd( char *cmd )
             {
                 sprintf( msgString, "[%s] Multiple logical nodes in physical 
node. Use <nid> '!' to down all logical nodes in physical node\n", MyName);
                 write_startup_log( msgString );
-                printf ("[%s] Multiple logical nodes in physical node. Use 
<nid> '!' to down all logical nodes in physical node\n", MyName);
+                printf ("%s\n", msgString);
                 return;
             }
         }
@@ -7058,7 +7073,7 @@ void node_up_cmd( char *cmd, char delimiter )
             {
                 sprintf( msgString, "[%s] Invalid up options syntax!",MyName);
                 write_startup_log( msgString );
-                printf ("[%s] Invalid up options syntax!\n", MyName);
+                printf ("%s\n", msgString);
                 delimiter = ' ';
                 break;
             }
@@ -7068,7 +7083,7 @@ void node_up_cmd( char *cmd, char delimiter )
         {
             sprintf( msgString, "[%s] Invalid up syntax!",MyName);
             write_startup_log( msgString );
-            printf ("[%s] Invalid up syntax!\n", MyName);
+            printf ("%s\n", msgString);
         }
         else if (delimiter == '}')
         {
@@ -7080,6 +7095,11 @@ void node_up_cmd( char *cmd, char delimiter )
     {
         if ( VirtualNodes )
         {
+            sprintf( msgString, "[%s] Executing node up. (nid=%s)"
+                   , MyName, cmd_tail);
+            write_startup_log( msgString );
+            printf ("%s\n", msgString);
+
             get_token( cmd_tail, token, &delim );
             if ( isNumeric( token ) )
             {
@@ -7088,7 +7108,7 @@ void node_up_cmd( char *cmd, char delimiter )
                 {
                     sprintf( msgString, "[%s] Invalid node id!",MyName);
                     write_startup_log( msgString );
-                    printf ("[%s] Invalid node id!\n", MyName);
+                    printf ("%s\n", msgString);
                 }
                 else
                 {
@@ -7100,27 +7120,47 @@ void node_up_cmd( char *cmd, char delimiter )
             {
                 sprintf( msgString, "[%s] Invalid node id!",MyName);
                 write_startup_log( msgString );
-                printf ("[%s] Invalid node id!\n", MyName);
+                printf ("%s\n", msgString);
             }
         }
         else
         {
-            if ( get_node_name( cmd_tail ) == 0 ) 
+            sprintf( msgString, "[%s] Executing node up. (node=%s)"
+                   , MyName, cmd_tail);
+            write_startup_log( msgString );
+            printf ("%s\n", msgString);
+
+            get_token( cmd_tail, token, &delim );
+            if ( isNumeric( token ) )
+            {
+                sprintf( msgString, "[%s] Invalid node name (%s)!"
+                       , MyName, token);
+                write_startup_log( msgString );
+                printf ("%s\n", msgString);
+                return;
+            }
+            else
             {
-                if ( ClusterConfig.GetStorageType() == TCDBSQLITE)
+                if ( get_node_name( token ) == 0 ) 
                 {
-                    if ( copy_config_db( cmd_tail ) == 0 ) 
+                    if ( ClusterConfig.GetStorageType() == TCDBSQLITE)
                     {
-                        node_up( -1, cmd_tail, nowait );
+                        if ( copy_config_db( cmd_tail ) != 0 )
+                        {
+                            return;
+                        }
                     }
                 }
+                else
+                {
+                    sprintf( msgString, "[%s] Node %s does not exist in 
configuration!"
+                           , MyName, token);
+                    write_startup_log( msgString );
+                    printf ("%s\n", msgString);
+                    return;
+                }
             }
-            else
-            {
-                sprintf( msgString, "[%s] Invalid node name!",MyName);
-                write_startup_log( msgString );
-                printf ("[%s] Invalid node name!\n", MyName);
-            }
+            node_up( -1, cmd_tail, nowait );
         }
     }
 }
@@ -7485,6 +7525,7 @@ void ps_cmd (char *cmd_tail, char delimiter)
 {
     int nid;
     int pid;
+    int pnid;
     char process_name[MAX_PROCESS_NAME];
     char token[MAX_TOKEN];
     PROCESSTYPE process_type = ProcessType_Undefined;
@@ -7546,7 +7587,7 @@ void ps_cmd (char *cmd_tail, char delimiter)
         }
     }
 
-    // check if we have a process <name> or <nid,pid>
+    // check if we have a process <name> or <nid> or <nid,pid>
     if (isdigit (*cmd_tail))
     {
         cmd_tail = get_token (cmd_tail, token, &delimiter);
@@ -7558,7 +7599,15 @@ void ps_cmd (char *cmd_tail, char delimiter)
         }
         else
         {
-            printf ("[%s] Invalid process Nid,Pid!\n", MyName);
+            nid = atoi (token);
+            pid = -1;
+            //printf ("[%s] Invalid process Nid,Pid!\n", MyName);
+            //return;
+        }
+        pnid = get_pnid_by_nid( nid );
+        if ( pnid == -1 )
+        {
+            printf( "[%s] Invalid node, nid=%d\n", MyName, nid );
             return;
         }
     }
@@ -8251,8 +8300,6 @@ bool process_command( char *token, char *cmd_tail, char 
delimiter )
     }
     else if (strcmp (token, "up") == 0)
     {
-        sprintf( msgString, "[%s] Executing node up. 
(node=%s)",MyName,cmd_tail);
-        write_startup_log( msgString );
         if (Started)
         {
             node_up_cmd( cmd_tail, delimiter );

http://git-wip-us.apache.org/repos/asf/trafodion/blob/887051c8/core/sqf/monitor/test/runtest
----------------------------------------------------------------------
diff --git a/core/sqf/monitor/test/runtest b/core/sqf/monitor/test/runtest
index 9c08949..8c1193b 100755
--- a/core/sqf/monitor/test/runtest
+++ b/core/sqf/monitor/test/runtest
@@ -102,7 +102,8 @@ fi
 #
 # Setup test execution
 #
-export PATH=$PATH:$PWD/Linux-x86_64/64/dbg
+ARCH=`arch`
+export PATH=$PATH:$PWD/Linux-${ARCH}/64/dbg
 cd $TRAF_HOME/monitor/test
 echo $PWD
 

http://git-wip-us.apache.org/repos/asf/trafodion/blob/887051c8/core/sqf/sqenvcom.sh
----------------------------------------------------------------------
diff --git a/core/sqf/sqenvcom.sh b/core/sqf/sqenvcom.sh
index eec2a3b..7058637 100644
--- a/core/sqf/sqenvcom.sh
+++ b/core/sqf/sqenvcom.sh
@@ -707,6 +707,13 @@ export SQ_MON_EPOLL_RETRY_COUNT=4
 # Trafodion Configuration Zookeeper store
 #export TC_ZCONFIG_SESSION_TIMEOUT=120
 
+# increase SQ_MON,ZCLIENT,WDT timeout only to jenkins env.
+if [[ "$TRAF_HOME" == *"/home/jenkins"* ]]; then
+export SQ_MON_EPOLL_WAIT_TIMEOUT=20
+export SQ_MON_ZCLIENT_SESSION_TIMEOUT=360
+export SQ_WDT_KEEPALIVETIMERVALUE=360
+fi
+
 # set to 0 to disable phandle verifier
 export SQ_PHANDLE_VERIFIER=1
 

http://git-wip-us.apache.org/repos/asf/trafodion/blob/887051c8/core/sqf/sql/scripts/sqnodes.pm
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/sqnodes.pm b/core/sqf/sql/scripts/sqnodes.pm
index 36d8f0c..0d09565 100644
--- a/core/sqf/sql/scripts/sqnodes.pm
+++ b/core/sqf/sql/scripts/sqnodes.pm
@@ -279,10 +279,10 @@ sub verifyParse
             displayStmt($stmtOk);
             print "   Error: node-id not specified\n";
         }
-        elsif ($nodeId > 255)
+        elsif ($nodeId > 1023)
         {
             displayStmt($stmtOk);
-            print "   Error: node-id must be in the range 0..255.\n";
+            print "   Error: node-id must be in the range 0..1023.\n";
         }
         if (@cores == 0)
         {

http://git-wip-us.apache.org/repos/asf/trafodion/blob/887051c8/core/sqf/src/tm/tm_internal.h
----------------------------------------------------------------------
diff --git a/core/sqf/src/tm/tm_internal.h b/core/sqf/src/tm/tm_internal.h
index bca0f77..cf735b2 100644
--- a/core/sqf/src/tm/tm_internal.h
+++ b/core/sqf/src/tm/tm_internal.h
@@ -46,7 +46,6 @@
 
 #define MAX_FILE_NAME 64
 #define MAX_NUM_TRANS   1024
-#define MAX_NODES 256
 #define MAX_SYNC_TXS 50
 #define MAX_RECEIVE_BUFFER 200000
 // low number for testing

http://git-wip-us.apache.org/repos/asf/trafodion/blob/887051c8/core/sqf/src/tm/tmlibmsg.h
----------------------------------------------------------------------
diff --git a/core/sqf/src/tm/tmlibmsg.h b/core/sqf/src/tm/tmlibmsg.h
index c8eea04..1049b7d 100644
--- a/core/sqf/src/tm/tmlibmsg.h
+++ b/core/sqf/src/tm/tmlibmsg.h
@@ -43,8 +43,8 @@
 
 //#include "dumapp.h"
 
+#include "trafconf/trafconfig.h"
 #include "dtm/tm.h"
-
 #include "dtm/xa.h"
 #include "rm.h"
 #include "../../inc/fs/feerrors.h" //legacy error codes for SQL
@@ -86,7 +86,7 @@
 #define MAX_NUM_TRANS           5000
 #define STEADYSTATE_LOW_TRANS   5
 #define STEADYSTATE_HIGH_TRANS  1000
-#define MAX_NODES 256
+#define MAX_NODES               TC_NODES_MAX
 #define MAX_SYNC_TXS 50
 #define MAX_TXN_TAGS UINT_MAX
 

http://git-wip-us.apache.org/repos/asf/trafodion/blob/887051c8/core/sqf/src/tm/tools/dtmci.cpp
----------------------------------------------------------------------
diff --git a/core/sqf/src/tm/tools/dtmci.cpp b/core/sqf/src/tm/tools/dtmci.cpp
index fff798f..5d19734 100644
--- a/core/sqf/src/tm/tools/dtmci.cpp
+++ b/core/sqf/src/tm/tools/dtmci.cpp
@@ -50,8 +50,6 @@ DEFINE_EXTERN_COMP_DOVERS(dtmci)
     
 const char ga_timestamp[] = "v 3.1.0, Nov 26, 2014";
 
-#define MAX_NODES 256
-
 using namespace std;
 extern const char *ms_getenv_str(const char *pp_key);
 

http://git-wip-us.apache.org/repos/asf/trafodion/blob/887051c8/core/sqf/src/tm/tools/pwd.cpp
----------------------------------------------------------------------
diff --git a/core/sqf/src/tm/tools/pwd.cpp b/core/sqf/src/tm/tools/pwd.cpp
index f95c126..97606a2 100644
--- a/core/sqf/src/tm/tools/pwd.cpp
+++ b/core/sqf/src/tm/tools/pwd.cpp
@@ -47,8 +47,6 @@ DEFINE_EXTERN_COMP_DOVERS(dtmci)
     
 const char ga_timestamp[] = "v 3.1.0, Nov 26, 2014";
 
-#define MAX_NODES 256
-
 using namespace std;
 extern const char *ms_getenv_str(const char *pp_key);
 

http://git-wip-us.apache.org/repos/asf/trafodion/blob/887051c8/core/sqf/src/tm/tools/tmshutdown.cpp
----------------------------------------------------------------------
diff --git a/core/sqf/src/tm/tools/tmshutdown.cpp 
b/core/sqf/src/tm/tools/tmshutdown.cpp
index 5961c5b..b0ca8b0 100644
--- a/core/sqf/src/tm/tools/tmshutdown.cpp
+++ b/core/sqf/src/tm/tools/tmshutdown.cpp
@@ -37,7 +37,6 @@
 // Version
 DEFINE_EXTERN_COMP_DOVERS(tmshutdown)
 
-#define MAX_NODES 256
 #define MAX_ARGLEN 32
 using namespace std;
 

Reply via email to