Index: trunk/shell/pin-dom0-vcpus
===================================================================
--- trunk/shell/pin-dom0-vcpus	(revision 37)
+++ trunk/shell/pin-dom0-vcpus	(revision 38)
@@ -1,20 +0,0 @@
-#! /bin/sh -x
-#
-# ST 2012-05-15
-#
-# Pint the dom0 vcpus.
-#
-# Get the directory of the script.
-SCRIPT_PATH=`dirname $0`
-# Get the script name.
-SCRIPT_NAME=`basename $0`
-# Source the common configuration variables.
-. $SCRIPT_PATH/c-i-a-b.common
-#
-# Pin the VPCU to the selected CPU for dom0
-VCPU_NUM=0
-for i in $DOM0_CPUS_LIST; do
-  xm vcpu-pin $CONST_XEN_DOM0_NAME $VCPU_NUM $i
-  VCPU_NUM=$((VCPU_NUM + 1))
-done
-
Index: trunk/shell/generate-dhcp-hostsfile
===================================================================
--- trunk/shell/generate-dhcp-hostsfile	(revision 37)
+++ trunk/shell/generate-dhcp-hostsfile	(revision 38)
@@ -1,4 +1,4 @@
-#! /bin/bash
+#! /bin/bash 
 #
 # Generate a dhcp-hostsfile for dnsmasq.
 # MAC_address,node_name,IP_address
@@ -10,8 +10,8 @@
 # Source the common configuration variables.
 . $SCRIPT_PATH/c-i-a-b.common
 # Clean up the file
-DHCP_HOSTSFILE="${SCRIPT_PATH}/${TEMPLATES_DIR}/etc/${CONTS_DHCP_HOSTS_FILE_BASENAME}"
-rm -f $DHCP_HOSTSFILE
+DHCP_HOSTS_FILE="${SCRIPT_PATH}/${TEMPLATES_DIR}/etc/${CONST_DHCP_HOSTS_FILE_BASENAME}"
+rm -f $DHCP_HOSTS_FILE
 # Compute the file entries.
 for i in `seq 1 $COMPUTE_NODE_MAX_NUM`
   do
@@ -30,17 +30,17 @@
     done
     MAC_ADDRESS="${CLUSTER_MAC_ADDRESS_PREFIX}:${NODE_NUMBER_HEXA}"
     COMPUTE_NODE_NAME="${COMPUTE_NODE_NAME_PREFIX}${NODE_NUMBER_STRING}"
-    echo "${MAC_ADDRESS},id:*,${CLUSTER_STATIC_NETWORK_PREFIX}.${NODE_NUMBER},${COMPUTE_NODE_NAME}" >> $CONST_DHCP_HOSTS_FILE
+    echo "${MAC_ADDRESS},id:*,${CLUSTER_STATIC_NETWORK_PREFIX}.${NODE_NUMBER},${COMPUTE_NODE_NAME}" >> $DHCP_HOSTS_FILE
     
 done
 # Front end stuff
 NODE_NUMBER_HEXA=`printf "%X" $CONST_FRONT_END_CLUSTER_STATIC_NETWORK_POSTFIX`
 MAC_ADDRESS="${CLUSTER_MAC_ADDRESS_PREFIX}:${NODE_NUMBER_HEXA}"
-echo "${MAC_ADDRESS},id:*,${CLUSTER_STATIC_NETWORK_PREFIX}.$CONST_FRONT_END_CLUSTER_STATIC_NETWORK_POSTFIX,${FRONT_END_HOST_NAME}" >> $DHCP_HOSTSFILE
+echo "${MAC_ADDRESS},id:*,${CLUSTER_STATIC_NETWORK_PREFIX}.$CONST_FRONT_END_CLUSTER_STATIC_NETWORK_POSTFIX,${FRONT_END_CLUSTER_HOST_NAME}" >> $DHCP_HOSTS_FILE
 # Compute node model stuff
 NODE_NUMBER_HEXA=`printf "%X" $CONST_COMPUTE_NODE_MODEL_CLUSTER_STATIC_NETWORK_POSTFIX`
 MAC_ADDRESS="${CLUSTER_MAC_ADDRESS_PREFIX}:$NODE_NUMBER_HEXA"
