Internal/VirtualPL/ParallelImaging/GExec: imageNodes4

File imageNodes4, 1.2 KB (added by shruti, 18 years ago)
Line 
1#!/bin/bash
2default_image="orbit-parallel"
3
4# Set up pxe links on repository2 for pxe boot
5
6echo "$1" > node
7
8node_x=`cut -f1 -d',' node`
9
10node_y=`cut -f2 -d',' node`
11
12node_id="node"$node_x"-"$node_y
13
14#echo " Node ID is $node_id"
15
16#echo " X coordinate of node is $node_x, Y co-ordinate of node is $node_y"
17
18#echo " my console is `hostname -d | cut -f1 -d'.'` "
19
20
21
22sub=`/sbin/ifconfig eth1 | grep 'inet addr' | cut -c21-26`
23
24subnet_ip=$sub$node_x"."$node_y
25
26
27echo "My subnet number is $subnet_ip"
28
29#echo "The nodes given are $1"
30
31wget -O - "http://pxe:5012/pxe/setBootImage?img=$default_image&node=$node_id&ip=$subnet_ip"
32
33# Reset the selected nodes using cmc service
34
35wget -O - "http://cmc:5012/cmc/on?x=$node_x&y=$node_y"
36
37wget -O - "http://cmc:5012/cmc/reset?x=$node_x&y=$node_y"
38
39sleep 120
40
41# Launch the frisbee server
42
43wget -O - "http://frisbee:5012/frisbee/getAddress?img=$2" > PORT
44
45port=`cut -c 11-15 PORT`
46
47wget -O - "http://pxe:5012/pxe/clearBootImage?node=$node_id&ip=$subnet_ip"
48
49
50#sleep 180
51
52export GEXEC_SVRS="$node_id"
53
54export LD_ASSUME_KERNEL="2.4.2"
55
56cd /etc
57
58gexec -n 0 frisbee -p $port -m 224.0.0.2 -i $subnet_ip /dev/hda
59
60wget -O - "http://cmc:5012/cmc/reset?x=$node_x&y=$node_y"