Commit d1611d97 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Check for error when doing a forced (from boss) update. If it does

fail (usually cause of network dropout), continue to try every minute
until it suceeds.
parent 12fbcc8b
...@@ -128,7 +128,7 @@ while (flock(LOCK, LOCK_EX|LOCK_NB) == 0) { ...@@ -128,7 +128,7 @@ while (flock(LOCK, LOCK_EX|LOCK_NB) == 0) {
sleep(5); sleep(5);
} }
remotenodeupdate(); my $failed = remotenodeupdate();
close(LOCK); close(LOCK);
exit(0); exit($failed);
...@@ -6,8 +6,8 @@ chown root update vnodesetup ...@@ -6,8 +6,8 @@ chown root update vnodesetup
chmod u+s update vnodesetup chmod u+s update vnodesetup
chown root /usr/bin/suidperl chown root /usr/bin/suidperl
chmod u+s /usr/bin/suidperl chmod u+s /usr/bin/suidperl
chown emulabman client.pem emulab.pem chown emulabman client.pem emulab.pem ronnode.pem
chmod 640 client.pem emulab.pem chmod 640 client.pem emulab.pem ronnode.pem
/usr/bin/install -c -o root -g wheel -d -m 755 -o root -g 0 /var/testbed /usr/bin/install -c -o root -g wheel -d -m 755 -o root -g 0 /var/testbed
cp rc.testbed /usr/local/etc/rc.d/testbed.sh cp rc.testbed /usr/local/etc/rc.d/testbed.sh
......
...@@ -123,6 +123,8 @@ system("tmcc state ISUP"); ...@@ -123,6 +123,8 @@ system("tmcc state ISUP");
# #
my $mypid = fork(); my $mypid = fork();
if (! $mypid) { if (! $mypid) {
my $failed = 0;
print "Keep alive starting up ... \n"; print "Keep alive starting up ... \n";
while (1) { while (1) {
...@@ -144,9 +146,10 @@ if (! $mypid) { ...@@ -144,9 +146,10 @@ if (! $mypid) {
chomp $result; chomp $result;
my (undef,$update) = split("=", $result); my (undef,$update) = split("=", $result);
if ($update) { if ($update || $failed) {
print "Running an update at $date ...\n"; print "Running an update at $date ...\n";
system("update -i"); system("update -i");
$failed = $?;
} }
last; last;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment