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
ff45a497
Commit
ff45a497
authored
Aug 23, 2017
by
Leigh B Stoller
Browse files
Replace card with iface in wires join, use card from wires table.
parent
801acc25
Changes
1
Hide whitespace changes
Inline
Side-by-side
tmcd/tmcd.c
View file @
ff45a497
...
...
@@ -2072,13 +2072,15 @@ COMMAND_PROTOTYPE(doifconfig)
/*
* Find all the interfaces.
*/
res = mydb_query("select
i
.card,i.IP,i.MAC,i.current_speed,"
res = mydb_query("select
w
.card
1
,i.IP,i.MAC,i.current_speed,"
" i.duplex,i.IPaliases,i.iface,i.role,i.mask,"
" i.rtabid,i.interface_type,vl.vname "
" from interfaces as i "
"left join virt_lans as vl on "
" vl.pid='%s' and vl.eid='%s' and "
" vl.vnode='%s' and vl.ip=i.IP "
"left join wires as w on "
" w.node_id1=i.node_id and w.iface1=i.iface "
"where i.node_id='%s' and %s",
12, reqp->pid, reqp->eid, reqp->nickname,
reqp->issubnode ? reqp->nodeid : reqp->pnodeid,
...
...
@@ -8860,7 +8862,7 @@ COMMAND_PROTOTYPE(doixpconfig)
"left join interfaces as i1 on i1.node_id=n.node_id "
" and i1.role='ctrl' "
"left join interfaces as i2 on i2.node_id='%s' "
" and i2.
card=i1.card
"
" and i2.
iface=i1.iface
"
"where n.node_id='%s'",
5, reqp->pnodeid, reqp->nodeid);
...
...
@@ -12644,11 +12646,11 @@ COMMAND_PROTOTYPE(dohwinfo)
* - Infiniband (guid != NULL) interfaces. We need support on
* the client side before we start sending those over.
*/
res = mydb_query("select mac from interfaces where "
res = mydb_query("select mac
,iface
from interfaces where "
" mac not like '000000%%' and "
" role!='mngmnt' and guid is NULL and "
" node_id='%s' order by
card
",
1
, reqp->nodeid);
" node_id='%s' order by
iface
",
2
, reqp->nodeid);
if (!res) {
error("dohwinfo: %s: DB Error getting NET attributes!\n",
reqp->nodeid);
...
...
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