Remove NUMNODES and WITH_TSM_NODE configuration variables
[tridge/autocluster.git] / autocluster
index 6793f8c48bb12d555d4d69664b42037ab8b47da0..e621b56f95c2f1cbc328985e02cd0ffc3c925467 100755 (executable)
@@ -302,11 +302,6 @@ create_node_configure_image ()
     diskimage unmount
 }
 
-# Provides an easy way of removing nodes from $NODE.
-create_node_null () {
-    :
-}
-
 hack_network_map_hooks=""
 
 # Uses: CLUSTER, NAME, NETWORKS, FIRSTIP, ip_offset
@@ -385,29 +380,6 @@ expand_nodes () {
     # configuration modules register their hacks.
     run_hooks hack_nodes_functions
 
-    if [ -n "$NUMNODES" ] ; then
-       # Attempt to respect NUMNODES.  Reduce the number of CTDB
-       # nodes to NUMNODES.
-       local numnodes=$NUMNODES
-
-       hack_filter ()
-       {
-           if [ "$ctdb_node" = 1 ] ; then
-               if [ $numnodes -gt 0 ] ; then
-                   numnodes=$(($numnodes - 1))
-               else
-                   node_type="null"
-                   ctdb_node=0
-               fi
-           fi
-       }
-
-       hack_all_nodes_with hack_filter
-                       
-       [ $numnodes -gt 0 ] && \
-           die "Can't not use NUMNODES to increase the number of nodes over that specified by NODES.  You need to set NODES instead - please read the documentation."
-    fi
-    
     # Check IP addresses for duplicates.
     local ip_offsets=":"
     # This function doesn't modify anything...
@@ -439,9 +411,6 @@ common_nodelist_hacking ()
     # Build /etc/hosts and hack the names of the ctdb nodes
     hosts_line_hack_name ()
     {
-       # Ignore nodes without names (e.g. "null")
-       [ "$node_type" != "null" -a -n "$name" ] || return 0
-
        local sname=""
        local hosts_line
        local ip_addr="${NETWORK_PRIVATE_PREFIX}.$(($FIRSTIP + $ip_offset))"
@@ -489,7 +458,6 @@ common_nodelist_hacking ()
     nodes_file="tmp/nodes.$CLUSTER"
     local num_nodes=0
     hack_all_nodes_with ctdb_nodes_line >$nodes_file
-    : "${NUMNODES:=${num_nodes}}"  # Set $NUMNODES if necessary
 
     # Build UUID map
     uuid_map="tmp/uuid_map.$CLUSTER"