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

Add creation of the holding experiment where reserved nodes live

before a ticket is redeemed.
parent 8f1e9aea
......@@ -45,6 +45,7 @@ my $GENCRL = "$TB/sbin/protogeni/gencrl";
my $GENCRLBUNDLE = "$TB/sbin/protogeni/gencrlbundle";
my $MKSYSCERT = "$TB/sbin/mksyscert";
my $MKUSERCERT = "$TB/sbin/mkusercert";
my $BATCHEXP = "$TB/bin/batchexp";
my $WAP = "$TB/sbin/withadminprivs";
my $SACERT = "$TB/etc/genisa.pem";
my $CMCERT = "$TB/etc/genicm.pem";
......@@ -75,6 +76,7 @@ use libtestbed;
use libdb qw(TBSetSiteVar TBOPSPID DBQueryFatal);
use User;
use Project;
use Experiment;
use OSinfo;
if ($UID != 0) {
......@@ -319,6 +321,20 @@ if (!defined($sslcert)) {
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.
#
......
Supports Markdown
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