autocluster.git
4 years agoansible: Default to not checking GPG signatures on distro YUM repos autocluster-1.4
Martin Schwenke [Mon, 16 Dec 2019 02:41:55 +0000 (13:41 +1100)]
ansible: Default to not checking GPG signatures on distro YUM repos

The official CentOS 7 boxes not not contain the necessary public keys
so, rather than forcing this to be overridden in configuration, just
default to 'no'.

Signed-off-by: Martin Schwenke <martin@meltin.net>
4 years agoansible: build nodes must have gcc installed
Martin Schwenke [Mon, 9 Dec 2019 23:45:35 +0000 (10:45 +1100)]
ansible: build nodes must have gcc installed

Signed-off-by: Martin Schwenke <martin@meltin.net>
4 years agovagrant: Use memory size setting
Martin Schwenke [Wed, 4 Dec 2019 23:52:13 +0000 (10:52 +1100)]
vagrant: Use memory size setting

This doesn't look to have been a vagrant-libvirt bug.  It looks to
have been the use of "mem" instead of "memory" as the configuration
key.

Signed-off-by: Martin Schwenke <martin@meltin.net>
4 years agoansible: Ensure GPFS build prerequisites are installed
Martin Schwenke [Wed, 4 Dec 2019 05:00:14 +0000 (16:00 +1100)]
ansible: Ensure GPFS build prerequisites are installed

Signed-off-by: Martin Schwenke <martin@meltin.net>
4 years agoautocluster: Do not run destroy if generated config does not exist autocluster-1.3
Martin Schwenke [Tue, 8 Oct 2019 04:50:55 +0000 (15:50 +1100)]
autocluster: Do not run destroy if generated config does not exist

When build is run, skip destroy if the file doesn't exist.  This
avoids a failure on the initial run.

Error when destroy is run explicitly, since the error from Vagrant is
very vague.

Signed-off-by: Martin Schwenke <martin@meltin.net>
4 years agoautocluster: Factor out construction of generated config file name
Martin Schwenke [Tue, 8 Oct 2019 04:48:45 +0000 (15:48 +1100)]
autocluster: Factor out construction of generated config file name

Signed-off-by: Martin Schwenke <martin@meltin.net>
4 years agoautocluster: Fix typo in usage message
Martin Schwenke [Tue, 8 Oct 2019 04:47:24 +0000 (15:47 +1100)]
autocluster: Fix typo in usage message

Signed-off-by: Martin Schwenke <martin@meltin.net>
4 years agoautocluster: Run ssh setup during host setup
Martin Schwenke [Tue, 8 Oct 2019 04:46:16 +0000 (15:46 +1100)]
autocluster: Run ssh setup during host setup

Signed-off-by: Martin Schwenke <martin@meltin.net>
4 years agoansible/host: Ensure ~/.ssh/config exists
Martin Schwenke [Tue, 8 Oct 2019 05:15:07 +0000 (16:15 +1100)]
ansible/host: Ensure ~/.ssh/config exists

Before attempting to modify it.

Signed-off-by: Martin Schwenke <martin@meltin.net>
4 years agoansible/host: Single-quote regexp string
Martin Schwenke [Tue, 8 Oct 2019 05:10:58 +0000 (16:10 +1100)]
ansible/host: Single-quote regexp string

Otherwise the backslashes are not literal, but attempt to escape the
next character.

Signed-off-by: Martin Schwenke <martin@meltin.net>
4 years agoansible/host: Reload NFS exports after updating
Martin Schwenke [Tue, 8 Oct 2019 05:38:32 +0000 (16:38 +1100)]
ansible/host: Reload NFS exports after updating

Signed-off-by: Martin Schwenke <martin@meltin.net>
4 years agoansible/host: Fix missing directories and dependencies
Martin Schwenke [Tue, 8 Oct 2019 04:45:05 +0000 (15:45 +1100)]
ansible/host: Fix missing directories and dependencies

