-Fix awk scripts that failed to gracefully recover from network timeouts

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4293 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2009-10-03 02:06:43 +00:00
parent 8cdb7917c3
commit 35fcad7c78
6 changed files with 30 additions and 0 deletions

View File

@ -62,6 +62,11 @@ BEGIN {
while(1) {
if((ns |& getline) > 0)
print \$0
else {
print "Retrying update"
close(ns)
system("sleep 5")
}
if(\$0 == "ready")
print "next" |& ns

View File

@ -11,6 +11,11 @@ BEGIN {
while(1) {
if((ns |& getline) > 0)
print $0 | "logger -t xcat"
else {
print "Retrying flag update" | "logger -t xcat"
close(ns)
system("sleep 10")
}
if($0 == "ready")
print "next" |& ns

View File

@ -8,6 +8,11 @@ BEGIN {
while(1) {
if((ns |& getline) > 0)
print $0 | "logger -t xcat"
else { #socket dead, retry
print "TFTP lockdir request retrying" | "logger -t xcat"
close(ns)
system("sleep 1")
}
if($0 == "ready")
print "locktftpdir" |& ns

View File

@ -10,6 +10,11 @@ BEGIN {
while(1) {
if((ns |& getline) > 0)
print $0 | "logger -t xcat"
else {
print "Retrying iSCSI paramater config script"
close(ns)
system("sleep 1")
}
if($0 == "ready")
print "setiscsiparms "kernel" "initrd" "kcmd |& ns

View File

@ -8,6 +8,11 @@ BEGIN {
while(1) {
if((ns |& getline) > 0)
print $0 | "logger -t xcat"
else {
print "Retrying unlock of tftp directory"
close(ns)
system("sleep 5")
}
if($0 == "ready")
print "unlocktftpdir" |& ns

View File

@ -13,6 +13,11 @@ BEGIN {
while(1) {
if((ns |& getline) > 0)
print $0 | "logger -t xcat"
else {
print "Retrying flag update" | "logger -t xcat"
close(ns)
system("sleep 10")
}
if($0 == "ready")
print flag |& ns