summaryrefslogtreecommitdiffstats
path: root/autocluster
Commit message (Collapse)AuthorAgeFilesLines
* Create IPv4 and IPv6 nodes filesAmitay Isaacs2014-11-251-1/+22
| | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com>
* Add IPv6 supportAmitay Isaacs2014-11-251-5/+9
| | | | | | New configuration variable NETWORK_STACK. Signed-off-by: Amitay Isaacs <amitay@gmail.com>
* Remove netmask from network_mapMartin Schwenke2014-11-251-9/+11
| | | | | | | 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>
* New function ipv4_prefix_to_netmask()Martin Schwenke2014-11-241-0/+25
| | | | | | Allows calculation of netmask from prefix. Signed-off-by: Martin Schwenke <martin@meltin.net>
* base_create: Set IPNUM=$FIRSTIPMartin Schwenke2014-11-241-1/+2
| | | | | | This allows removal of a kludge in guess_install_network(). Signed-off-by: Martin Schwenke <martin@meltin.net>
* Undefine nodes in old cluster when building a new oneMartin Schwenke2014-08-121-3/+13
| | | | | | | | 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>
* Make cluster_setup.sh use generated configuration fileMartin Schwenke2014-08-121-0/+28
| | | | | | | | | | | | 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>
* node_name_format_* functions should produce the node nameMartin Schwenke2014-07-281-12/+4
| | | | | | | | | 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>
* Fix broken hosts file updatingMartin Schwenke2014-07-241-1/+18
| | | | | | | 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>
* When exiting due to unknown node type, list valid node typesMartin Schwenke2014-07-031-2/+6
| | | | Signed-off-by: Martin Schwenke <martin@meltin.net>
* Use a single entry-point script for post-boot setupMartin Schwenke2014-07-021-1/+1
| | | | Signed-off-by: Martin Schwenke <martin@meltin.net>
* Rename common_nodelist_hacking() to cluster_nodelist_hacking()Martin Schwenke2014-07-021-5/+2
| | | | | | ... and just call it once before doing any cluster operations. Signed-off-by: Martin Schwenke <martin@meltin.net>
* Add create_node_DEFAULT, no more hack_nodes_functionsMartin Schwenke2014-07-021-10/+38
| | | | | | | | | | | | | | | 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>
* Remove NUMNODES and WITH_TSM_NODE configuration variablesMartin Schwenke2014-07-021-32/+0
| | | | | | The backward compatibility hacking is horrible! Signed-off-by: Martin Schwenke <martin@meltin.net>
* Rework cluster_setup() to use node types instead of $CLUSTER_TYPEMartin Schwenke2014-07-021-30/+51
| | | | | | | | | | | | | | | | * 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>
* Rename cluster "configure" action to "setup"Martin Schwenke2014-07-021-22/+30
| | | | | | Rewrite cluster_setup() to factor out the common SSH bits. Signed-off-by: Martin Schwenke <martin@meltin.net>
* Replace external waitfor script with a functionMartin Schwenke2014-07-021-0/+25
| | | | Signed-off-by: Martin Schwenke <martin@meltin.net>
* Add "autocluster cluster build" command shortcutMartin Schwenke2014-07-021-1/+6
| | | | Signed-off-by: Martin Schwenke <martin@meltin.net>
* Cleanup post-boot cluster configurationMartin Schwenke2014-07-021-12/+5
| | | | | | | | | | | | | | | | * Single entry point is now setup_cluster.sh. * Rename old setup_cluster.sh to setup_cluster_nas.sh. * Split setup_ad_server.sh into install_ad_server.sh and setup_cluster_ad_server.sh. * Split setup_build.sh into install_build.sh and setup_cluster_build.sh. * Rename setup_gpfs.sh to setup_clusterfs_gpfs.sh. Signed-off-by: Martin Schwenke <martin@meltin.net>
* Rework package installation during post-boot configurationMartin Schwenke2014-07-021-1/+1
| | | | | | | | | | | | | | | | | | * New script install_packages.sh is the single entry-point for installing packages outside kickstart. * New configuration variable CONFIG_EXTRA_PACKAGES has space-separated list of extra packages to install. This can help if dependencies are broken. * Rename install_gpfs_nas.sh to just install_nas.sh, now just installs packages (e.g. samba, ctdb, rssh) to support protocols. * Rename install_gpfs.sh to install_clusterfs_gpfs.sh to provide a hook to support installation of alternate cluster filesystem packages. Signed-off-by: Martin Schwenke <martin@meltin.net>
* Add "cluster configure" commandMartin Schwenke2014-07-021-2/+43
| | | | Signed-off-by: Martin Schwenke <martin@meltin.net>
* Add new commands cluster [ destroy | update_hosts | boot ]Martin Schwenke2014-07-021-2/+64
| | | | Signed-off-by: Martin Schwenke <martin@meltin.net>
* Add new function announce() to print a header for an actionMartin Schwenke2014-07-021-0/+9
| | | | Signed-off-by: Martin Schwenke <martin@meltin.net>
* Rename some of the internal functions to NOUN_VERBMartin Schwenke2014-06-251-6/+6
| | | | Signed-off-by: Martin Schwenke <martin@meltin.net>
* Allow command line with noun first and (potentially) multiple verbsMartin Schwenke2014-06-251-0/+46
| | | | Signed-off-by: Martin Schwenke <martin@meltin.net>
* Make cluster name optional for "create cluster"Martin Schwenke2014-06-251-4/+18
| | | | | | | | It can either be specified in the configuration file via the CLUSTER variable. If it isn't set there then if the configuration file name is of the form "foo.autocluster" then the cluster name is "foo". Signed-off-by: Martin Schwenke <martin@meltin.net>
* Remove remainder of unused --with-release codeMartin Schwenke2014-06-251-9/+1
| | | | Signed-off-by: Martin Schwenke <martin@meltin.net>
* Generalise variables used in main case statementMartin Schwenke2014-06-251-4/+4
| | | | | | | About to introduce "noun verb ..." and want to avoid $command being a noun. :-) Signed-off-by: Martin Schwenke <martin@meltin.net>
* Remove testproxy optionMartin Schwenke2014-06-251-6/+0
| | | | | | Use "autocluster -e test_proxy" instead. Signed-off-by: Martin Schwenke <martin@meltin.net>
* Suggest selinux magic as well as chattr after create baseMartin Schwenke2014-06-251-0/+1
| | | | Signed-off-by: Martin Schwenke <martin@meltin.net>
* Rename configuration variable GATEWAY to KVMHOSTMartin Schwenke2014-06-251-0/+23
| | | | | | | | | | | | | A previous commit meant that the value of GATEWAY is no longer used as the gateway for the default network route, so renaming the variable adds clarity. This means that GATEWAY is no longer available to kickstart via the basic post-install script. So generate some new variables INSTALL_GW and INSTALL_IP in create_base() and tweak the post-install logic to use them. Signed-off-by: Martin Schwenke <martin@meltin.net>
* Define gateway for default route in $NETWORKSMartin Schwenke2014-06-251-0/+11
| | | | | | | | | | | | | | It now goes into one of the ifcfg-eth* files instead of /etc/sysconfig/network. NetworkManager in RHEL 7.0 seems to have a horrible bug. If GATEWAY is defined in /etc/sysconfig/network and if it brings up the "wrong" interface first then it adds a host route to the gateway on the "wrong" network. This means that outbound traffic is OK. However, for incoming traffic, ARP responses go out the "wrong" interface and are either filtered on the node or are ignored by the host machine. Signed-off-by: Martin Schwenke <martin@meltin.net>
* grub: Don't use Red Hat graphical bootMartin Schwenke2014-06-251-1/+1
| | | | | | On RHEL7 most useful boot-time logging disappears. Signed-off-by: Martin Schwenke <martin@meltin.net>
* Remove console=tty1 from node kernel command-lineMartin Schwenke2014-06-251-0/+1
| | | | Signed-off-by: Martin Schwenke <martin@meltin.net>
* Handle grub2 configuration hacking in RHEL 7+Martin Schwenke2014-06-251-4/+11
| | | | Signed-off-by: Martin Schwenke <martin@meltin.net>
* Generate 70-persistent-net.rules when configuring node networkMartin Schwenke2014-06-251-3/+10
| | | | | | | | | Force this to avoid any potential generation of "well known" names. Simplify the ifcfg-* generation code here, since template subsitution is not necessary. Signed-off-by: Martin Schwenke <martin@meltin.net>
* Remove INSTALLKEY configuration variableMartin Schwenke2014-06-251-15/+0
| | | | | | | | RHEL 7.0 kickstart fails on "key" directive so remove this "feature". We haven't actually used it for a long time. If needed then do it post-kickstart. Signed-off-by: Martin Schwenke <martin@meltin.net>
* RHEL 7 needs different boot options to support kickstartMartin Schwenke2014-06-251-1/+1
| | | | | | | | | | | | | | It no longer supports ks=floppy and needs inst.stage2 to point to the DVD image. Label the "floppy" as "KICKSTART" regardless of the version - this does no harm. If running RHEL >= 7 then set up the kickstart "floppy" as a hard disk in libvirt and have the kernel command-line point to the label. Also set inst.stage2 so it can find root device to install from. Signed-off-by: Martin Schwenke <martin@meltin.net>
* Add a hook to allow the network name to be hackedMartin Schwenke2013-07-161-0/+8
| | | | Signed-off-by: Martin Schwenke <martin@meltin.net>
* Allow --dump and -e options to ignore errorsMartin Schwenke2013-03-121-4/+8
| | | | Signed-off-by: Martin Schwenke <martin@meltin.net>
* Fix NETWORKS configuration to support non-standard interface namesMartin Schwenke2013-03-121-11/+48
| | | | Signed-off-by: Martin Schwenke <martin@meltin.net>
* New configuration variable NETWORKS - IPBASE, IPNET* no longer usedMartin Schwenke2013-03-051-46/+19
| | | | | | | | | Much more flexible network configuration. Replace canned host_setup/etc/libvirt/qemu/networks/*.xml with setup_networks.sh script. Signed-off-by: Martin Schwenke <martin@meltin.net>
* New hook hack_disk_hooks to customise the value of $DISKautocluster-0.7Martin Schwenke2013-02-191-9/+31
| | | | | | Works for base, system and shared disks. Signed-off-by: Martin Schwenke <martin@meltin.net>
* Allow hooks to take arguments that are specified when they are runMartin Schwenke2013-02-191-1/+2
| | | | Signed-off-by: Martin Schwenke <martin@meltin.net>
* Backward incompatible: rename/extend rm_f diskimage function to be rm_rfMartin Schwenke2012-08-151-1/+1
| | | | | | | Something is needed to remove directories, so let's do it this way. Autocluster only used rm_f in one place, so it is easy. Signed-off-by: Martin Schwenke <martin@meltin.net>
* Remove --with_release and with_release()Martin Schwenke2012-05-221-35/+0
| | | | | | This is no longer of any value. Signed-off-by: Martin Schwenke <martin@meltin.net>
* Update public address generation function make_public_addresses()Martin Schwenke2012-05-091-43/+2
| | | | | | | | | * Don't generate public address config for eth0. * Change notation used for arithmetic expansion - $[ ... ] form is deprecated. * Delete make_public_addresses_old(). Signed-off-by: Martin Schwenke <martin@meltin.net>
* New option DISK_FOLLOW_SYMLINKSMartin Schwenke2012-05-071-6/+15
| | | | | | | | | | | | If DISK_FOLLOW_SYMLINKS=yes then for any disk image paths that are a symlink, follow the symlink when creating the image. This allows disk images to be reorganised, perhaps across several disks, and replaced with symlinks. On the next cluster creation the symlinks will be respected and the layout of disk images will be maintained. Signed-off-by: Martin Schwenke <martin@meltin.net>
* Merge remote-tracking branch 'amitay/master'Martin Schwenke2012-03-281-1/+16
|\
| * Change public addresses output format from make_public_addresses()Amitay Isaacs2012-03-051-1/+16
| | | | | | | | | | | | @@@PUBLIC_ADDRESSES@@@ will be replaced with firstip,num_ips,iface firstip,num_ips,iface ...