Signed-off-by: Martin Schwenke <martin@meltin.net>
4 years agoansible/host: Fix indentation
Martin Schwenke [Tue, 8 Oct 2019 04:44:34 +0000 (15:44 +1100)]
ansible/host: Fix indentation

Signed-off-by: Martin Schwenke <martin@meltin.net>
4 years agoansible/host: Update to latest upstream Vagrant version
Martin Schwenke [Tue, 8 Oct 2019 01:30:55 +0000 (12:30 +1100)]
ansible/host: Update to latest upstream Vagrant version

Signed-off-by: Martin Schwenke <martin@meltin.net>
4 years agovagrant: Change addition of default route to use "ip route" command
Martin Schwenke [Sat, 21 Sep 2019 01:30:40 +0000 (11:30 +1000)]
vagrant: Change addition of default route to use "ip route" command

Old "route" command is not always installed.

Signed-off-by: Martin Schwenke <martin@meltin.net>
4 years agoansible: Require zlib-devel on build nodes autocluster-1.2
Martin Schwenke [Sat, 17 Aug 2019 07:15:44 +0000 (17:15 +1000)]
ansible: Require zlib-devel on build nodes

Signed-off-by: Martin Schwenke <martin@meltin.net>
4 years agoansible: Configure CTDB to debug hung scripts
Martin Schwenke [Tue, 7 May 2019 04:48:49 +0000 (14:48 +1000)]
ansible: Configure CTDB to debug hung scripts

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoChange fixed NFS RPC ports to be outside the local port range autocluster-1.1
Martin Schwenke [Thu, 4 Apr 2019 04:24:04 +0000 (15:24 +1100)]
Change fixed NFS RPC ports to be outside the local port range

Seeing some instances where nfsd can't start because its port is in
use.

On Linux the default local port range is 32768-60999, so the ports
used for NFS should be outside this range.  The configured range can
be checked via:

  $ sysctl net.ipv4.ip_local_port_range
  net.ipv4.ip_local_port_range = 32768 60999

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoLeave EPEL package installed
Martin Schwenke [Fri, 29 Mar 2019 04:39:05 +0000 (15:39 +1100)]
Leave EPEL package installed

If we want to use a local EPEL mirror then the GPG key should be
installed.  If using custom distro repos then the external EPEL repo
file will be removed anyway, so won't slow things down.

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoUpdate TODO autocluster-1.0
Martin Schwenke [Thu, 7 Feb 2019 01:23:28 +0000 (12:23 +1100)]
Update TODO

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoUpdate README
Martin Schwenke [Thu, 21 Feb 2019 06:23:19 +0000 (17:23 +1100)]
Update README

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoAdd host setup command
Martin Schwenke [Thu, 28 Feb 2019 01:29:20 +0000 (12:29 +1100)]
Add host setup command

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoRemove bash autocluster script and supporting files
Martin Schwenke [Tue, 2 Oct 2018 05:39:04 +0000 (15:39 +1000)]
Remove bash autocluster script and supporting files

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoRewrite autocluster in Python
Martin Schwenke [Wed, 27 Feb 2019 04:11:58 +0000 (15:11 +1100)]
Rewrite autocluster in Python

Reads a YAML configuration, with defaults in defaults.yml.  This
replaces the bash version.

Currently does the following actions for cluster <cluster>: defaults,
dump, status, generate, destroy, create, ssh_config, setup, build.

update_hosts is replaced by ssh_update.  If necessary, hosts file can
be updated by hand using hosts file in state directory.

Update build/packaging and example configuration file.

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoAdd Ansible playbook for node configuration
Martin Schwenke [Wed, 6 Feb 2019 03:53:10 +0000 (14:53 +1100)]
Add Ansible playbook for node configuration

This will replace all of the existing node provisioning/configuration.
CentOS 7 nodes are currently supported.

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoAdd a Vagrantfile and supporting scripts
Martin Schwenke [Wed, 6 Feb 2019 06:43:50 +0000 (17:43 +1100)]
Add a Vagrantfile and supporting scripts

