Commit 8cc582f4 authored by Leigh B Stoller's avatar 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
......@@ -886,14 +886,20 @@ my @aggregate_list = ();
foreach my $aggregate_urn (@aggregate_urns) {
my $aptaggregate = APT_Aggregate->Lookup($aggregate_urn);
if (!defined($aptaggregate)) {
UserError("$aggregate_urn is not a valid (known) aggregate");
# Check for disabled/adminonly aggregates.
if ($aptaggregate->disabled()) {
UserError("$aggregate_urn is currently offline, try again later");
if ($aptaggregate->adminonly() &&
!(defined($this_user) && $this_user->IsAdmin())) {
UserError("Only administrators may use $aggregate_urn");
my $authority = GeniAuthority->Lookup($aggregate_urn);
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