Commit 00828f77 authored by Leigh Stoller's avatar Leigh Stoller

Merge remote-tracking branch 'central/master' into imagealiases

parents 12b94bb5 e7422d49
......@@ -265,10 +265,6 @@ sub GenCredentials($$;$$)
$speaksfor->SetType("speaksfor");
if ($speaksfor->Sign($speaker_signer)) {
print STDERR "Could not sign speaksfor credential\n";
print STDERR Dumper($speaksfor) . "\n";
print STDERR Dumper($geniuser) . "\n";
print STDERR Dumper($sa_authority) . "\n";
print STDERR Dumper($speaker_signer) . "\n";
goto bad;
}
}
......
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
# Copyright (c) 2000-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -37,11 +37,11 @@ use POSIX ":sys_wait_h";
#
sub usage()
{
print "Usage: linktest.proxy [-d level] -u user -p unix_pid -g unix_gid -e pid/eid ".
print "Usage: linktest.proxy [-d level] [-N] -u user -p unix_pid -g unix_gid -e pid/eid ".
"-l level -o logfile -t timeout -r\n";
exit(-1);
}
my $optlist = "d:u:g:e:l:o:t:rp:";
my $optlist = "d:u:g:e:l:o:t:rp:N";
my $debug = 0;
my $user;
my $pid;
......@@ -50,6 +50,7 @@ my $level;
my $logfile;
my $timeout;
my $reportonly = 0;
my $nonfs = 0;
my $unix_gid;
my $unix_pid;
......@@ -128,6 +129,9 @@ if (defined($options{"o"})) {
if (defined($options{"r"})) {
$reportonly = $options{"r"};
}
if (defined($options{"N"})) {
$nonfs = 1
}
#
# Okay, now flip to user before running linktest. Must put the user
......@@ -163,6 +167,8 @@ push(@cmdandargs, ("-o", $output))
if (defined($output));
push(@cmdandargs, "-r")
if ($reportonly);
push(@cmdandargs, "-N")
if ($nonfs);
exec(@cmdandargs);
die("*** $0:\n".
......
......@@ -42,17 +42,19 @@ sub usage()
"-o - Specify output file for linktest results.\n".
"-e - Tell linktest to send error output to stdout or -o file\n".
"-m - Send email to swapper if linktest fails.\n".
"-N - Use loghole instead of NFS shared directory\n".
"-r - Report results only, don't flag errors.\n".
"-d - Turn on debugging output.\n");
exit(-1);
}
my $optlist = "dkl:o:t:mfre";
my $optlist = "dkl:o:t:mfreN";
my $debug = 1;
my $cancel = 0;
my $sendmail = 0;
my $forcerun = 0;
my $reportonly = 0;
my $noerrlog = 0;
my $nonfs = 0;
my $timeout;
my $level;
my $output;
......@@ -105,6 +107,9 @@ if (defined($options{"d"})) {
if (defined($options{"m"})) {
$sendmail = 1;
}
if (defined($options{"N"})) {
$nonfs = 1;
}
if (defined($options{"r"})) {
$reportonly = 1;
}
......@@ -357,6 +362,8 @@ push(@cmdargs, ("-o", $errlog))
if (!$noerrlog);
push(@cmdargs, "-r")
if ($reportonly);
push(@cmdargs, "-N")
if ($nonfs);
print "Running '@cmdargs'\n"
if ($debug > 1);
......
#!/usr/bin/perl -wT
#
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
# Copyright (c) 2000-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -255,7 +255,7 @@ if (!defined($keyfile)) {
}
# path to linktest data.
my $linktest_path = "$expdata_path/linktest";
if ($NOSHAREDFS) {
if ($NOSHAREDFS || $nodelogdir ne "") {
#
# We have to make the log directory since it is not in a shared FS
# (normally the "master" linktest node would do this).
......@@ -585,14 +585,12 @@ sub run_loghole(;$$) {
if (!$remdir || !$localdir) {
$remdir = "/var/emulab/logs";
$localdir = "$PROJROOT/$pid/exp/$eid/tbdata/ltlogs";
print "Downloading logs...\n";
}
print "Downloading logs ... patience please.\n";
system("rm -rf $localdir");
system("mkdir -p $localdir");
system("chmod 775 $localdir");
system("$LOGHOLE -e $pid/$eid sync -P -n -l $localdir -r $remdir ".
"> $localdir/loghole.out 2>&1");
system("$LOGHOLE -e $pid/$eid sync -P -n -l $localdir -r $remdir");
}
sub TBTimeStamp {
......
......@@ -3156,6 +3156,20 @@ sub NoNFSMounts($)
return 0;
}
sub HasNoNFSMounts($)
{
my ($self) = @_;
my $idx = $self->idx();
my $query_result =
DBQueryWarn("select nonfsmounts,nfsmounts from experiments ".
"where idx='$idx' and ".
" (nonfsmounts=1 or nfsmounts='none')");
return 1
if (!$query_result);
return $query_result->numrows;
}
#
# Clear the panic bit.
#
......
#!/usr/bin/perl -wT
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2015 University of Utah and the Flux Group.
# Copyright (c) 2000-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -55,7 +55,8 @@ my $clean = 0;
my $TB = "@prefix@";
my $DBNAME = "@TBDBNAME@";
my $TBOPS = "@TBOPSEMAIL@";
my $MAINSITE = @TBMAINSITE@;
my $PGENISUPPORT= @PROTOGENI_SUPPORT@;
my $BACKUPDIR = "$TB/backup";
my $LOGDIR = "$TB/log/mysql";
my $HOTCOPY = "/usr/local/bin/mysqlhotcopy";
......@@ -280,8 +281,14 @@ else {
#
# Do a mysqldump. This will reset the log files.
#
my @DBNAMES = ($DBNAME);
push(@DBNAMES, "ims")
if ($MAINSITE);
push(@DBNAMES, ("geni", "geni-cm", "geni-ch"))
if ($PGENISUPPORT);
if (system("$MYSQLDUMP --create-options ".
"--flush-logs --lock-tables $DBNAME > $backname")) {
"--flush-logs --lock-tables --databases @DBNAMES > $backname")) {
fatal("mysqldump failed!");
}
......
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2004 University of Utah and the Flux Group.
# Copyright (c) 2000-2004, 2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -114,7 +114,8 @@ while (my ($table) = $query_result->fetchrow()) {
print "Checking $table ...\n";
# virt_routes is too big for this.
my $checktype = ($table eq "virt_routes" ? "medium" : "extended");
my $checktype = ($table eq "virt_routes" || $table eq "logfile_metadata"
? "medium" : "extended");
my $check_result = DBQueryWarn("check table $table $checktype");
if (! $check_result) {
......
......@@ -400,6 +400,9 @@ sub ParRun($$$@)
$SIG{TERM} = 'DEFAULT';
$SIG{QUIT} = 'DEFAULT';
$SIG{HUP} = 'DEFAULT';
# So randomness is not the same in different children
srand();
# So we get the event system fork too ...
event::EventFork();
......
......@@ -253,9 +253,9 @@ Setting up an InstaGeni Rack. First, we need the following info:
* Fire up the VMs. Ops has to be first, followed by boss.
sudo xm create ~elabman/ops/xm.conf
sudo xl create ~elabman/ops/xm.conf
sleep 30
sudo xm create ~elabman/boss/xm.conf
sudo xl create ~elabman/boss/xm.conf
* It is possible that ops will hang on fixarp, because tmcd is not
running on boss yet. Log into boss (as elabman) and do:
......
......@@ -4447,14 +4447,13 @@ sub SliverWorkAux($$$$$$$$)
$message = "Inconsistent ifacemap; $node_id,$iface_id";
goto bad;
}
if (GeniHRN::IsValid($iface_name)) {
my (undef, undef, $short_iface) =
GeniHRN::ParseInterface($iface_name);
$iface_name = $short_iface;
}
my $interface;
if ($iface_name ne "lo0") {
if (GeniHRN::IsValid($iface_name)) {
my ($authority, $short_node, $short_iface) =
GeniHRN::ParseInterface($iface_name);
$iface_name = $short_iface;
}
$interface = Interface->LookupByIface($node, $iface_name);
if (!defined($interface)) {
$message = "No such interface $iface_name on $node";
......
......@@ -5213,6 +5213,8 @@ sub RunLinktest($)
}
else {
my $command = "$LINKTEST -e -l $level -t 3600 ";
$command .= "-N "
if ($experiment->HasNoNFSMounts());
$command .= "-o " . $logfile->filename() . " "
if (defined($async));
$command .= "$pid $eid";
......
......@@ -196,6 +196,7 @@ while(<TMP>) {
}
if (!close(TMP)) {
print STDERR $xmlint_output;
system("/bin/cat $capfile");
fatal("$capfile does not conform to schema $SCHEMA");
}
......
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2014 University of Utah and the Flux Group.
# Copyright (c) 2000-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -526,7 +526,7 @@ foreach my $lan (keys(%virt_lans)) {
}
}
}
else {
elsif (@members > 1) {
foreach my $memb0 (@members) {
my $member0 = $virt_lans{$lan}->{"MEMBERS"}->{$memb0};
......@@ -926,6 +926,8 @@ if ($query_result->numrows) {
if ($havepmap) {
foreach my $vlan (keys(%virt_lans)) {
my @members = @{$virt_lans{$vlan}->{"MEMBERLIST"}};
next
if (@members <= 1);
foreach my $memb0 (@members) {
my $member0 = $virt_lans{$vlan}->{"MEMBERS"}->{$memb0};
my $node0 = $member0->{"vnode"};
......
......@@ -1699,11 +1699,15 @@ function (_, sup, moment, marked, UriTemplate, ShowImagingModal,
* No point in showing linktest if no links at any site.
* For the moment, we do not count links if they span sites
* since linktest does not work across stitched links.
*
* We reset showlinktest cause we get called again after
* a deletenode.
*/
showlinktest = false;
$(xml).find("link").each(function() {
var managers = $(this).find("component_manager");
if (managers.length == 1)
showlinktest++;
showlinktest = true;
});
SetupLinktest(instanceStatus);
}
......@@ -2356,10 +2360,17 @@ function (_, sup, moment, marked, UriTemplate, ShowImagingModal,
//
// Linktest support.
//
var linktestsetup = 0;
function SetupLinktest(status) {
if (hidelinktest || !showlinktest) {
return;
// We might remove a node that removes last link.
return ToggleLinktestButtons(status);
}
if (linktestsetup) {
return ToggleLinktestButtons(status);
}
linktestsetup = 1;
require(['js/lib/text!template/linktest.md'],
function(md) {
$('#linktest-help').html(marked(md));
......@@ -2392,6 +2403,7 @@ function (_, sup, moment, marked, UriTemplate, ShowImagingModal,
}
function ToggleLinktestButtons(status) {
if (hidelinktest || !showlinktest) {
$('#linktest-modal-button').addClass("hidden");
DisableButton("start-linktest");
return;
}
......
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