tridge/autocluster.git
12 years agocluster_configure - template substitutions depending on auth_type
Martin Schwenke [Tue, 25 Oct 2011 05:10:24 +0000 (16:10 +1100)]
cluster_configure - template substitutions depending on auth_type

These are horrible but can probably be made a bit cleaner later on.

Signed-off-by: Martin Schwenke <martin@meltin.net>
12 years agogpfs-nas.conf - define auth_method
Martin Schwenke [Tue, 25 Oct 2011 05:09:15 +0000 (16:09 +1100)]
gpfs-nas.conf - define auth_method

Need to get rid of multiple template directories.  They are a
maintenance nightmare.

Signed-off-by: Martin Schwenke <martin@meltin.net>
12 years agocluster_configure - need to escape '|' in regular expression
Martin Schwenke [Tue, 25 Oct 2011 05:08:46 +0000 (16:08 +1100)]
cluster_configure - need to escape '|' in regular expression

Signed-off-by: Martin Schwenke <martin@meltin.net>
12 years agosetup_cluster.sh - fix a typo where "all" is missing in an onnode command
Martin Schwenke [Tue, 25 Oct 2011 03:01:15 +0000 (14:01 +1100)]
setup_cluster.sh - fix a typo where "all" is missing in an onnode command

Signed-off-by: Martin Schwenke <martin@meltin.net>
12 years agocluster_configure - fix FTP_EXPORTS setting
Martin Schwenke [Tue, 25 Oct 2011 03:00:51 +0000 (14:00 +1100)]
cluster_configure - fix FTP_EXPORTS setting

Signed-off-by: Martin Schwenke <martin@meltin.net>
12 years agocluster_configure - fix GPFS_SHARES setting
Martin Schwenke [Tue, 25 Oct 2011 03:00:23 +0000 (14:00 +1100)]
cluster_configure - fix GPFS_SHARES setting

Signed-off-by: Martin Schwenke <martin@meltin.net>
12 years agocluster_configure - also go GPFS share setup for winbind
Martin Schwenke [Tue, 25 Oct 2011 02:59:32 +0000 (13:59 +1100)]
cluster_configure - also go GPFS share setup for winbind

Signed-off-by: Martin Schwenke <martin@meltin.net>
12 years agogpfs-nas-postinstall.sh - add install of rssh
Martin Schwenke [Mon, 24 Oct 2011 05:54:21 +0000 (16:54 +1100)]
gpfs-nas-postinstall.sh - add install of rssh

Signed-off-by: Martin Schwenke <martin@meltin.net>
12 years agosetup_gpfs.sh - fix recovery lock setting for /etc/sysconfig/ctdb
Martin Schwenke [Mon, 24 Oct 2011 05:44:43 +0000 (16:44 +1100)]
setup_gpfs.sh - fix recovery lock setting for /etc/sysconfig/ctdb

Clearly nobody uses this, since it was broken in
94288bb324b1362a9994965e458addcd3b1e8f20 18 months ago.  :-(

Signed-off-by: Martin Schwenke <martin@meltin.net>
12 years agomknsd.sh - update to use shared_disk_ids file and to work with modern GPFS.
Martin Schwenke [Thu, 20 Oct 2011 05:49:44 +0000 (16:49 +1100)]
mknsd.sh - update to use shared_disk_ids file and to work with modern GPFS.

Old code is left for potential backward compatibility.

Signed-off-by: Martin Schwenke <martin@meltin.net>
12 years agoShared disks: put IDs into a file on each node.
Martin Schwenke [Thu, 20 Oct 2011 03:54:53 +0000 (14:54 +1100)]
Shared disks: put IDs into a file on each node.

Signed-off-by: Martin Schwenke <martin@meltin.net>
12 years agoRationalise list of packages in gpfs-nas-postinstall.sh.
Martin Schwenke [Thu, 20 Oct 2011 03:03:49 +0000 (14:03 +1100)]
Rationalise list of packages in gpfs-nas-postinstall.sh.

Some packages no longer exist in modern clustered Samba.

Signed-off-by: Martin Schwenke <martin@meltin.net>
12 years agoNew configuration variable SHARED_DISK_ID_GEN for configurable shared disk IDs
Martin Schwenke [Tue, 13 Sep 2011 01:08:26 +0000 (11:08 +1000)]
New configuration variable SHARED_DISK_ID_GEN for configurable shared disk IDs

The function or command specified should take 1 argument (disk
index/number) and print to stdout a unique identifier for that disk,
followed by a newline.  Sensible implementations will probably just
use echo.  :-)

