diff options
author | Martin Schwenke <martin@meltin.net> | 2014-06-30 13:54:49 +1000 |
---|---|---|
committer | Martin Schwenke <martin@meltin.net> | 2014-07-02 20:26:52 +1000 |
commit | 068f2ed64751b7bf8e227d8b5f3f52afb1e813ea (patch) | |
tree | a4567161f66096b767656b68ade281036dd4bedf | |
parent | d41b622961d65fbdd48cea58f7cfa620d0eb33d3 (diff) | |
download | autocluster-068f2ed64751b7bf8e227d8b5f3f52afb1e813ea.tar.gz autocluster-068f2ed64751b7bf8e227d8b5f3f52afb1e813ea.tar.xz autocluster-068f2ed64751b7bf8e227d8b5f3f52afb1e813ea.zip |
Rename node type "sofs_front" to "nas"
Rename 50.sofs.defconf too.
Signed-off-by: Martin Schwenke <martin@meltin.net>
-rw-r--r-- | README | 7 | ||||
-rwxr-xr-x | base/all/root/scripts/setup_clusterfs_gpfs.sh | 12 | ||||
-rwxr-xr-x | base/all/root/scripts/setup_tsm_client.sh | 5 | ||||
-rwxr-xr-x | base/all/root/scripts/setup_tsm_server.sh | 6 | ||||
-rw-r--r-- | config.d/00base.defconf | 2 | ||||
-rw-r--r-- | config.d/50node_nas.defconf | 33 | ||||
-rw-r--r-- | config.d/50sofs.defconf | 33 | ||||
-rw-r--r-- | examples/example.autocluster | 2 |
8 files changed, 50 insertions, 50 deletions
@@ -431,13 +431,14 @@ Keep it simple * The NODES configuration variable controls the types of nodes that are created. At the time of writing, the default value is: - NODES="sofs_front:0-3 rhel_base:4" + NODES="nas:0-3 rhel_base:4" This means that you get 4 clustered NAS nodes, at IP offsets 0, 1, 2, & 3 from FIRSTIP, all part of the CTDB cluster. You also get an additional utility node at IP offset 4 that can be used, for - example, as a test client. Since sofs_* nodes are present, the base - node will not be part of the CTDB cluster - it is just extra. + example, as a test client. The base node will not be part of the + CTDB cluster. It is just extra node that can be used as a test + client or similar. For many standard use cases the nodes specified by NODES can be modified by setting NUMNODES and WITH_TSM_NODE. diff --git a/base/all/root/scripts/setup_clusterfs_gpfs.sh b/base/all/root/scripts/setup_clusterfs_gpfs.sh index 9db9dab..8ab0156 100755 --- a/base/all/root/scripts/setup_clusterfs_gpfs.sh +++ b/base/all/root/scripts/setup_clusterfs_gpfs.sh @@ -15,12 +15,12 @@ dir=$(dirname "$0") ################################################## -# If there are "storage_gpfs" nodes in the cluster (meaning that -# other "sofs_front" nodes will not have direct-attached storage) then -# scripts that include this snippet must be run on one of the -# storage nodes. Therefore, in the case, this snippet tries to -# determine if it is running on the 1st GPFS storage node and, if not, -# attempts to run the script there. +# If there are "storage_gpfs" nodes in the cluster (meaning that "nas" +# nodes will not have direct-attached storage) then scripts that +# include this snippet must be run on one of the storage nodes. +# Therefore, in the case, this snippet tries to determine if it is +# running on the 1st GPFS storage node and, if not, attempts to run +# the script there. if [ -n "$nodes_storage_gpfs" -a \ "${HOSTNAME%%.*}" != "${nodes_storage_gpfs%%[.,]*}" ] ; then if [ "${0#/}" != "$0" ] ; then diff --git a/base/all/root/scripts/setup_tsm_client.sh b/base/all/root/scripts/setup_tsm_client.sh index 7e7bb3e..792edbe 100755 --- a/base/all/root/scripts/setup_tsm_client.sh +++ b/base/all/root/scripts/setup_tsm_client.sh @@ -8,15 +8,14 @@ trap 'es=$?; exit $es' ERR # Setup things up so that TSM_SERVER is the first tsm_server node and -# any sofs_front nodes are listed in the TSM server configuration as -# clients. +# any nas nodes are listed in the TSM server configuration as clients. NODES="@@NODES@@" TSM_SERVER="" TSM_CLIENTS="" for n in $NODES ; do case "$n" in - sofs_front:*) + nas:*) t="${n%:*}" # comma separated TSM_CLIENTS="${TSM_CLIENTS}${TSM_CLIENTS:+,}${t##*:}" diff --git a/base/all/root/scripts/setup_tsm_server.sh b/base/all/root/scripts/setup_tsm_server.sh index 13d3925..30bd92e 100755 --- a/base/all/root/scripts/setup_tsm_server.sh +++ b/base/all/root/scripts/setup_tsm_server.sh @@ -9,7 +9,7 @@ trap 'es=$?; # Setup things up so that TSM_SERVER is the first tsm_server node and -# any sofs_front nodes are listed in the TSM server configuration as +# any nas nodes are listed in the TSM server configuration as # clients. NODES="@@NODES@@" TSM_SERVER="" @@ -17,7 +17,7 @@ TSM_CLIENTS="" for n in $NODES ; do case "$n" in - sofs_front:*) + nas:*) t="${n%:*}" TSM_CLIENTS="${TSM_CLIENTS}${TSM_CLIENTS:+ }${t##*:}" ;; @@ -34,7 +34,7 @@ if [ -z "$TSM_SERVER" ] ; then fi if [ -z "$TSM_CLIENTS" ] ; then - echo "ERROR: No sofs_front nodes in this cluster!" + echo "ERROR: No nas nodes in this cluster!" exit 1 fi diff --git a/config.d/00base.defconf b/config.d/00base.defconf index 6128d81..4f0440a 100644 --- a/config.d/00base.defconf +++ b/config.d/00base.defconf @@ -13,7 +13,7 @@ defconf CLUSTERFS_TYPE "gpfs" \ defconf CLUSTERFS_DEFAULT_MOUNTPOINT "/clusterfs" \ "<directory>" "mountpoint for default cluster filesystem" -defconf NODES "sofs_front:0-3 rhel_base:4" \ +defconf NODES "nas:0-3 rhel_base:4" \ "<nodes>" "list of node types to create, with associated IP offsets" defconf NUMNODES "" \ diff --git a/config.d/50node_nas.defconf b/config.d/50node_nas.defconf new file mode 100644 index 0000000..a0ac0c1 --- /dev/null +++ b/config.d/50node_nas.defconf @@ -0,0 +1,33 @@ +# Hey Emacs, this is a -*- shell-script -*- !!! + +hack_nodes_nas () +{ + local node_count_nas=0 + hack_filter () + { + if [ "$node_type" = "nas" ] ; then + node_count_nas=$(($node_count_nas + 1)) + name="${CLUSTER}nas${node_count_nas}" + ctdb_node=1 + fi + } + hack_all_nodes_with hack_filter +} + +register_hook hack_nodes_functions hack_nodes_nas + +create_node_nas () +{ + local ip_offset="$1" + local name="$2" + local ctdb_node="$3" + + echo "Creating NAS node $name" + + create_node_COMMON "$name" "$ip_offset" "$type" +} + +node_has_shared_disks_nas () +{ + ! have_dedicated_storage_nodes +} diff --git a/config.d/50sofs.defconf b/config.d/50sofs.defconf deleted file mode 100644 index 95cfc5f..0000000 --- a/config.d/50sofs.defconf +++ /dev/null @@ -1,33 +0,0 @@ -# Hey Emacs, this is a -*- shell-script -*- !!! - -hack_nodes_sofs_front () -{ - local node_count_sofs_front=0 - hack_filter () - { - if [ "$node_type" = "sofs_front" ] ; then - node_count_sofs_front=$(($node_count_sofs_front + 1)) - name="${CLUSTER}front${node_count_sofs_front}" - ctdb_node=1 - fi - } - hack_all_nodes_with hack_filter -} - -register_hook hack_nodes_functions hack_nodes_sofs_front - -create_node_sofs_front () -{ - local ip_offset="$1" - local name="$2" - local ctdb_node="$3" - - echo "Creating SoFS front-end node $name" - - create_node_COMMON "$name" "$ip_offset" "$type" -} - -node_has_shared_disks_sofs_front () -{ - ! have_dedicated_storage_nodes -} diff --git a/examples/example.autocluster b/examples/example.autocluster index 0a771af..e2ffe24 100644 --- a/examples/example.autocluster +++ b/examples/example.autocluster @@ -6,7 +6,7 @@ # FIRSTIP=30 # YUM_TEMPLATE="|rhel_gen_yum_repos myrepo" # BASENAME="mybase" -# NODES="sofs_front:0-3 rhel_base:4,5" +# NODES="nas:0-3 rhel_base:4,5" # When using an active directory server, you probably want to set # these too... |