Generates libvirt nodes according to configuration.

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoAdd Ansible playbooks for host machine setup
Martin Schwenke [Thu, 14 Feb 2019 04:04:58 +0000 (15:04 +1100)]
Add Ansible playbooks for host machine setup

This is currently host setup on CentOS 7 and setting up an
autocluster-specific SSH key on the host.

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoAdd RHEL 6.10, 7.2, 7.3, 7.4, 7.5 ISO details
Martin Schwenke [Tue, 26 Jun 2018 04:16:35 +0000 (14:16 +1000)]
Add RHEL 6.10, 7.2, 7.3, 7.4, 7.5 ISO details

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoDo not install popt-devel
Amitay Isaacs [Wed, 9 May 2018 09:42:42 +0000 (19:42 +1000)]
Do not install popt-devel

Build against in-tree popt as the version of popt on RHEL is older than
required.

Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
6 years agocluster_configure: Updates for new style CTDB configuration
Martin Schwenke [Mon, 23 Apr 2018 04:31:49 +0000 (14:31 +1000)]
cluster_configure: Updates for new style CTDB configuration

This is an intermediate change for CTDB 4.9.0pre versions that use the
new configuration file but still required the CTDB_MANAGED_*
variables.

Signed-off-by: Martin Schwenke <martin@meltin.net>
6 years agoAdd RHEL 6.9 ISO
Martin Schwenke [Thu, 23 Mar 2017 19:34:53 +0000 (06:34 +1100)]
Add RHEL 6.9 ISO

Signed-off-by: Martin Schwenke <martin@meltin.net>
6 years agoGPFS setup: Improve check to see if filesystem is mounted
Martin Schwenke [Fri, 3 Mar 2017 04:21:15 +0000 (15:21 +1100)]
GPFS setup: Improve check to see if filesystem is mounted

Signed-off-by: Martin Schwenke <martin@meltin.net>
7 years agoTry 5 times to join AD domain before failing
Amitay Isaacs [Thu, 10 Nov 2016 02:48:52 +0000 (13:48 +1100)]
Try 5 times to join AD domain before failing

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
7 years agoFail if any of the cluster setup tasks fail
Amitay Isaacs [Mon, 17 Oct 2016 07:36:33 +0000 (18:36 +1100)]
Fail if any of the cluster setup tasks fail

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
7 years agoRun net ads join under a timeout and exit if join fails
Amitay Isaacs [Mon, 17 Oct 2016 06:18:33 +0000 (17:18 +1100)]
Run net ads join under a timeout and exit if join fails

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
7 years agoAdd RHEL 6.8 ISO details
Martin Schwenke [Tue, 11 Oct 2016 21:21:36 +0000 (08:21 +1100)]
Add RHEL 6.8 ISO details

Signed-off-by: Martin Schwenke <martin@meltin.net>
7 years agoRun top-level ssh with -n
Martin Schwenke [Mon, 10 Oct 2016 04:35:33 +0000 (15:35 +1100)]
Run top-level ssh with -n

This stop it eating standard input.

Signed-off-by: Martin Schwenke <martin@meltin.net>
7 years agoUndefine domains with --managed-save option
Martin Schwenke [Tue, 24 May 2016 03:46:16 +0000 (13:46 +1000)]
Undefine domains with --managed-save option

Just in case previous version was automatically saved.

Signed-off-by: Martin Schwenke <martin@meltin.net>
8 years agoAdd RHEL 6.7 ISO details
Martin Schwenke [Wed, 19 Aug 2015 05:09:49 +0000 (15:09 +1000)]
Add RHEL 6.7 ISO details

Signed-off-by: Martin Schwenke <martin@meltin.net>
8 years agoad: Samba AD now starts winbindd
Amitay Isaacs [Mon, 27 Jul 2015 08:48:47 +0000 (18:48 +1000)]
ad: Samba AD now starts winbindd

8 years agoSplit GPFS configuration commands
Amitay Isaacs [Thu, 2 Jul 2015 08:33:19 +0000 (18:33 +1000)]
Split GPFS configuration commands

In GPFS 4.1, cipherList cannot be changed with other params

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
8 years agobuild: Include more samba development packages
Amitay Isaacs [Sat, 9 May 2015 13:52:24 +0000 (23:52 +1000)]
build: Include more samba development packages

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
8 years agoUpdate the samba packages for NAS
Amitay Isaacs [Tue, 12 May 2015 11:48:37 +0000 (21:48 +1000)]
Update the samba packages for NAS

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
9 years agoKickstart: Drop 2nd network interface configuration
Martin Schwenke [Wed, 1 Apr 2015 04:48:29 +0000 (15:48 +1100)]
Kickstart: Drop 2nd network interface configuration

It isn't used and causes problems with RHEL 7.1.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoAdd RHEL 7.1 ISO details
Martin Schwenke [Wed, 1 Apr 2015 04:22:03 +0000 (15:22 +1100)]
Add RHEL 7.1 ISO details

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoRemove internal use of vircmd
Martin Schwenke [Mon, 16 Mar 2015 04:21:19 +0000 (15:21 +1100)]
Remove internal use of vircmd

It is too easy to clobber/interact with domains that are no specified
in the cluster configuration.

Replace use of vircmd with new function virsh_cluster().  The only
possible loss here is that unmatched nodes may not be destroyed, so
duplicate IP addresses might occur when cluster configuration changes.
To try to avoid this a warning is printed by virsh_cluster() when
domains that are not part of the cluster are found to match
CLUSTER/CLUSTER_PATTERN.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoInstead of test user add user1,user2 and groups group1,group2
Amitay Isaacs [Tue, 17 Feb 2015 00:49:35 +0000 (11:49 +1100)]
Instead of test user add user1,user2 and groups group1,group2

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
9 years agoSeparate build and cluster_build nodes.
Amitay Isaacs [Fri, 12 Dec 2014 03:05:30 +0000 (14:05 +1100)]
Separate build and cluster_build nodes.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
9 years agoCreate multiple public_addresses files autocluster-0.10
Amitay Isaacs [Thu, 20 Nov 2014 03:24:24 +0000 (14:24 +1100)]
Create multiple public_addresses files

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
9 years agocluster_configure: Remove files for "None" template substitutions
Martin Schwenke [Tue, 25 Nov 2014 00:26:32 +0000 (11:26 +1100)]
cluster_configure: Remove files for "None" template substitutions

This is a hack that assume any substitution that returns None must
cause the template containing it to produce no output file at all.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoCreate IPv4 and IPv6 nodes files
Amitay Isaacs [Mon, 24 Nov 2014 08:39:04 +0000 (19:39 +1100)]
Create IPv4 and IPv6 nodes files

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
9 years agoAdd IPv6 support
Amitay Isaacs [Thu, 20 Nov 2014 03:16:15 +0000 (14:16 +1100)]
Add IPv6 support

New configuration variable NETWORK_STACK.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
9 years agoDo not fail in install_build task
Amitay Isaacs [Thu, 13 Nov 2014 00:19:06 +0000 (11:19 +1100)]
Do not fail in install_build task

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
9 years agoShift argument after processing it
Amitay Isaacs [Thu, 20 Nov 2014 04:57:54 +0000 (15:57 +1100)]
Shift argument after processing it

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
9 years agoDo not disable IPv6 stack
Amitay Isaacs [Mon, 24 Nov 2014 04:04:54 +0000 (15:04 +1100)]
Do not disable IPv6 stack

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
9 years agoRemove netmask from network_map
Martin Schwenke [Mon, 24 Nov 2014 10:01:37 +0000 (21:01 +1100)]
Remove netmask from network_map

This removes the /24 assumption, embeds the prefix into the ip field
and calculates netmask in the only place it is needed.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoNew function ipv4_prefix_to_netmask()
Martin Schwenke [Mon, 24 Nov 2014 09:49:46 +0000 (20:49 +1100)]
New function ipv4_prefix_to_netmask()