The default implementation is via new function
shared_disk_id_default(), which ignores the disk number and generates
the ID using uuidgen, as per the previous hardcoded method.

scsi_id_autocluster.sh is modified to retrieve disk IDs up to 64 64
characters and is truncates at the first newline.  Therefore, in
general, the length of IDs is now governed by the generation function
rather than this script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
12 years agovircmd - add -w/--wait argument with optional timeout.
Martin Schwenke [Wed, 31 Aug 2011 03:32:19 +0000 (13:32 +1000)]
vircmd - add -w/--wait argument with optional timeout.

This is only defined for start and shutdown.  The latter is possibly
the most meaningful one...

Signed-off-by: Martin Schwenke <martin@meltin.net>
12 years agoAdd RHEL 5.7 ISO details.
Martin Schwenke [Tue, 23 Aug 2011 05:50:04 +0000 (15:50 +1000)]
Add RHEL 5.7 ISO details.

Signed-off-by: Martin Schwenke <martin@meltin.net>
12 years agoAdd RHEL 6.1 ISO details.
Martin Schwenke [Wed, 22 Jun 2011 07:03:53 +0000 (17:03 +1000)]
Add RHEL 6.1 ISO details.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoFix subsitute_vars() so it doesn't corrupt binary files.
Martin Schwenke [Fri, 27 May 2011 06:37:00 +0000 (16:37 +1000)]
Fix subsitute_vars() so it doesn't corrupt binary files.

Treating the file contents as a string in bash will almost always
corrupt binary files - at least any containing a NUL character.

This changes the code to use a temporary file rather than a string, so
none of this silliness occurs.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoMakefile generates ChangeLog for dist and spec file installs it as doc.
Martin Schwenke [Tue, 3 May 2011 11:21:11 +0000 (21:21 +1000)]
Makefile generates ChangeLog for dist and spec file installs it as doc.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoMove variables QEMU_NBD and NBD_DEVICE to loopback implementation.
Martin Schwenke [Tue, 3 May 2011 03:43:15 +0000 (13:43 +1000)]
Move variables QEMU_NBD and NBD_DEVICE to loopback implementation.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoAutomatically set default for SYSTEM_DISK_ACCESS_METHOD.
Martin Schwenke [Tue, 3 May 2011 03:18:55 +0000 (13:18 +1000)]
Automatically set default for SYSTEM_DISK_ACCESS_METHOD.

If using qcow2 system disks then prefer guestfish if it is installed,
or use loopback/NBD if requirement utilities are installed.

If not using qcow2 then default to loopback since this will be most
efficient.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoAdd sanity check to ensure guestfish is installed if it's use is selected.
Martin Schwenke [Tue, 3 May 2011 03:18:25 +0000 (13:18 +1000)]
Add sanity check to ensure guestfish is installed if it's use is selected.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoMove sanity check for qcow2 images requiring NBD out of main script.
Martin Schwenke [Tue, 3 May 2011 03:17:50 +0000 (13:17 +1000)]
Move sanity check for qcow2 images requiring NBD out of main script.

This is now a condition that only applies for if
$SYSTEM_DISK_ACCESS_METHOD is "loopback", so move the check to
05diskimage_guestfish.defconf, check the loopback condition and use
post_config_hooks to invoke the check.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoFix a problem with diskimage_* in the guestfish implementation.
Martin Schwenke [Mon, 2 May 2011 06:27:21 +0000 (16:27 +1000)]
Fix a problem with diskimage_* in the guestfish implementation.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoCall "diskimage f args ..." rather than "diskimage_f args ...".
Martin Schwenke [Mon, 2 May 2011 06:18:22 +0000 (16:18 +1000)]
Call "diskimage f args ..." rather than "diskimage_f args ...".

