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

No longer need the reservations experiment.

parent 8d1f1c05
...@@ -594,15 +594,8 @@ sub GetTicket($;$) ...@@ -594,15 +594,8 @@ sub GetTicket($;$)
$virtexperiment->allowfixnode(0); $virtexperiment->allowfixnode(0);
# This is where nodes are parked until a ticket is redeemed. # This is where nodes are parked until a ticket is redeemed.
# This experiment no longer has to exist.
my $reserved_holding = Experiment->Lookup("GeniSlices", "reservations"); my $reserved_holding = Experiment->Lookup("GeniSlices", "reservations");
if (!defined($reserved_holding)) {
#
# This experiment has to exist!
#
print STDERR "Could not find Geni reservations experiment!\n";
$response = GeniResponse->Create(GENIRESPONSE_ERROR);
goto bad;
}
# #
# An rspec is a structure that requests specific nodes. If those # An rspec is a structure that requests specific nodes. If those
...@@ -688,6 +681,7 @@ sub GetTicket($;$) ...@@ -688,6 +681,7 @@ sub GetTicket($;$)
# #
my $reservation = $node->Reservation(); my $reservation = $node->Reservation();
if (defined($reservation) && if (defined($reservation) &&
defined($reserved_holding) &&
$reservation->SameExperiment($reserved_holding)) { $reservation->SameExperiment($reserved_holding)) {
if ($node->MoveReservation($slice_experiment)) { if ($node->MoveReservation($slice_experiment)) {
print STDERR "Could not move $node to $slice_experiment\n"; print STDERR "Could not move $node to $slice_experiment\n";
...@@ -1497,14 +1491,8 @@ sub SliverWork($$) ...@@ -1497,14 +1491,8 @@ sub SliverWork($$)
} }
# Nodes are in this holding experiment. # Nodes are in this holding experiment.
# This experiment no longer has to exist!
my $reserved_holding = Experiment->Lookup("GeniSlices", "reservations"); my $reserved_holding = Experiment->Lookup("GeniSlices", "reservations");
if (!defined($reserved_holding)) {
#
# This experiment has to exist!
#
print STDERR "Could not find Geni reservations experiment!\n";
goto bad;
}
# #
# Make sure all nodes requested are allocated. # Make sure all nodes requested are allocated.
...@@ -1555,7 +1543,8 @@ sub SliverWork($$) ...@@ -1555,7 +1543,8 @@ sub SliverWork($$)
# #
my $reservation = $node->Reservation(); my $reservation = $node->Reservation();
if (defined($reservation)) { if (defined($reservation)) {
if ($reservation->SameExperiment($reserved_holding)) { if (defined($reserved_holding) &&
$reservation->SameExperiment($reserved_holding)) {
# This is for backwards compatibility. # This is for backwards compatibility.
if ($node->MoveReservation($experiment)) { if ($node->MoveReservation($experiment)) {
print STDERR "Could not move $node to $experiment\n"; print STDERR "Could not move $node to $experiment\n";
......
...@@ -362,20 +362,6 @@ if (!defined($sslcert)) { ...@@ -362,20 +362,6 @@ if (!defined($sslcert)) {
if ($?); if ($?);
} }
#
# Create holding experiment.
#
my $experiment = Experiment->Lookup($geniprojid, "reservations");
if (!defined($experiment)) {
system("$SUDO -u $geniuserid $WAP $BATCHEXP ".
" -q -i -k -w -f -n -S 'System Experiment' ".
" -L 'System Experiment' ".
" -E 'Holding Pattern for Reservations - DO NOT DELETE' ".
" -p $geniprojid -e reservations -h " . NewUUID());
fatal("Could not create create reservations holding experiment")
if ($?);
}
# #
# Need this fake type for now. # Need this fake type for now.
# #
......
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