Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
352c4994
Commit
352c4994
authored
May 19, 2016
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug that was allowing unknown aggregate urns to throw an ungraceful
error.
parent
e8c37a66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
apt/create_instance.in
apt/create_instance.in
+12
-7
No files found.
apt/create_instance.in
View file @
352c4994
...
...
@@ -111,6 +111,7 @@ use APT_Profile;
use
APT_Instance
;
use
APT_Geni
;
use
APT_Dataset
;
use
APT_Aggregate
;
use
User
;
use
Project
;
use
Group
;
...
...
@@ -743,6 +744,17 @@ if ($instance->GetSSHKeys(\$sshkeys) < 0 || !@{$sshkeys}) {
# We use this list of references for ParRun below.
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
())
{
UserError
("
Only administrators may use
$aggregate_urn
");
}
my
$authority
=
GeniAuthority
->
Lookup
(
$aggregate_urn
);
if
(
!
defined
(
$authority
))
{
$authority
=
GeniAuthority
->
CreateFromRegistry
("
cm
",
$aggregate_urn
);
...
...
@@ -754,13 +766,6 @@ foreach my $aggregate_urn (@aggregate_urns) {
if
(
!
defined
(
$aggobj
))
{
fatal
("
Could not create aggregate object for
$aggregate_urn
");
}
# Check for disabled/adminonly aggregates.
if
(
$aggobj
->
disabled
())
{
UserError
("
$aggregate_urn
is currently offline, try again later
");
}
if
(
$aggobj
->
adminonly
())
{
UserError
("
Only administrators may use
$aggregate_urn
");
}
$aggobj
->
_authority
(
$authority
);
push
(
@aggregate_list
,
$aggobj
);
}
...
...
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