This means that no changes are needed in the main autocluster script
if new functions are added.

Unfortunately, this is an API change, so any add-ons to autocluster
that use the previous mechanism will need to be updated.  This is
pretty easy - just do this to your external file:

  1,$s/diskimage_/diskimage /g

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agocopy_base_dir_substitute_templates() should ignore .svn/ subdirectories.
Martin Schwenke [Thu, 28 Apr 2011 20:38:07 +0000 (06:38 +1000)]
copy_base_dir_substitute_templates() should ignore .svn/ subdirectories.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoAdd diskimage_mv().
Martin Schwenke [Tue, 8 Mar 2011 23:39:49 +0000 (10:39 +1100)]
Add diskimage_mv().

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoLog files being installed from base/ .
Martin Schwenke [Wed, 2 Mar 2011 23:27:41 +0000 (10:27 +1100)]
Log files being installed from base/ .

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoRename config.d/05_* without that underscore.
Martin Schwenke [Tue, 15 Feb 2011 04:17:52 +0000 (15:17 +1100)]
Rename config.d/05_* without that underscore.

For consistency with other files in config.d/.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoMerge branch 'guestfish'
Martin Schwenke [Tue, 15 Feb 2011 04:15:29 +0000 (15:15 +1100)]
Merge branch 'guestfish'

13 years agoUpdate README for guestfish support.
Martin Schwenke [Tue, 15 Feb 2011 04:15:03 +0000 (15:15 +1100)]
Update README for guestfish support.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoStop copy_base_dir_substitute_templates() chmod-ing existing directories.
Martin Schwenke [Mon, 14 Feb 2011 03:54:28 +0000 (14:54 +1100)]
Stop copy_base_dir_substitute_templates() chmod-ing existing directories.

This make break something out there but it is a sensible change.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoDon't use guestfish is-dir directly, use diskimage_is_directory() instead.
Martin Schwenke [Mon, 14 Feb 2011 03:52:17 +0000 (14:52 +1100)]
Don't use guestfish is-dir directly, use diskimage_is_directory() instead.

guestfish is-dir doesn't use exit values to indicate status, and we
already handle that in diskimage_is_directory().

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoTry to make diskimage_is_{file,directory}_guestfish work.
Martin Schwenke [Fri, 11 Feb 2011 05:31:58 +0000 (16:31 +1100)]
Try to make diskimage_is_{file,directory}_guestfish work.

The return code seems bogus in the RHEL6.0 version.  They seem to
print either "true" or "false".

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoUndo __ super-locationisation of variables in call_func().
Martin Schwenke [Fri, 11 Feb 2011 02:47:42 +0000 (13:47 +1100)]
Undo __ super-locationisation of variables in call_func().

There is code that references $type.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoImplement diskimage_is-file() for loopback and guestfish.
Martin Schwenke [Fri, 11 Feb 2011 02:27:41 +0000 (13:27 +1100)]
Implement diskimage_is-file() for loopback and guestfish.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoImplement diskimage_grep() for loopback and guestfish.
Martin Schwenke [Fri, 11 Feb 2011 02:18:51 +0000 (13:18 +1100)]
Implement diskimage_grep() for loopback and guestfish.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoProduce more useful error message when create base times out.
Martin Schwenke [Fri, 11 Feb 2011 01:26:56 +0000 (12:26 +1100)]
Produce more useful error message when create base times out.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoWork around guestfish upload not working with stdin.
Martin Schwenke [Thu, 10 Feb 2011 01:10:09 +0000 (12:10 +1100)]
Work around guestfish upload not working with stdin.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoWork around guestfish mkdir-p working badly with pre-existing symlinks.
Martin Schwenke [Thu, 10 Feb 2011 01:09:20 +0000 (12:09 +1100)]
Work around guestfish mkdir-p working badly with pre-existing symlinks.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoAdd guestfish method for accessing disk image.
Martin Schwenke [Wed, 9 Feb 2011 04:07:37 +0000 (15:07 +1100)]
Add guestfish method for accessing disk image.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoAbstract out qemu-nbd/NBD/loopback mount of disk image.
Martin Schwenke [Wed, 9 Feb 2011 04:04:21 +0000 (15:04 +1100)]
Abstract out qemu-nbd/NBD/loopback mount of disk image.

