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 2016/08/30 18:23:12 UTC

[4/6] incubator-trafodion git commit: TRAFODION 2191 addNode_step2 adding extra lines to DCS server

TRAFODION 2191 addNode_step2 adding extra lines to DCS server


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

Branch: refs/heads/master
Commit: 48d5dcf78a56fa766a378b30821188dcfaaae927
Parents: 085502b
Author: Amanda Moran <am...@apache.com>
Authored: Fri Aug 26 22:57:26 2016 +0000
Committer: Amanda Moran <am...@apache.com>
Committed: Fri Aug 26 22:57:26 2016 +0000

----------------------------------------------------------------------
 install/installer/addNode_step2 | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/48d5dcf7/install/installer/addNode_step2
----------------------------------------------------------------------
diff --git a/install/installer/addNode_step2 b/install/installer/addNode_step2
index 40318b0..4cd37e7 100755
--- a/install/installer/addNode_step2
+++ b/install/installer/addNode_step2
@@ -194,13 +194,22 @@ let extras=$DCS_SERVERS_PARM%$node_count
 count=1
 for node_name in $NODE_LIST
 do
-   if [ $count -le $extras ]; then
-      let node_servers=$per_node+1
-   else
-      node_servers=$per_node
+
+   while read line
+   do
+      if [[ $line  =~ .*$node_name.* ]]; then
+         found=1
+      fi
+   done < $PWD/servers
+   if [[ $found -ne "1" ]]; then
+      if [ $count -le $extras ]; then
+         let node_servers=$per_node+1
+      else
+         node_servers=$per_node
+      fi
+      echo $node_name $node_servers >> $PWD/servers
+      (( count++ ))
    fi
-   echo $node_name $node_servers >> $PWD/tempServers
-   (( count++ ))
 done