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
b03e364e
Commit
b03e364e
authored
Dec 16, 2015
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a check to see if X number of public IPs are available. This is an
unlocked checked, used in the Geni getticket() routine.
parent
0d2c7967
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
db/Node.pm.in
db/Node.pm.in
+16
-0
No files found.
db/Node.pm.in
View file @
b03e364e
...
...
@@ -4023,5 +4023,21 @@ sub OnRemoteNode($)
return
$
physhost
->
isremotenode
();
}
#
#
Quick
check
to
see
if
we
have
routable
IPs
addresses
free
.
#
sub
HaveRoutableIPs
($$)
{
my
($
class
,
$
needed
)
=
@
_
;
my
$
query_result
=
DBQueryWarn
(
"select count(ip) from virt_node_public_addr "
.
"where node_id is null and eid is null"
);
return
0
if
(
!$query_result || $query_result->numrows < $needed);
return
1
;
}
#
_Always_
make
sure
that
this
1
is
at
the
end
of
the
file
...
1
;
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