Commit f2e7e6f3 authored by Gary Wong's avatar Gary Wong

Fix Node::HaveRoutableIPs.

It was checking the count of database rows (which would always have
been 1), not the count of free addresses.
parent b15035d0
......@@ -4093,7 +4093,11 @@ sub HaveRoutableIPs($$)
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);
if (!$query_result || $query_result->numrows < 1);
my( $count ) = $query_result->fetchrow_array();
return 0
if( $count < $needed );
return 1;
}
......
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