In preparation for adding an alternate method.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoExplicitly set disk image type to $BASE_FORMAT in install.xml.
Martin Schwenke [Thu, 10 Feb 2011 01:26:30 +0000 (12:26 +1100)]
Explicitly set disk image type to $BASE_FORMAT in install.xml.

If you don't specify a type then RHEL6's KVM default it to 'raw'.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoExplicitly set disk image type to $SYSTEM_DISK_FORMAT in node.xml.
Martin Schwenke [Thu, 10 Feb 2011 01:12:17 +0000 (12:12 +1100)]
Explicitly set disk image type to $SYSTEM_DISK_FORMAT in node.xml.

If you don't specify a type then RHEL6's KVM default it to 'raw'.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoAdd initial "no desktop" package listing for RHEL6.
Martin Schwenke [Tue, 8 Feb 2011 04:30:44 +0000 (15:30 +1100)]
Add initial "no desktop" package listing for RHEL6.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoSYSTEM_DISK_PREFIX is now set from SYSTEM_DISK_TYPE and RHEL_VERSION.
Martin Schwenke [Tue, 8 Feb 2011 03:14:36 +0000 (14:14 +1100)]
SYSTEM_DISK_PREFIX is now set from SYSTEM_DISK_TYPE and RHEL_VERSION.

RHEL6 guests need "sd" for "ide" disks, so automating this seems
sensible.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoSupport new SYSTEM_DISK_FORMAT=reflink.
Martin Schwenke [Tue, 25 Jan 2011 02:19:07 +0000 (13:19 +1100)]
Support new SYSTEM_DISK_FORMAT=reflink.

This is like raw but it copied using --reflink=always.  This probably
requires disk images to be on btrfs, so this is experimental.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoMake waitfor set LANG=C before running expect.
Martin Schwenke [Tue, 25 Jan 2011 01:36:46 +0000 (12:36 +1100)]
Make waitfor set LANG=C before running expect.

For some reason when creating a base image on RHEL6.0, expect exits
before it finds the designated pattern.  Using strace or expect -d
makes things mysteriously work, so debugging is very difficult.

On a whim, I wondered if expect is getting confused about multibyte
characters, so tried setting LANG=C.  This either fixes or works
around the problem.  It will do for now...

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoMake setting of MEM happen in post_config_hooks() by default.
Martin Schwenke [Tue, 18 Jan 2011 02:43:11 +0000 (13:43 +1100)]
Make setting of MEM happen in post_config_hooks() by default.

The previous default of 262144KB is not enough for RHEL6.  We use the
old default for RHEL5 and set an intial default of 512000KB for RHEL6.

A smaller limit may be possible for RHEL6... but this works.  :-)

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years ago$ISO and $SYSTEM_DISK_MOUNTS now automatically set via post_config_hooks.
Martin Schwenke [Tue, 18 Jan 2011 01:54:06 +0000 (12:54 +1100)]
$ISO and $SYSTEM_DISK_MOUNTS now automatically set via post_config_hooks.

New function system_disk_mounts() returns a default value for
SYSTEM_DISK_MOUNTS that depend on $RHEL_VERSION.

New function rhel_post_config_hook() resets SYSTEM_DISK_MOUNTS and ISO
if they are equal to the magic value "@uto".  This is now the default
value for both of these variables.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoNew hook post_config_hooks.
Martin Schwenke [Tue, 18 Jan 2011 01:46:32 +0000 (12:46 +1100)]
New hook post_config_hooks.

This is run after all configuration has been processed.  That is,
after command-line options processing.

It is also run before other exits where you can reasonably expect
configuration to be complete (--dump, -e <expr>).

It is not run before -E.  If you want to run in combination with -E
then add "run_hooks post_config_hooks" to the expression (or to a
previous -E option).  However, bear in mind that this may preempt any
magic the hooks might otherwise do after subsequent configuration
option processing.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoChange handling of packages in kickstart with new variable RHEL_PACKAGES.
Martin Schwenke [Tue, 18 Jan 2011 00:00:10 +0000 (11:00 +1100)]
Change handling of packages in kickstart with new variable RHEL_PACKAGES.

