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
2188ab09
Commit
2188ab09
authored
Aug 05, 2002
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix up query used when user selects specific types; do not consider
nodes that are down.
parent
921dad88
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
tbsetup/wanassign.in
tbsetup/wanassign.in
+11
-2
No files found.
tbsetup/wanassign.in
View file @
2188ab09
...
...
@@ -124,6 +124,10 @@ my $wa_plr_solverweight = 500.0;
# The BOSS name in the widearea info tables.
my
$boss
=
TBDB_WIDEAREA_LOCALNODE
;
# Nodes reserved out.
my
$DEADPID
=
NODEDEAD_PID
();
my
$DEADEID
=
NODEDEAD_EID
();
#
# A node record (poor man struct). We create a hashed array of these,
# indexed by the vnode name.
...
...
@@ -437,13 +441,18 @@ if ($typecount || $classcount == $fixedcount) {
}
#
# This query gets free nodes for the choosen type.
# This query gets free nodes for the choosen type, but leaves out
# any that are mapped to dead nodes or nodes that are in hwdown.
#
$query_result
=
DBQueryFatal
("
select a.node_id from nodes as a
"
.
"
left join reserved as b on a.node_id=b.node_id
"
.
"
left join reserved as m on a.phys_nodeid=m.node_id
"
.
"
left join nodes as n on a.phys_nodeid=n.node_id
"
.
"
where b.node_id is null and a.type='
$type
'
"
.
"
where b.node_id is null and a.type='
$type
' and
"
.
"
(n.status='up' and
"
.
"
(m.node_id is null or
"
.
"
m.pid!='
$DEADPID
' or m.eid!='
$DEADEID
'))
"
.
"
$omit
"
.
"
order by RAND() limit
$count
");
if
(
$query_result
->
numrows
!=
$count
)
{
...
...
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