Commit ef8a7704 authored by Robert Ricci's avatar Robert Ricci
Browse files

To get a virtual node's interfaces, we need to join on n.phys_nodeid,

not n.node_id.
parent a74dcc6a
......@@ -140,7 +140,7 @@ my $db_result =
DBQueryFatal("select n.node_id, n.role, n.jailip, i.IP, i.role ".
" from nodes as n ".
"left join node_types as nt on n.type=nt.type ".
"left join interfaces as i on n.node_id=i.node_id ".
"left join interfaces as i on n.phys_nodeid=i.node_id ".
"where (n.role='testnode' or n.role='virtnode') ".
" and (i.IP is not null or n.jailip is not null) ".
" and (i.card is null or i.card=nt.control_net " .
......@@ -164,7 +164,7 @@ while (my @row = $db_result->fetchrow_array()) {
# For most nodes, we get the IP address from the interfaces table; but, for
# virtual nodes, we get it from the jailip column
#
if (!$IP) {
if (defined($jailIP)) {
$IP = $jailIP;
}
if (!$IP) {
......
Markdown is supported
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