$RHEL_PACKAGES points to a file containing the standard package list,
which is inserted into the kickstart packages section along with
$_EXTRA_RHEL_PACKAGES and $EXTRA_PACKAGES.  The old packages list is
in RHEL5.packages, with an initial list of RHEL6 in RHEL6.packages.
The RHEL5 list has been slightly updated in the area of compat
packages.  The default value of $RHEL_PACKAGES invokes new function
rhel_package_list(), which prints the contents of the packages file
corresponding to the current $RHEL_VERSION.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoAdd RHEL6-compatible option to default value of KS_DONE_MESSAGE.
Martin Schwenke [Mon, 17 Jan 2011 01:11:31 +0000 (12:11 +1100)]
Add RHEL6-compatible option to default value of KS_DONE_MESSAGE.

RHEL6 does not say "you may safely reboot your system" so we match
"System halted." to know when to halt the kickstart guest.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoRemove persisent NIC naming in basic-postinstall.sh.
Martin Schwenke [Mon, 17 Jan 2011 01:07:49 +0000 (12:07 +1100)]
Remove persisent NIC naming in basic-postinstall.sh.

Different MAC addresses are used in guests for base creation than for
actual clusters.  We don't want the cluster nodes to remember any
NIC/MAC associations from the kickstart run.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoAdd RHEL5.6 ISO details.
Martin Schwenke [Sun, 16 Jan 2011 23:53:51 +0000 (10:53 +1100)]
Add RHEL5.6 ISO details.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoSupport for RHEL_VERSION=6.0 in rhel_print_iso.
Martin Schwenke [Thu, 13 Jan 2011 03:42:17 +0000 (14:42 +1100)]
Support for RHEL_VERSION=6.0 in rhel_print_iso.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoOptimise newline subsitution during template expansion.
Martin Schwenke [Tue, 11 Jan 2011 03:25:22 +0000 (14:25 +1100)]
Optimise newline subsitution during template expansion.

