update node provision status based on the feedback of nodes instead of rpower/rnetboot
This commit is contained in:
parent
6769c92f7e
commit
565f67b9fe
18
xCAT-server/share/xcat/netboot/rh/dracut/xcat-premount.sh
Normal file
18
xCAT-server/share/xcat/netboot/rh/dracut/xcat-premount.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
#script to update nodelist.nodestatus during provision
|
||||
|
||||
MASTER=`echo $XCAT |awk -F: '{print $1}'`
|
||||
|
||||
getarg nonodestatus
|
||||
NODESTATUS=$?
|
||||
|
||||
XCATIPORT="$(getarg XCATIPORT=)"
|
||||
if [ $? -ne 0 ]; then
|
||||
XCATIPORT="3002"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ $NODESTATUS -ne 0 ];then
|
||||
/tmp/updateflag $MASTER $XCATIPORT "installstatus netbooting"
|
||||
fi
|
24
xCAT-server/share/xcat/netboot/rh/dracut/xcat-updateflag
Executable file
24
xCAT-server/share/xcat/netboot/rh/dracut/xcat-updateflag
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/awk -f
|
||||
#script to feedback the node provision status to xcatd
|
||||
BEGIN {
|
||||
|
||||
xcatdhost = ARGV[1]
|
||||
xcatiport = ARGV[2]
|
||||
|
||||
|
||||
ns = "/inet/tcp/0/" xcatdhost "/" xcatiport
|
||||
print "xCAT_xcatd" |& ns
|
||||
|
||||
while(1) {
|
||||
ns |& getline
|
||||
|
||||
if($0 == "ready")
|
||||
print ARGV[3] |& ns
|
||||
if($0 == "done")
|
||||
break
|
||||
}
|
||||
|
||||
close(ns)
|
||||
|
||||
exit 0
|
||||
}
|
Loading…
Reference in New Issue
Block a user