Commit f11afd19 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Back out previous revison cause it was the wrong file.

parent adf76aef
...@@ -16,7 +16,7 @@ use Fcntl ':flock'; ...@@ -16,7 +16,7 @@ use Fcntl ':flock';
# Drag in path stuff so we can find emulab stuff. Also untaints path. # Drag in path stuff so we can find emulab stuff. Also untaints path.
BEGIN { require "/etc/emulab/paths.pm"; import emulabpaths; } BEGIN { require "/etc/emulab/paths.pm"; import emulabpaths; }
use libsetup qw(REMOTE LOCALROOTFS TMTOPOMAP TBDebugTimeStamp); use libsetup qw(REMOTE LOCALROOTFS TBDebugTimeStamp);
use libtmcc; use libtmcc;
# #
...@@ -325,26 +325,9 @@ TBDebugTimeStamp("mkjail tmcc proxy is running"); ...@@ -325,26 +325,9 @@ TBDebugTimeStamp("mkjail tmcc proxy is running");
# #
$jailpid = fork(); $jailpid = fork();
if ($jailpid) { if ($jailpid) {
# # We do not really care about the exit status of the jail.
# We do not really care about the exit status of the jail. We want to catch waitpid($jailpid, 0);
# any children, which includes the tmcc proxy. If it dies, something has undef($jailpid);
# gone wrong, and that appears to happen a lot. Lets restart it until we
# figure out what is going wrong.
#
while (1) {
my $kidpid = waitpid(-1, 0);
if ($kidpid == $jailpid) {
undef($jailpid);
last;
}
if ($kidpid == $tmccpid) {
print("TMCC proxy exited with status $?. Restarting ...\n");
startproxy("$JAILPATH/$vnodeid");
next;
}
print("Unknown child $kidpid exited with status $?!\n");
}
} }
else { else {
$SIG{TERM} = 'DEFAULT'; $SIG{TERM} = 'DEFAULT';
...@@ -536,9 +519,6 @@ sub mkrootfs($) ...@@ -536,9 +519,6 @@ sub mkrootfs($)
TBDebugTimeStamp("mkjail copying the tmcc cache"); TBDebugTimeStamp("mkjail copying the tmcc cache");
tmcccopycache($vnodeid, "$path/root"); tmcccopycache($vnodeid, "$path/root");
if (-e TMTOPOMAP()) {
mysystem("cp -fp " . TMTOPOMAP() . " $path/root/var/emulab/boot");
}
# #
# Stash the control net IP if not the same as the host IP # Stash the control net IP if not the same as the host IP
...@@ -705,9 +685,6 @@ sub restorerootfs($) ...@@ -705,9 +685,6 @@ sub restorerootfs($)
} }
tmcccopycache($vnodeid, "$path/root"); tmcccopycache($vnodeid, "$path/root");
if (-e TMTOPOMAP()) {
mysystem("cp -fp " . TMTOPOMAP() . " $path/root/var/emulab/boot");
}
# #
# The proc FS in the jail is per-jail of course. # The proc FS in the jail is per-jail of course.
...@@ -803,7 +780,6 @@ sub startproxy($) ...@@ -803,7 +780,6 @@ sub startproxy($)
{ {
my ($dir) = @_; my ($dir) = @_;
my $log = "$dir/tmcc.log"; my $log = "$dir/tmcc.log";
my $klog = "$dir/tmcc.ktrace";
# #
# The point of these paths is so that there is a comman path to # The point of these paths is so that there is a comman path to
...@@ -834,7 +810,7 @@ sub startproxy($) ...@@ -834,7 +810,7 @@ sub startproxy($)
# The -o option will cause the proxy to detach but not fork! # The -o option will cause the proxy to detach but not fork!
# Eventually change this to standard pid file kill. # Eventually change this to standard pid file kill.
exec("ktrace -i -a -f $klog $TMCC -d -x $outsidepath -n $vnodeid -o $log"); exec("$TMCC -d -x $outsidepath -n $vnodeid -o $log");
die("Exec of $TMCC failed! $!\n"); die("Exec of $TMCC failed! $!\n");
} }
......
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