-echo "${MAC_ADDRESS},id:*,${CLUSTER_STATIC_NETWORK_PREFIX}.${CONST_COMPUTE_NODE_MODEL_CLUSTER_STATIC_NETWORK_POSTFIX},${COMPUTE_NODE_MODEL_HOST_NAME}" >> $DHCP_HOSTSFILE
+echo "${MAC_ADDRESS},id:*,${CLUSTER_STATIC_NETWORK_PREFIX}.${CONST_COMPUTE_NODE_MODEL_CLUSTER_STATIC_NETWORK_POSTFIX},${COMPUTE_NODE_MODEL_CLUSTER_HOST_NAME}" >> $DHCP_HOSTS_FILE
 echo
 echo Copy the file to the front end!
 echo
Index: trunk/shell/generate-hosts-file
===================================================================
--- trunk/shell/generate-hosts-file	(revision 37)
+++ trunk/shell/generate-hosts-file	(revision 38)
@@ -51,6 +51,6 @@
 echo "fe00::0 ip6-localnet" 1>&5
 echo "ff00::0 ip6-mcastprefix" 1>&5
 echo "ff02::1 ip6-allnodes" 1>&5
-echo "ffO2::2 ip6-allraouters" 1>&5
+echo "ffO2::2 ip6-allrouters" 1>&5
 exec 5>&-
 exit 0
Index: trunk/shell/dom0-pin-vcpus
===================================================================
--- trunk/shell/dom0-pin-vcpus	(revision 0)
+++ trunk/shell/dom0-pin-vcpus	(revision 38)
@@ -0,0 +1,20 @@
+#! /bin/sh -x
+#
+# ST 2012-05-15
+#
+# Pint the dom0 vcpus.
+#
+# Get the directory of the script.
+SCRIPT_PATH=`dirname $0`
+# Get the script name.
+SCRIPT_NAME=`basename $0`
+# Source the common configuration variables.
+. $SCRIPT_PATH/c-i-a-b.common
+#
+# Pin the VPCU to the selected CPU for dom0
+VCPU_NUM=0
+for i in $DOM0_CPUS_LIST; do
+  xm vcpu-pin $CONST_XEN_DOM0_NAME $VCPU_NUM $i
+  VCPU_NUM=$((VCPU_NUM + 1))
+done
+

Property changes on: trunk/shell/dom0-pin-vcpus
___________________________________________________________________
Added: svn:executable
   + *

Index: trunk/shell/c-i-a-b.common
===================================================================
--- trunk/shell/c-i-a-b.common	(revision 37)
+++ trunk/shell/c-i-a-b.common	(revision 38)
@@ -17,16 +17,18 @@
 CONST_SWAP_DISK_POSTFIX="swap-disk"
 CONST_SYSTEM_DISK_POSTFIX="system-disk"
 #
-# Constant that may change with Debian version
+# Constants that may change with Debian version
 CONST_DEBIAN_ARCH=amd64
 CONST_DEBIAN_VERSION=stable
-# Constant that may change with another Xen version.
+# Constants that may change with another Xen version.
+# Order matters!
 CONST_XEN_BRIDGE_PREFIX="bridge="
+CONST_XEN_CONFIG_DIR="/etc/xen"
+CONST_XEN_VIRTUAL_CONSOLE_NAME="hvc0"  # See below.
 CONST_XEN_DHCP_STANZA="dhcp        ='dhcp'"
-CONST_XEN_CONFIG_DIR="/etc/xen"
 CONST_XEN_DOM0_CPUS_ALL="(dom0-cpus 0)"
 CONST_XEN_DOM0_NAME=Domain-0
-CONST_XEN_EXTRA_STANZA="extra = '4 console=hvc0 xencons=tty'"
+CONST_XEN_EXTRA_STANZA="extra = '4 console=$CONST_XEN_VIRTUAL_CONSOLE_NAME xencons=tty'"
 CONST_XEN_IP_PREFIX="ip="
 CONST_XEN_MAC_PREFIX="mac="
 CONST_XEN_NOSWAP="noswap = 1" # For /etc/xen-tools/xen-tools.conf.
@@ -68,6 +70,7 @@
 COMPUTE_NODE_MODEL_EXTERNAL_MAC_ADDRESS="${CLUSTER_EXTERNAL_MAC_PREFIX}01"
 COMPUTE_NODE_MODEL_STATIC_IP_EXTERNAL=
 COMPUTE_NODE_MODEL_HOST_NAME="tamadi-1-cnm"
+COMPUTE_NODE_MODEL_CLUSTER_HOST_NAME="compute-node-model"
 COMPUTE_NODE_NAME_PREFIX="${CONST_COMPUTE_NODE}-"
 COMPUTE_NODE_RAMDISK=/boot/initrd.img-`uname -r`
 COMPUTE_NODE_STATIC_NETWORK_PREFIX=$CLUSTER_STATIC_NETWORK_PREFIX
@@ -100,6 +103,7 @@
 FRONT_END_HOME_VOLUME_GROUP=vg_slow
 FRONT_END_HOME_VOLUME_GROUP_DEVICE="/dev/$FRONT_END_HOME_VOLUME_GROUP"
 FRONT_END_HOST_NAME="tamadi-1-fe"
+FRONT_END_CLUSTER_HOSTNAME="front-end"
 FRONT_END_INTERFACES_TEMPLATE=interfaces.${CONST_FRONT_END}
 FRONT_END_KERNEL=/boot/vmlinuz-`uname -r`
 FRONT_END_MEMORY=8192 # Must be in Mb for Xen 4.0
Index: trunk/shell/front-end-finish-up
===================================================================
--- trunk/shell/front-end-finish-up	(revision 37)
+++ trunk/shell/front-end-finish-up	(revision 38)
@@ -15,6 +15,7 @@
 #
 # Get the cluster MAC address
 #
+CURRENT_PATH=/etc
 FRONT_END_CLUSTER_MAC_ADDRESS=\
 `awk -F, -v INDEX=$CONST_FRONT_END_CLUSTER_STATIC_NETWORK_POSTFIX '{if (FNR==INDEX) {print $1}}' $SCRIPT_PATH/$TEMPLATES_DIR$CURRENT_PATH/$CONST_DHCP_HOSTS_FILE_BASENAME`
 #
@@ -239,28 +240,4 @@
 umount $FRONT_END_FILE_SYSTEM_MOUNT_POINT/home
 umount $FRONT_END_FILE_SYSTEM_MOUNT_POINT
 #
-# Start the virtual machine
-#
-xm create $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
-#
 exit 0
-#
-# Wait until the virtual machine has started
-#
-IS_RUNNING=""
-while [ -z "$IS_RUNNING" ]
-  do
-    IS_RUNNING=`xm list | grep $CURRENT_HOST_NAME`
-    sleep 1
-done
-#
-# Pin the VCPUs to "real" CPUs.
-#
-VCPU_NUM=0
-for i in $CPUS_LIST
-  do
-    xm vcpu-pin $CURRENT_HOST_NAME $VCPU_NUM $i
-    VCPU_NUM=$((VCPU_NUM + 1))
-done
-
-exit 0
Index: trunk/shell/templates/etc/network/interfaces.front-end
===================================================================
--- trunk/shell/templates/etc/network/interfaces.front-end	(revision 37)
+++ trunk/shell/templates/etc/network/interfaces.front-end	(revision 38)
@@ -1,11 +1,13 @@
 # This file describes the network interfaces available on your system
 # and how to activate them. For more information, see interfaces(5).
-
+#
+# Automatic start interfaces.
+auto lo eth0 eth1
 # The loopback network interface
-auto lo eth0 eth1
-__ETH0_STATIC_OR_DHCP__
+iface lo inet loopback
 #
 # The primary network interface
+__ETH0_STATIC_OR_DHCP__
 __ETH0_STATIC_ADDRESS__
 __ETH0_STATIC_NETMASK__
 __ETH0_STATIC_NETWORK__
Index: trunk/shell/templates/etc/exports.front-end
===================================================================
--- trunk/shell/templates/etc/exports.front-end	(revision 0)
+++ trunk/shell/templates/etc/exports.front-end	(revision 38)
@@ -0,0 +1,16 @@
+# /etc/exports: the access control list for filesystems which may be exported
+#		to NFS clients.  See exports(5).
+#
+# Example for NFSv2 and NFSv3:
+# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
+#
+# Example for NFSv4:
+# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
+# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
+#
+# We use NFS4 as we have a single tree to share: /home. fsid=0 is used
+# to set the root of that tree.
+# We use async for performance, hopping that the front-end
+# will not crash indipendently from the rest of the cluster.
+#
+/home 192.168.1.0/255.255.255.0(rw,no_subtree_check,async,root_squash,fsid=0)