Allows calculation of netmask from prefix.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agobase_create: Set IPNUM=$FIRSTIP
Martin Schwenke [Mon, 24 Nov 2014 09:47:12 +0000 (20:47 +1100)]
base_create: Set IPNUM=$FIRSTIP

This allows removal of a kludge in guess_install_network().

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoAdd RHEL 6.6 ISO
Martin Schwenke [Fri, 17 Oct 2014 01:33:37 +0000 (12:33 +1100)]
Add RHEL 6.6 ISO

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoSet new CTDB configuration variable CTDB_LOGGING="syslog"
Martin Schwenke [Tue, 12 Aug 2014 04:32:45 +0000 (14:32 +1000)]
Set new CTDB configuration variable CTDB_LOGGING="syslog"

Leave CTDB_SYSLOG="yes" for backward compatiblity.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoUndefine nodes in old cluster when building a new one
Martin Schwenke [Tue, 12 Aug 2014 01:27:24 +0000 (11:27 +1000)]
Undefine nodes in old cluster when building a new one

Otherwise, if the list of NODES is changed so that nodes are renamed,
then old nodes will come back when the new cluster is booted and
madness will ensue.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoSwitch on rsyslog UDP listener on 127.0.0.1:514
Martin Schwenke [Tue, 12 Aug 2014 01:03:13 +0000 (11:03 +1000)]
Switch on rsyslog UDP listener on 127.0.0.1:514

So that it can be used by CTDB's new direct-UDP logging.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoUpdate TODO
Martin Schwenke [Tue, 29 Jul 2014 03:02:15 +0000 (13:02 +1000)]
Update TODO

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoMake cluster_setup.sh use generated configuration file
Martin Schwenke [Tue, 29 Jul 2014 02:56:42 +0000 (12:56 +1000)]
Make cluster_setup.sh use generated configuration file

An early step in making cluster_setup.sh independent of autocluster.

* autocluster generates cluster_setup.config during base setup
* cluster_setup.sh sources this configuration file
* cluster_setup.sh sources the per-task scripts
* cluster_setup.sh now exits on first error
* Replace @@ templates in scripts with variable references

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoAdd #config header to setup scripts listing required configuration variables
Martin Schwenke [Tue, 29 Jul 2014 02:09:09 +0000 (12:09 +1000)]
Add #config header to setup scripts listing required configuration variables

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoMove cluster_setup.sh task scriptlets to tasks subdirectory
Martin Schwenke [Tue, 29 Jul 2014 02:12:05 +0000 (12:12 +1000)]
Move cluster_setup.sh task scriptlets to tasks subdirectory

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoNew configuration variable AD_DNS_FORWARDER
Martin Schwenke [Tue, 29 Jul 2014 01:09:02 +0000 (11:09 +1000)]
New configuration variable AD_DNS_FORWARDER

When creating a cluster with an addition AD server node, the DNS
forwarder on the AD node needs to be different to the DNS server for
the cluster nodes.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoMake some configuration variables depend on KVMHOST @uto
Martin Schwenke [Tue, 29 Jul 2014 01:08:16 +0000 (11:08 +1000)]
Make some configuration variables depend on KVMHOST @uto

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agonode_name_format_* functions should produce the node name
Martin Schwenke [Mon, 28 Jul 2014 10:06:16 +0000 (20:06 +1000)]
node_name_format_* functions should produce the node name

No use having them print the format string.  That actually makes it
more restrictive.  Instead, have the functions take cluster name and
index as arguments - these can then be passed to printf in either
order depending on the format string.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoAlways default _SHARED_DISK_TEMPLATE to ""
Martin Schwenke [Mon, 28 Jul 2014 06:33:17 +0000 (16:33 +1000)]
Always default _SHARED_DISK_TEMPLATE to ""

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoRemove "private dir" from smb.conf template
Martin Schwenke [Mon, 28 Jul 2014 06:21:32 +0000 (16:21 +1000)]
Remove "private dir" from smb.conf template

