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
8cc582f4
Commit
8cc582f4
authored
Feb 15, 2017
by
Leigh B Stoller
Browse files
Fix case where an error leave a partially created instance record
behind that is locked and cannot be terminated.
parent
5ff295a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
apt/create_instance.in
View file @
8cc582f4
...
...
@@ -886,14 +886,20 @@ my @aggregate_list = ();
foreach
my
$aggregate_urn
(
@aggregate_urns
)
{
my
$aptaggregate
=
APT_Aggregate
->
Lookup
(
$aggregate_urn
);
if
(
!
defined
(
$aptaggregate
))
{
$slice
->
Delete
();
$instance
->
Delete
();
UserError
("
$aggregate_urn
is not a valid (known) aggregate
");
}
# Check for disabled/adminonly aggregates.
if
(
$aptaggregate
->
disabled
())
{
$slice
->
Delete
();
$instance
->
Delete
();
UserError
("
$aggregate_urn
is currently offline, try again later
");
}
if
(
$aptaggregate
->
adminonly
()
&&
!
(
defined
(
$this_user
)
&&
$this_user
->
IsAdmin
()))
{
$slice
->
Delete
();
$instance
->
Delete
();
UserError
("
Only administrators may use
$aggregate_urn
");
}
my
$authority
=
GeniAuthority
->
Lookup
(
$aggregate_urn
);
...
...
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