diff options
author | Martin Schwenke <martin@meltin.net> | 2014-06-30 13:36:07 +1000 |
---|---|---|
committer | Martin Schwenke <martin@meltin.net> | 2014-07-02 20:26:41 +1000 |
commit | d41b622961d65fbdd48cea58f7cfa620d0eb33d3 (patch) | |
tree | 7f22bcca397ee42449a808a966c5664f5359304b /config.d | |
parent | f23154c98ce721207ca483a9a732cd64a3c88beb (diff) | |
download | autocluster-d41b622961d65fbdd48cea58f7cfa620d0eb33d3.tar.gz autocluster-d41b622961d65fbdd48cea58f7cfa620d0eb33d3.tar.xz autocluster-d41b622961d65fbdd48cea58f7cfa620d0eb33d3.zip |
Rename node type "sofs_storage" to "storage_gpfs"
Move the code to new a new file and globally rename variable
NSD_SERVERS to NODES_STORAGE_GPFS.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'config.d')
-rw-r--r-- | config.d/50sofs.defconf | 43 | ||||
-rw-r--r-- | config.d/55node_storage_gpfs.defconf | 42 |
2 files changed, 42 insertions, 43 deletions
diff --git a/config.d/50sofs.defconf b/config.d/50sofs.defconf index d951977..95cfc5f 100644 --- a/config.d/50sofs.defconf +++ b/config.d/50sofs.defconf @@ -31,46 +31,3 @@ node_has_shared_disks_sofs_front () { ! have_dedicated_storage_nodes } - -###################################################################### - -NSD_SERVERS= - -hack_nodes_sofs_storage () -{ - local node_count_sofs_storage=0 - hack_filter () - { - if [ "$node_type" = "sofs_storage" ] ; then - node_count_sofs_storage=$(($node_count_sofs_storage + 1)) - name="${CLUSTER}storage${node_count_sofs_storage}" - ctdb_node=0 - local ld=$(echo $DOMAIN | tr 'A-Z' 'a-z') - NSD_SERVERS="${NSD_SERVERS}${NSD_SERVERS:+,}${name}.${ld}" - fi - } - hack_all_nodes_with hack_filter -} - -register_hook hack_nodes_functions hack_nodes_sofs_storage - -create_node_sofs_storage () -{ - local ip_offset="$1" - local name="$2" - local ctdb_node="$3" - - echo "Creating SoFS storage node $name" - - create_node_COMMON "$name" "$ip_offset" "$type" -} - -node_has_shared_disks_sofs_storage () -{ - true -} - -is_dedicated_storage_node_sofs_storage () -{ - true -} diff --git a/config.d/55node_storage_gpfs.defconf b/config.d/55node_storage_gpfs.defconf new file mode 100644 index 0000000..4601714 --- /dev/null +++ b/config.d/55node_storage_gpfs.defconf @@ -0,0 +1,42 @@ +# Hey Emacs, this is a -*- shell-script -*- !!! + +NODES_STORAGE_GPFS= + +hack_nodes_storage_gpfs () +{ + local node_count_storage_gpfs=0 + hack_filter () + { + if [ "$node_type" = "storage_gpfs" ] ; then + node_count_storage_gpfs=$(($node_count_storage_gpfs + 1)) + name="${CLUSTER}storage${node_count_storage_gpfs}" + ctdb_node=0 + local ld=$(echo $DOMAIN | tr 'A-Z' 'a-z') + NODES_STORAGE_GPFS="${NODES_STORAGE_GPFS}${NODES_STORAGE_GPFS:+,}${name}.${ld}" + fi + } + hack_all_nodes_with hack_filter +} + +register_hook hack_nodes_functions hack_nodes_storage_gpfs + +create_node_storage_gpfs () +{ + local ip_offset="$1" + local name="$2" + local ctdb_node="$3" + + echo "Creating GPFS storage node $name" + + create_node_COMMON "$name" "$ip_offset" "$type" +} + +node_has_shared_disks_storage_gpfs () +{ + true +} + +is_dedicated_storage_node_storage_gpfs () +{ + true +} |