Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
8488ed3b
Commit
8488ed3b
authored
Aug 15, 2016
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Watch for a local experiment of the same name when the target cluster
is the local cluster. This closes issue
#114
.
parent
908818a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
apt/create_instance.in
apt/create_instance.in
+8
-2
No files found.
apt/create_instance.in
View file @
8488ed3b
...
...
@@ -89,8 +89,10 @@ my $UPDATEGENIUSER= "$TB/sbin/protogeni/updategeniuser";
my
$STITCHER
=
"
$TB
/gcf/src/stitcher.py
";
my
$OPENSSL
=
"
/usr/bin/openssl
";
my
$MANAGEINSTANCE
=
"
$TB
/bin/manage_instance
";
my
$MANAGEDATASET
=
"
$TB
/bin/manage_dataset
";
my
$DEFAULT_URN
=
"
urn:publicid:IDN+
$OURDOMAIN
+authority+cm
";
my
$GUEST_URN
=
"
urn:publicid:IDN+apt.emulab.net+authority+cm
";
my
$PROTOGENI_LOCALUSER
=
@PROTOGENI_LOCALUSER@
;
my
$default_aggregate_urn
=
$DEFAULT_URN
;
# un-taint path
...
...
@@ -112,6 +114,7 @@ use APT_Instance;
use
APT_Geni
;
use
APT_Dataset
;
use
APT_Aggregate
;
use
Experiment
;
use
User
;
use
Project
;
use
Group
;
...
...
@@ -638,9 +641,12 @@ my $SERVER_NAME = (exists($ENV{"SERVER_NAME"}) ? $ENV{"SERVER_NAME"} : "");
#
# Make sure slice is unique. Probably retry here at some point.
#
if
(
GeniSlice
->
Lookup
(
$slice_hrn
)
||
GeniSlice
->
Lookup
(
$slice_urn
))
{
if
(
GeniSlice
->
Lookup
(
$slice_hrn
)
||
GeniSlice
->
Lookup
(
$slice_urn
)
||
(
$PROTOGENI_LOCALUSER
&&
(
grep
{
$_
eq
$DEFAULT_URN
}
@aggregate_urns
)
&&
Experiment
->
Lookup
(
$project
->
pid
(),
$userslice_id
)))
{
if
(
defined
(
$userslice_id
))
{
UserError
("
Slice
name already in use, please use another. If you
"
.
UserError
("
Experiment
name already in use, please use another. If you
"
.
"
just terminated an experiment with this name, it takes a
"
.
"
minute or two for the name to become available again.
");
}
...
...
Write
Preview
Markdown
is supported
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