This hasn't been used for a long time

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoUpdate README
Martin Schwenke [Mon, 28 Jul 2014 02:00:14 +0000 (12:00 +1000)]
Update README

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoDefault to virtio system disks
Martin Schwenke [Mon, 28 Jul 2014 01:37:41 +0000 (11:37 +1000)]
Default to virtio system disks

The qcow2 + virtio + writeback problem seems to be fixed.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoNAS packages: Attempt to install samba-winbind packages
Martin Schwenke [Mon, 28 Jul 2014 01:21:38 +0000 (11:21 +1000)]
NAS packages: Attempt to install samba-winbind packages

Some Samba packaging schemes have the winbind pieces in different
packages, so try to install those too.  There's no check for failures,
so this is harmless (apart from warning messages) when the packages
don't exist.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agorsyslog: Turn off rate limiting
Martin Schwenke [Mon, 28 Jul 2014 01:19:35 +0000 (11:19 +1000)]
rsyslog: Turn off rate limiting

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoFix broken hosts file updating
Martin Schwenke [Thu, 24 Jul 2014 06:19:02 +0000 (16:19 +1000)]
Fix broken hosts file updating

Replace the hardcoded node name regexp with a generated one.  Detailed
comments are required to describe the construction of the new regexp.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoWhen exiting due to unknown node type, list valid node types
Martin Schwenke [Thu, 3 Jul 2014 01:10:12 +0000 (11:10 +1000)]
When exiting due to unknown node type, list valid node types

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoUse a single entry-point script for post-boot setup
Martin Schwenke [Wed, 2 Jul 2014 07:39:06 +0000 (17:39 +1000)]
Use a single entry-point script for post-boot setup

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoRename common_nodelist_hacking() to cluster_nodelist_hacking()
Martin Schwenke [Wed, 2 Jul 2014 04:07:14 +0000 (14:07 +1000)]
Rename common_nodelist_hacking() to cluster_nodelist_hacking()

... and just call it once before doing any cluster operations.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agovircmd: loosen matching of nodes in cluster if no wildcard given
Martin Schwenke [Wed, 2 Jul 2014 02:09:52 +0000 (12:09 +1000)]
vircmd: loosen matching of nodes in cluster if no wildcard given

As more node types appear this becomes unwieldy so don't be as
paranoid.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoAdd create_node_DEFAULT, no more hack_nodes_functions
Martin Schwenke [Wed, 2 Jul 2014 01:56:54 +0000 (11:56 +1000)]
Add create_node_DEFAULT, no more hack_nodes_functions

Reduce the amount of work needed to define how to create a new node
type.

* Each node type definition needs to define node_name_format_<TYPE>()

* Node types that should be part of the CTDB cluster should define
  node_is_ctdb_node_<TYPE>() and have it echo 1

* Nodes need not define create_node_<TYPE>() if they don't do anything
  unusual.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoRemove NUMNODES and WITH_TSM_NODE configuration variables
Martin Schwenke [Wed, 2 Jul 2014 01:08:45 +0000 (11:08 +1000)]
Remove NUMNODES and WITH_TSM_NODE configuration variables

The backward compatibility hacking is horrible!

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoRework cluster_setup() to use node types instead of $CLUSTER_TYPE
Martin Schwenke [Mon, 30 Jun 2014 06:39:15 +0000 (16:39 +1000)]
Rework cluster_setup() to use node types instead of $CLUSTER_TYPE

* Remove configuration variable CLUSTER_TYPE

* Add "build" node type

* Rename setup scripts for "ad" and "build" node type

* Separate out some setup_node_nas.sh from setup_cluster_nas.sh

* Make install_packages.sh and cluster_setup.sh more verbose

* Separate out clusterfs_setup.sh

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoNo need to chkconfig ctdb - it is enabled by default
Martin Schwenke [Tue, 1 Jul 2014 12:28:29 +0000 (22:28 +1000)]
No need to chkconfig ctdb - it is enabled by default

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoRename cluster "configure" action to "setup"
Martin Schwenke [Mon, 30 Jun 2014 06:37:25 +0000 (16:37 +1000)]
Rename cluster "configure" action to "setup"

