From 15a723de2ead6f5777bd7959626d0b19ce848dbc Mon Sep 17 00:00:00 2001 From: Leigh B Stoller Date: Thu, 21 Jan 2016 14:05:43 -0700 Subject: [PATCH] Add check for mixed <=1Gb and >1Gb and throw an error. This is enabled for emulab-ops and testbed for some testing. --- tbsetup/mapper.in | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tbsetup/mapper.in b/tbsetup/mapper.in index f8e7fbeba..361429c5e 100644 --- a/tbsetup/mapper.in +++ b/tbsetup/mapper.in @@ -272,6 +272,10 @@ if (!defined($experiment)) { } my $project = $experiment->GetProject(); +if ($pid eq "emulab-ops" || $pid eq "testbed") { + $gblinkcheck++; +} + # # Verify that this person can muck with the experiment. # @@ -390,6 +394,12 @@ sub MapperWrapper() exit(0) if ($clear && !$regression); } + if (!$toponly && $gblinkcheck) { + if ($vtop->gblinks() && $vtop->mgblinks()) { + fatal("Not allowed to mix <=1Gb and >1Gb links"); + } + } + AssignLoop(); return 0; } -- GitLab