summaryrefslogtreecommitdiffstats
path: root/base/root/scripts
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2009-05-22 16:27:35 +1000
committerMartin Schwenke <martin@meltin.net>2009-05-22 16:27:35 +1000
commit5cda1e1123b186fe0a8a3d1c313737f773aacd29 (patch)
tree38098aa2dbc4c189d5e35e71eccabcb2134d8def /base/root/scripts
parent97aaab2636e033a9a333109722b82cdad4ac71c3 (diff)
Generalise the types of nodes that can be created.
The main autocluster script no longer contains hardcoded nodes types like TSM and SoFS GUI. Code for these node types has been moved out to the files in config.d/. New node types can be created in a modular way. The new configuration variable NODES can be used to create an arbitrary mix of node types. For example: NODES="tsm_server:0 sofs_gui:1 sofs_front:2-4 rhel_base:7,8" The numbers are IP offsets relative to FIRSTIP. So, the above specifies that: * a TSM server node should be created at FIRSTIP; * a SoFS GUI node should be created at FIRSTIP + 1; * 3 SoFS front-end nodes should be created at offsets 2, 3, 4; and * 2 base RHEL base nodes should be created at offsets 7 and 8. If there are no sofs_gui or sofs_front nodes then rhel_base nodes take part in the CTDB cluster, otherwise the rhel_base nodes are auxiliary nodes outside the CTDB cluster. The theory of operation for creating a cluster is: 1. Figure out what nodes should be created. 1.1 Expand abbreviations in NODES. 1.2 Apply hacks: backward compatibility, node naming, CTDB cluster membership. 1.3 Limit CTDB cluster membership to NUMNODES nodes. 1.4 Check for duplicate IP addresses. 2. Create the hosts file and rename CTDB cluster nodes to <cluster>nX. 3. Create the CTDB nodes file. 4. Run cluster creation hooks. The only current one create the shared disks. 5. Create the nodes by call node-type-specific functions. Although default creation of nodes is specified by NODES, specific nodes can be overridden by WITH_TSM_NODE and WITH_SOFS_GUI in ways that should be obvious. Similarly, the number of CTDB cluster nodes can be limited (but not increased) via the NUMNODES variable. Consequently the default value of these variables has been changed to "". Also, if there is only one tsm_server node then it is still called <cluster>tsm rather than <cluster>tsm1. However, most existing configurations should work - a non-trivial amount of effort has been devoted to backward compatibility. Other changes of note include: * The "create node" and "create tsm" commands have been removed because they are no longer so obvious. If there is demand then "create node" may be reintroduced with the ability to create all node types. * The new configuration variable SHAREDDISK_COUNT can be used to specify the number of shared disks. It defaults to 3. The shared disk configuration has been moved to new file config.d/10shareddisk.defconf. * MAC addresses are now relative to the IP offset rather than the node numbers. Hopefully this will have no unexpected consequences. * Most errors in the code now result in the new die() function being called. This makes some of the code more readable. * The usage message formatting code has been reworked a little to allow the fill_text() function to be more generally useful. * The disk image(s) for TSM storage contains the full node name - as there can now be multiple TSM server nodes. * The file hosts.<cluster> is now created in the tmp/ subdirectory. * The global variable LOWDOMAIN has been removed because it wasn't necessary. * vircmd has been modified to handle the extra node types. These are currently hardcoded. This could be improved but isn't a priority and maintenance doesn't particularly suffer. Signed-off-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'base/root/scripts')
0 files changed, 0 insertions, 0 deletions