Rewrite cluster_setup() to factor out the common SSH bits.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoStore shared disk IDs in a variable instead of a file
Martin Schwenke [Mon, 30 Jun 2014 04:39:49 +0000 (14:39 +1000)]
Store shared disk IDs in a variable instead of a file

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoRename node type "sofs_front" to "nas"
Martin Schwenke [Mon, 30 Jun 2014 03:54:49 +0000 (13:54 +1000)]
Rename node type "sofs_front" to "nas"

Rename 50.sofs.defconf too.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoRename node type "sofs_storage" to "storage_gpfs"
Martin Schwenke [Mon, 30 Jun 2014 03:36:07 +0000 (13:36 +1000)]
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>
9 years agoSplit hack_nodes_sofs()
Martin Schwenke [Mon, 30 Jun 2014 02:48:18 +0000 (12:48 +1000)]
Split hack_nodes_sofs()

... into hack_nodes_sofs_front() and hack_nodes_sofs_storage().  This
allows 50.sofs.defconf to be split

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoMove shared disk presence logic from nodes into shared disk code
Martin Schwenke [Mon, 30 Jun 2014 02:08:16 +0000 (12:08 +1000)]
Move shared disk presence logic from nodes into shared disk code

Currently this is distributed around the node logic and is hard to
manage.

Instead, introduce 2 new functions (well, meta-functions, called using
call_func):

* is_dedicated_storage_node()

  Defaults to false.  Is true for sofs_storage.

* node_has_shared_disks()

  Defaults to false.  True for sofs_storage.  True for sofs_front when
  there are no dedicated storage nodes.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoSimplify shared disk logic for sofs_front and sofs_storage nodes
Martin Schwenke [Mon, 30 Jun 2014 00:19:29 +0000 (10:19 +1000)]
Simplify shared disk logic for sofs_front and sofs_storage nodes

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoLimit functionality of rhel_base nodes
Martin Schwenke [Fri, 27 Jun 2014 02:25:53 +0000 (12:25 +1000)]
Limit functionality of rhel_base nodes

They are not part of the CTDB cluster and do not have shared disks.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoRemove unused has_public_addresses_* functions
Martin Schwenke [Mon, 30 Jun 2014 00:14:36 +0000 (10:14 +1000)]
Remove unused has_public_addresses_* functions

They have been unused since public address generation was changed.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoRemove some unused SOFS_* variables
Martin Schwenke [Fri, 27 Jun 2014 01:56:15 +0000 (11:56 +1000)]
Remove some unused SOFS_* variables

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoUpdate README to reflect latest development and testing
Martin Schwenke [Fri, 27 Jun 2014 01:46:18 +0000 (11:46 +1000)]
Update README to reflect latest development and testing

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoReplace external waitfor script with a function
Martin Schwenke [Fri, 27 Jun 2014 01:45:49 +0000 (11:45 +1000)]
Replace external waitfor script with a function

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agokickstart - Replacing multipath.conf here is redundant
Martin Schwenke [Fri, 27 Jun 2014 01:16:24 +0000 (11:16 +1000)]
kickstart - Replacing multipath.conf here is redundant

It is done later when nodes are created.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agokickstart - sadc has no -d option so don't add it
Martin Schwenke [Fri, 27 Jun 2014 01:12:45 +0000 (11:12 +1000)]
kickstart - sadc has no -d option so don't add it

-S DISK is the default on at least RHEL 5 and 6, so that should
 collect the disk statistics we want.

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoAdd "autocluster cluster build" command shortcut
Martin Schwenke [Thu, 26 Jun 2014 01:05:36 +0000 (11:05 +1000)]
Add "autocluster cluster build" command shortcut

Signed-off-by: Martin Schwenke <martin@meltin.net>
9 years agoAdd gpfs.gskit package
Martin Schwenke [Thu, 26 Jun 2014 01:04:58 +0000 (11:04 +1000)]
Add gpfs.gskit package

Failure here doesn't matter, so add it unconditionally.

Signed-off-by: Martin Schwenke <martin@meltin.net>