diff options
author | root | 2006-04-24 09:03:08 -0500 |
---|---|---|
committer | root | 2006-04-24 09:03:08 -0500 |
commit | 84d8b510ac289af0a43bfa9e110844af27a90196 (patch) | |
tree | d7093929b954dd2f71114bff270755e18f737eb1 /cluster/openmosix-tools |
initial commit from stable 0.3
Diffstat (limited to 'cluster/openmosix-tools')
-rwxr-xr-x | cluster/openmosix-tools/BUILD | 8 | ||||
-rwxr-xr-x | cluster/openmosix-tools/CONFIGURE | 9 | ||||
-rwxr-xr-x | cluster/openmosix-tools/DEPENDS | 1 | ||||
-rwxr-xr-x | cluster/openmosix-tools/DETAILS | 22 | ||||
-rw-r--r-- | cluster/openmosix-tools/HISTORY | 50 | ||||
-rwxr-xr-x | cluster/openmosix-tools/INSTALL | 13 | ||||
-rwxr-xr-x | cluster/openmosix-tools/init.d/openmosix | 194 | ||||
-rwxr-xr-x | cluster/openmosix-tools/openmosix.map | 13 |
8 files changed, 310 insertions, 0 deletions
diff --git a/cluster/openmosix-tools/BUILD b/cluster/openmosix-tools/BUILD new file mode 100755 index 0000000000..6db6ff8bb8 --- /dev/null +++ b/cluster/openmosix-tools/BUILD @@ -0,0 +1,8 @@ +./configure --build=$BUILD \ + --prefix=${INSTALL_ROOT}/usr \ + --sysconfdir=${INSTALL_ROOT}/etc \ + --localstatedir=${INSTALL_ROOT}/var \ + --with-kerneldir=/lib/modules/$(uname -r)/build/ \ + $OPTS && +make_single && +make diff --git a/cluster/openmosix-tools/CONFIGURE b/cluster/openmosix-tools/CONFIGURE new file mode 100755 index 0000000000..653f7bbbf7 --- /dev/null +++ b/cluster/openmosix-tools/CONFIGURE @@ -0,0 +1,9 @@ +if ! grep -q "NODES=" $SPELL_CONFIG; then + + message "\nAll nodes MUST be valid addresses and if not numeric, then MUST be in /etc/hosts \n\t +${QUERY_COLOR}Please enter a space-seperated list of participating nodes${DEFAULT_COLOR}" + read -t ${PROMPT_DELAY} -e + NODES=${REPLY:="127.0.0.1"} + echo "NODES='$NODES'" >> $SPELL_CONFIG + +fi diff --git a/cluster/openmosix-tools/DEPENDS b/cluster/openmosix-tools/DEPENDS new file mode 100755 index 0000000000..2768d62eaa --- /dev/null +++ b/cluster/openmosix-tools/DEPENDS @@ -0,0 +1 @@ +depends psmisc diff --git a/cluster/openmosix-tools/DETAILS b/cluster/openmosix-tools/DETAILS new file mode 100755 index 0000000000..24128d9d37 --- /dev/null +++ b/cluster/openmosix-tools/DETAILS @@ -0,0 +1,22 @@ + SPELL=openmosix-tools + VERSION=0.3.5 + SOURCE=${SPELL}-${VERSION}.tar.bz2 +SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION + SOURCE_URL[0]=$SOURCEFORGE_URL/openmosix/$SOURCE + MD5[0]=ac030a4e74e8e9d9bd42544516d8874f + WEB_SITE=http://openmosix.sourceforge.net + ENTERED=20021115 + UPDATED=20031201 + LICENSE[0]=GPL + BUILD_API=2 + SHORT="Userland tools for the openMosix clustering system" +cat << EOF +openMosix is a Linux kernel extension for single-system image clustering. Taking n PC boxes, +openMosix gives users and applications the illusion of one single computer with n CPUs. +openMosix is perfectly scalable and adaptive. + +This spell will enable openMosix on this machine. Cast it on every other machine in the cluster. + +This spell requires the openMosix kernel patch to be applied, and for each kernel to be built +with the same openMosix configuration. +EOF diff --git a/cluster/openmosix-tools/HISTORY b/cluster/openmosix-tools/HISTORY new file mode 100644 index 0000000000..1ae7aceb1c --- /dev/null +++ b/cluster/openmosix-tools/HISTORY @@ -0,0 +1,50 @@ +2005-03-17 Eric Sandall <eric@sandall.us> + * DETAILS: Removed MAKE_NJOBS=1 + Added BUILD_API=2 + Changed LICENSE to LICENSE[0] + * BUILD: Converted to build_api 2 + Run make_normal before make + Removed TABs + * INSTALL: Branched from BUILD + Converted to build_api 2 + Run make_normal before install + * HISTORY: Formatted to Guru Handbook + +2004-05-12 Eric Sandall <eric@sandall.us> + * CONFIGURE: Use "-t $PROMPT_DELAY" for reads (Bug #6598) + +2003-12-14 hgg <hgreig@bigpond.net.au> + * BUILD: use /lib/modules/$(uname -r)/build for kernel dir + +2003-12-01 hgg <hgreig@bigpond.net.au> + * DETAILS: update to 0.3.5 + +2003-11-05 hgg <hgreig@bigpond.net.au> + * init.d/*: PROGRAM=/bin/true not /usr/bin/true + +2003-10-05 hgg <hgreig@bigpond.net.au> + * DEPENDS,CONFIGURE,init.d/*: Update to simpleinit, alter CONFIGURE for + hints, add psmisc to DEPENDS (for killall) + * DETAILS: Update UPDATED (no-one complained it has been broken for a + month, i assume it is unused ATM) + +2003-07-04 hgg <hgreig@bigpond.net.au> + * DETAILS: Updated to 0.3.4 + +2003-06-18 Eric Sandall <eric@sandall.us> + * DETAILS: Updated to 0.3.3 + +2003-05-01 Rob Verkuylen <rob@verkuylen.net> + * init.d/*: Step 1/3 in bug#: 3115 + +2003-02-24 Eric Schabell <eschabell@sourcemage.org> + * BUILD: Update BUILD to work correctly with librunlevels for .sh script + install. + +2003-02-11 Eric Sandall <eric@sandall.us> + * DETAILS: Added MAKE_NJOBS=1, as it fails with a tested 4 + * Added to cluster + +2002-11-14 Chris Brien <christopher_brien@hotmail.com> + * Initial version + diff --git a/cluster/openmosix-tools/INSTALL b/cluster/openmosix-tools/INSTALL new file mode 100755 index 0000000000..3c8c822fe1 --- /dev/null +++ b/cluster/openmosix-tools/INSTALL @@ -0,0 +1,13 @@ +make_normal && +make install && + +(( i = 1 )) && + +for NODE in $NODES; do + echo "$i $NODE 1" >> /etc/openmosix.map + (( i++ )) +done && + +if [ -e /etc/init.d/openmosix ]; then + rm -f /etc/init.d/openmosix +fi diff --git a/cluster/openmosix-tools/init.d/openmosix b/cluster/openmosix-tools/init.d/openmosix new file mode 100755 index 0000000000..63b13259dd --- /dev/null +++ b/cluster/openmosix-tools/init.d/openmosix @@ -0,0 +1,194 @@ +#!/bin/sh + +PROGRAM=/bin/true +RUNLEVEL=3 +NEEDS="+remote_fs +network +portmap" + +. /etc/init.d/smgl_init + +if ! [ -d /var/lock/subsys ] +then mkdir -p /var/lock/subsys/ +fi + +# Init file for openMosix +# +# config: /etc/openmosix.map +# config: /etc/openmosix/openmosix.config +# Define some variables pointing to openMosix's necessary executables +# which should be found in the userland-tools +SETPE="/usr/sbin/setpe" +OMDISCD="/usr/sbin/omdiscd" +MOSCTL="/usr/bin/mosctl" + +# Variables used for info, warning and error messages +OM_MSG="openMosix:" +OM_MSG_WARN="$OM_MSG WARN:" +OM_MSG_ERR="$OM_MSG ERROR:" +OM_MSG_HINT="$OM_MSG HINT:" + +# Some standard hints: useful for pointing people to the right place +# before bugging anyone on the mailing lists ;-) +HINT_WEBSITE="$OM_MSG_HINT have you read the docs at http://openMosix.sf.net/ ?" +HINT_RECOMPILE_KERNEL="$OM_MSG_HINT need to recompile your kernel with openMosix support enabled?" +HINT_BOOT_MANAGER="$OM_MSG_HINT need to update your boot manager (lilo, grub, etc)?" +HINT_USERLAND_TOOLS="$OM_MSG_HINT have you installed the userland-tools?" +HINT_DEPRECATED_MAP="$OM_MSG_HINT # mv /etc/deprecated.map /etc/openmosix.map" + +# If we're not running an openMosix enabled kernel: exit +if [ ! -d /proc/hpc ]; then + echo "$OM_MSG_ERR Cannot find the /proc/hpc directory." + echo "$OM_MSG_ERR Looks like this is not an openMosix enabled kernel." + echo "$OM_MSG_ERR Configuration ABORTED." + echo "$HINT_RECOMPILE_KERNEL" + echo "$HINT_BOOT_MANAGER" + echo "$HINT_WEBSITE" + exit 1 +fi + +# Find the openMosix map-file if any exists, +# otherwise fall back to using the autodiscovery daemon +AUTODISC=0 +if [ -f /etc/openmosix.map ]; then + OMOSIX_MAP=/etc/openmosix.map + echo "Using map file /etc/openmosix.map" +elif [ -f /etc/mosix.map ]; then + OMOSIX_MAP=/etc/mosix.map + echo " Using map file /etc/mosix.map" + echo "$OM_MSG_WARN map-file /etc/mosix.map is DEPRECATED" + echo "$HINT_DEPRECATED_MAP" +elif [ -f /etc/hpc.map ]; then + OMOSIX_MAP=/etc/hpc.map + echo " Using map-file /etc/hpc.map" + echo "$OM_MSG_WARN map-file /etc/hpc.map is DEPRECATED" + echo "$HINT_DEPRECATED_MAP" +else + AUTODISC=1 + echo "No map-file found." + echo "Falling back to autodiscovery mode using $OMDISCD" +fi + +# Check the map-file for sanity +if [ $AUTODISC -eq 0 ]; then + $SETPE -c -f $OMOSIX_MAP &> /dev/null + if [ ! $? -eq 0 ]; then + echo "$OM_MSG_WARN Invalid configuration in map-file $OMOSIX_MAP" + echo "Falling back to autodiscovery mode using $OMDISCD" + AUTODISC=1 + fi +fi + +# Source the configuration from /etc/openmosix/openmosix.config +# This file would be a good place to force autodiscovery by setting AUTODISC=1 +[ -f /etc/openmosix/openmosix.config ] && . /etc/openmosix/openmosix.config + +# Make sure we have omdiscd installed +if [ $AUTODISC -eq 1 ]; then + if [ ! -x $OMDISCD ]; then + echo "$OM_MSG_ERR cannot find executable file $OMDISCD" + echo "$OM_MSG_ERR $OMDISCD is not installed." + echo "$OM_MSG_ERR ABORTING" + echo "$HINT_USERLAND_TOOLS" + echo "$HINT_WEBSITE" + exit 1 + fi +fi + + +stop() { + echo "Stopping openMosix..." + # Expel all processes + $MOSCTL expel + evaluate_retval + # disable openMosix configuration + $SETPE -off + evaluate_retval + # kill any autodiscovery deamon if running + killall -TERM omdiscd &> /dev/null + evaluate_retval + # remove lock file + rm -f /var/lock/subsys/openmosix + evaluate_retval +} + +start() { + echo "Initializing openMosix..." + # The variables $OVERHEADS, $MFSCOSTS, $MYOMID, $MOSGATES, + # $AUTODISCIF and $NODESPEED can be set to desired values + # in /etc/openmosix/openmosix.config + [ $OVERHEADS ] && echo $OVERHEADS > /proc/hpc/admin/overheads + [ $MFSCOSTS ] && echo $MFSCOSTS > /proc/hpc/admin/mfscosts + + if [ $AUTODISC -eq 0 ]; then + # Make sure we have setpe installed + if [ ! -x $SETPE ]; then + echo "$OM_MSG_ERR cannot find executable file $SETPE" + echo "$OM_MSG_ERR $SETPE is not installed." + echo "$OM_MSG_ERR ABORTING" + echo "$HINT_USERLAND_TOOLS" + echo "$HINT_WEBSITE" + exit 1 + fi + + # Static configuration via $OMOSIX_MAP + SETPE_OPTIONS="" + [ $MYOMID ] && SETPE_OPTIONS="$SETPE_OPTIONS -p $MYOMID" + [ $MOSGATES ] && SETPE_OPTIONS="$SETPE_OPTIONS -g $MOSGATES" + + $SETPE -W $SETPE_OPTIONS -f $OMOSIX_MAP + evaluate_retval + else + # Configure openMosix with the omdiscd + OMDISCD_OPTIONS="" + [ $AUTODISCIF ] && OMDISCD_OPTIONS="$OMDISCD_OPTIONS -i $AUTODISCIF" + + # we have already checked that omdiscd exists and is executable + # so we just need to invoke it + $OMDISCD $OMDISCD_OPTIONS + evaluate_retval + fi + + if [ $MIGRATE ]; then + if [ $MIGRATE == "yes" ]; then + $MOSCTL -lstay + evaluate_retval + $MOSCTL -stay + evaluate_retval + else + $MOSCTL lstay + evaluate_retval + fi + fi + + if [ $BLOCK ]; then + if [ $BLOCK == "yes" ]; then + $MOSCTL block + evaluate_retval + else + $MOSCTL -block + evaluate_retval + fi + fi + + if [ $MFS ]; then + if [ $MFS == "yes" ]; then + $MOSCTL mfs + evaluate_retval + else + $MOSCTL nomfs + evaluate_retval + fi + fi + + if [ $? -eq 0 ]; then + # if everything went ok, put a lock file into /var/lock/subsys + touch /var/lock/subsys/openmosix + # allow process migration now + [ ! $BLOCK ] && $MOSCTL noblock 1>/dev/null 2>&1 + # set speed of node if specified in the .config file + [ $NODESPEED ] && $MOSCTL setspeed $NODESPEED 1>/dev/null 2>&1 + echo "openMosix configuration was successful :)" + else + # print error message + echo "openMosix configuration failed :(" + fi +} diff --git a/cluster/openmosix-tools/openmosix.map b/cluster/openmosix-tools/openmosix.map new file mode 100755 index 0000000000..298db5de25 --- /dev/null +++ b/cluster/openmosix-tools/openmosix.map @@ -0,0 +1,13 @@ +#MOSIX CONFIGURATION +# =================== +# +# Each line should contain 3 fields, mapping IP addresses to MOSIX node-numbers: +# 1) first MOSIX node-number in range. +# 2) IP address of the above node (or node-name from /etc/hosts). +# 3) number of nodes in this range. +# +# Example: 10 machines with IP 192.168.1.50 - 192.168.1.59 +# 1 192.168.1.50 10 +# +# MOSIX-# IP number-of-nodes +# ============================ |