The current code uses a bash variable pattern substitution.  This can
be horrendously slow on a large value.  On my laptop it takes bash
about 0.7s to do a single replacement of the 1st newline in a ~50KB
value.  Doing a template substitution during the generation of XML for
100 shared disks causes the creation of a 1000 line value that is
about 35KB...  so handling 100 shared disks can be very slow!  :-(

This changes newlines to character 0x01 using tr and then uses sed to
replace these by "\\n".

There are other subsitutions nearby in the code but they don't tend to
cause this type of problem because they escape characters that tend to
be used less frequently.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoAllow a lot more shared disks (about 700).
Martin Schwenke [Mon, 10 Jan 2011 23:55:58 +0000 (10:55 +1100)]
Allow a lot more shared disks (about 700).

This is now a trivial change due to the use of arrays.

Based on a patch from Eugen Anghel <eugen.anghel@ro.ibm.com>.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoChange shared disk device name code to use a bash array.
Martin Schwenke [Mon, 10 Jan 2011 23:49:39 +0000 (10:49 +1100)]
Change shared disk device name code to use a bash array.

Based on a patch for more shared disks from Eugen Anghel
<eugen.anghel@ro.ibm.com>.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoRevert "Allow a lot more shared disks (about 700)."
Martin Schwenke [Mon, 10 Jan 2011 23:44:07 +0000 (10:44 +1100)]
Revert "Allow a lot more shared disks (about 700)."

This can be done much better using arrays.

This reverts commit 5a5494821b51abfe2d6bf6f6dc9d960b8c3f0cde.

13 years agoAllow a lot more shared disks (about 700).
Martin Schwenke [Wed, 5 Jan 2011 00:01:49 +0000 (11:01 +1100)]
Allow a lot more shared disks (about 700).

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoAdded TODO file for cluster_configure.
Martin Schwenke [Mon, 6 Dec 2010 04:10:25 +0000 (15:10 +1100)]
Added TODO file for cluster_configure.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoConfiguration file and wrapper script for simple GPFS-based NAS stack.
Martin Schwenke [Mon, 6 Dec 2010 03:44:38 +0000 (14:44 +1100)]
Configuration file and wrapper script for simple GPFS-based NAS stack.

Master configuration file for cluster_configure and a wrapper script
to hold it all together.  The script may eventually become part of
cluster_configure.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agokickstart and post-install templated for simplified GPFS-based NAS cluster.
Martin Schwenke [Mon, 6 Dec 2010 03:43:32 +0000 (14:43 +1100)]
kickstart and post-install templated for simplified GPFS-based NAS cluster.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoInitial version of cluster_configure.
Martin Schwenke [Mon, 6 Dec 2010 03:41:51 +0000 (14:41 +1100)]
Initial version of cluster_configure.

See base/all/root/scripts/cluster_configure/README.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoChange the SCSI ID prefix in shared disk images from "SOFS" to "AUTO".
Martin Schwenke [Thu, 2 Dec 2010 06:19:02 +0000 (17:19 +1100)]
Change the SCSI ID prefix in shared disk images from "SOFS" to "AUTO".

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agomknsd.sh creates its own list of disks to use as NSDs.
Martin Schwenke [Thu, 2 Dec 2010 02:17:31 +0000 (13:17 +1100)]
mknsd.sh creates its own list of disks to use as NSDs.

This currently uses /var/mmfs/etc/nsddevices to list the disks but
this script isn't generally available.

Instead we implement some custom logic that asks multipath about
available devices and then filters on those created by KVM or via
autocluster's iSCSI code.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agosetup_gpfs.sh no longer uses cnpushfile.
Martin Schwenke [Mon, 29 Nov 2010 05:27:41 +0000 (16:27 +1100)]
setup_gpfs.sh no longer uses cnpushfile.

Use a more generic combination of onnode and rsync.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoNew configuration variable GPFS_DEFAULT_MOUNTPOINT, used by setup_gpfs.sh.
Martin Schwenke [Mon, 29 Nov 2010 05:26:14 +0000 (16:26 +1100)]
New configuration variable GPFS_DEFAULT_MOUNTPOINT, used by setup_gpfs.sh.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoMove GPFS config variables from 50sofs.defconf to new file 40gpfs.defconf.
Martin Schwenke [Mon, 29 Nov 2010 05:24:56 +0000 (16:24 +1100)]
Move GPFS config variables from 50sofs.defconf to new file 40gpfs.defconf.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoMove public IP config variables from 50sofs.defconf to 00base.defconf.
Martin Schwenke [Mon, 29 Nov 2010 05:21:54 +0000 (16:21 +1100)]
Move public IP config variables from 50sofs.defconf to 00base.defconf.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoMake 3rd octet of IP addresses configurable.
Martin Schwenke [Thu, 23 Sep 2010 03:14:37 +0000 (13:14 +1000)]
Make 3rd octet of IP addresses configurable.

This introduces new variables IPNET0, IPNET1, IPNET2.  These default
to 0, 1, 2 respectively.  That is, this change is backward compatible.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoNTP server should be GATEWAY, not a hand constructed IP address.
Martin Schwenke [Thu, 23 Sep 2010 03:14:05 +0000 (13:14 +1000)]
NTP server should be GATEWAY, not a hand constructed IP address.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoNew -E options needs "shift 2" - oops!
Martin Schwenke [Wed, 25 Aug 2010 01:56:19 +0000 (11:56 +1000)]
New -E options needs "shift 2" - oops!

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoAdd new -E option like -e but doesn't exit.
Martin Schwenke [Wed, 25 Aug 2010 01:46:01 +0000 (11:46 +1000)]
Add new -E option like -e but doesn't exit.

In complex configurations it can be useful to add a function in a
configuration file and run it on the command-line.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoFix 2 bugs in iscsimultipath initscript.
Martin Schwenke [Thu, 12 Aug 2010 06:14:51 +0000 (16:14 +1000)]
Fix 2 bugs in iscsimultipath initscript.

* Incorrect reference to $c instead of $_c caused loop to never
  terminate.

* Need to flush multipath devices before trying again.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoFix think in iscsimultipath initscript.
Martin Schwenke [Tue, 10 Aug 2010 05:22:07 +0000 (15:22 +1000)]
Fix think in iscsimultipath initscript.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoSupport HOSTS_STATIC_ENTRIES on the rhel_base nodes too.
Martin Schwenke [Fri, 6 Aug 2010 03:46:39 +0000 (13:46 +1000)]
Support HOSTS_STATIC_ENTRIES on the rhel_base nodes too.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoNew configuration variable HOSTS_STATIC_ENTRIES.
Martin Schwenke [Fri, 6 Aug 2010 03:26:54 +0000 (13:26 +1000)]
New configuration variable HOSTS_STATIC_ENTRIES.

This points to a file containing static entries that should be
inserted into /etc/hosts on each node.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoRework the code that finds the list of variables in a template.
Martin Schwenke [Tue, 29 Jun 2010 02:33:26 +0000 (12:33 +1000)]
Rework the code that finds the list of variables in a template.

This version seems cleaner and clearer than the previous version, so
is more likely to be correct.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoFix the template substitution in certain corner cases.
Martin Schwenke [Mon, 28 Jun 2010 10:29:36 +0000 (20:29 +1000)]
Fix the template substitution in certain corner cases.

When template variables are surround by valid variable characters the
substitutions can fail.  This makes it more robust.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoFix hardcoded 10.0.0.1 in one of the iSCSI templates.
Martin Schwenke [Tue, 22 Jun 2010 07:29:37 +0000 (17:29 +1000)]
Fix hardcoded 10.0.0.1 in one of the iSCSI templates.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoNew function shared_disk_iscsi_setup_base_get_ip() prints IP for iSCSI client.
Martin Schwenke [Tue, 22 Jun 2010 04:17:54 +0000 (14:17 +1000)]
New function shared_disk_iscsi_setup_base_get_ip() prints IP for iSCSI client.

This make the generation of IP addresses for iSCSI client
configurable.  If, for example, you're using an IP addressing scheme
that is out of autocluster's control, you can override this function
to try and provide an alternate solution.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoRegister shared_disk_iscsi_setup_base in shared_disk_setup.
Martin Schwenke [Tue, 22 Jun 2010 01:56:01 +0000 (11:56 +1000)]
Register shared_disk_iscsi_setup_base in shared_disk_setup.

Only register this is in setup_base_hooks if iSCSI shared disks are
being used.  It was registered globally.  This may, this hook is
registered even if you run clear_hooks on setup_base_hooks.

This obeys the "principal of least surprise" in the case where iSCSI
should work if you select iSCSI.  However, it might surprise people to
find a hook registered when they've clear the hook variable.  Can't
win 'em all.  If necessary, shared_disk_iscsi_setup_base() can be
overridden.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoMove the "cluster created" message back into create_cluster().
Martin Schwenke [Fri, 18 Jun 2010 06:57:14 +0000 (16:57 +1000)]
Move the "cluster created" message back into create_cluster().

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoPut /etc/hosts editing suggestion into cluster_created_hooks.
Martin Schwenke [Fri, 18 Jun 2010 06:18:02 +0000 (16:18 +1000)]
Put /etc/hosts editing suggestion into cluster_created_hooks.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoIn setup_gpfs.sh, getopt complains if it doesn't have a -o option.
Martin Schwenke [Fri, 18 Jun 2010 06:02:30 +0000 (16:02 +1000)]
In setup_gpfs.sh, getopt complains if it doesn't have a -o option.

Signed-off-by: Martin Schwenke <martin@meltin.net>
13 years agoKickstart: don't install xulrunner-devel - nothing needs it.
Martin Schwenke [Fri, 18 Jun 2010 05:33:09 +0000 (15:33 +1000)]
Kickstart: don't install xulrunner-devel - nothing needs it.

Signed-off-by: Martin Schwenke <martin@meltin.net>
14 years agogrep sanity check in waitfor should now use extended regexps.
Martin Schwenke [Mon, 31 May 2010 00:12:50 +0000 (10:12 +1000)]
grep sanity check in waitfor should now use extended regexps.

i.e. Pass "-E" to grep.

Signed-off-by: Martin Schwenke <martin@meltin.net>
14 years agoMake waitfor look for a regular expression rather than just a string.
Martin Schwenke [Fri, 28 May 2010 10:31:02 +0000 (20:31 +1000)]
Make waitfor look for a regular expression rather than just a string.

Signed-off-by: Martin Schwenke <martin@meltin.net>
14 years agoAdd $node_type to the UUID map.
Martin Schwenke [Fri, 28 May 2010 01:36:08 +0000 (11:36 +1000)]
Add $node_type to the UUID map.

Signed-off-by: Martin Schwenke <martin@meltin.net>
14 years agoModify create_node_COMMON() to pull the UUID for this node out of the map.
Martin Schwenke [Fri, 28 May 2010 01:06:52 +0000 (11:06 +1000)]
Modify create_node_COMMON() to pull the UUID for this node out of the map.

Signed-off-by: Martin Schwenke <martin@meltin.net>
14 years agoBuild a UUID map file in common_nodelist_hacking.
Martin Schwenke [Fri, 28 May 2010 00:30:31 +0000 (10:30 +1000)]
Build a UUID map file in common_nodelist_hacking.

This maps between $ip_offset and UUID.  This isn't used anywhere
yet... however, there will be some autocluster applications where a
node will need to know the UUIDs of other nodes.

Note: after testing that the UUID map looks right, we'll actually use
it in create_node_COMMON().

Signed-off-by: Martin Schwenke <martin@meltin.net>
14 years agoFix a typo causing as syntax error.
Martin Schwenke [Mon, 24 May 2010 04:37:30 +0000 (14:37 +1000)]
Fix a typo causing as syntax error.

Also clean up some of the progress messages.

Signed-off-by: Martin Schwenke <martin@meltin.net>
14 years agoSupport SYSTEM_DISK_MOUNTS in unmount_disk().
Martin Schwenke [Mon, 24 May 2010 04:18:17 +0000 (14:18 +1000)]
Support SYSTEM_DISK_MOUNTS in unmount_disk().

Signed-off-by: Martin Schwenke <martin@meltin.net>
14 years agoNew configuration variable SYSTEM_DISK_MOUNTS.
Martin Schwenke [Mon, 24 May 2010 04:07:39 +0000 (14:07 +1000)]
New configuration variable SYSTEM_DISK_MOUNTS.

Allows multiple filesystems to be mounted by mount_disk() at cluster
creation time.  This is useful if, for example, the base image has
been created with separate partitions for / and /var, and you need to
copy configuration to both filesystems.

Signed-off-by: Martin Schwenke <martin@meltin.net>
14 years agoFix typo "derconf".
Martin Schwenke [Fri, 21 May 2010 06:22:59 +0000 (16:22 +1000)]
Fix typo "derconf".

Signed-off-by: Martin Schwenke <martin@meltin.net>
14 years agoNew configuration variables BASE_PER_NODE_TYPE.
Martin Schwenke [Fri, 21 May 2010 06:21:14 +0000 (16:21 +1000)]
New configuration variables BASE_PER_NODE_TYPE.

If set to "yes", this adds the node type to the base image filename
when creating each node.  This means you can have different base
images for each node type.

Signed-off-by: Martin Schwenke <martin@meltin.net>
14 years agoAdd a comment to explain the previous commit.
Martin Schwenke [Fri, 21 May 2010 05:44:17 +0000 (15:44 +1000)]
Add a comment to explain the previous commit.

Otherwise someone will wonder why...

Signed-off-by: Martin Schwenke <martin@meltin.net>
14 years agoFold setup_network() into setup_base().
Martin Schwenke [Fri, 21 May 2010 05:38:25 +0000 (15:38 +1000)]
Fold setup_network() into setup_base().

Actually add it to setup_base_hooks but ensure that if $hosts_file is
unset then the function returns without doing anything.

Signed-off-by: Martin Schwenke <martin@meltin.net>
14 years agoNew config variable KS_DONE_MESSAGE, used to find end of kickstart install.
Martin Schwenke [Fri, 21 May 2010 01:53:54 +0000 (11:53 +1000)]
New config variable KS_DONE_MESSAGE, used to find end of kickstart install.

Currently we look for a fixed string to indicate that a kickstart
install is complete.  This changes that string to be parametrised, in
case we're using a non-standard installer.

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