Commit d1611d97 authored by Leigh Stoller's avatar Leigh 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) {
sleep(5);
}
remotenodeupdate();
my $failed = remotenodeupdate();
close(LOCK);
exit(0);
exit($failed);
......@@ -6,8 +6,8 @@ chown root update vnodesetup
chmod u+s update vnodesetup
chown root /usr/bin/suidperl
chmod u+s /usr/bin/suidperl
chown emulabman client.pem emulab.pem
chmod 640 client.pem emulab.pem
chown emulabman client.pem emulab.pem ronnode.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
cp rc.testbed /usr/local/etc/rc.d/testbed.sh
......
......@@ -123,6 +123,8 @@ system("tmcc state ISUP");
#
my $mypid = fork();
if (! $mypid) {
my $failed = 0;
print "Keep alive starting up ... \n";
while (1) {
......@@ -144,9 +146,10 @@ if (! $mypid) {
chomp $result;
my (undef,$update) = split("=", $result);
if ($update) {
if ($update || $failed) {
print "Running an update at $date ...\n";
system("update -i");
$failed = $?;
}
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