Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
8f1e9aea
Commit
8f1e9aea
authored
Jun 05, 2009
by
Leigh B. Stoller
Browse files
Add oneshot update to create the holding experiment where reserved
nodes live before a ticket is redeemed.
parent
d4417202
Changes
1
Hide whitespace changes
Inline
Side-by-side
protogeni/scripts/update.in
View file @
8f1e9aea
...
...
@@ -30,6 +30,10 @@ my $DBUPDATE = "$TB/sbin/dbupdate";
my
$WAP
=
"
$TB
/sbin/withadminprivs
";
my
$SACERT
=
"
$TB
/etc/genisa.pem
";
my
$CMCERT
=
"
$TB
/etc/genicm.pem
";
my
$geniuserid
=
"
geniuser
";
my
$geniprojid
=
"
GeniSlices
";
my
$SUDO
=
"
/usr/local/bin/sudo
";
my
$BATCHEXP
=
"
$TB
/bin/batchexp
";
# un-taint path
$ENV
{'
PATH
'}
=
'
/bin:/usr/bin:/usr/local/bin:/usr/site/bin
';
...
...
@@ -48,6 +52,7 @@ $| = 1;
use
lib
"
@prefix
@/lib
";
use
libtestbed
;
use
libdb
qw(TBSetSiteVar TBSiteVarExists TBGetSiteVar)
;
use
Experiment
;
use
GeniDB
;
use
GeniCertificate
;
...
...
@@ -108,6 +113,16 @@ sub OneShot()
}
TBSetSiteVar
('
protogeni/cm_uuid
',
$certificate
->
uuid
());
}
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
(
$?
);
}
}
sub
fatal
($)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment