diff --git a/src/inc/slave_actions.php b/src/inc/slave_actions.php index c0f530d27eb785d3caa5551bd7d7734007bd7c1a..2481c00fc9ffab67cb779e441eb0d61ca200e434 100644 --- a/src/inc/slave_actions.php +++ b/src/inc/slave_actions.php @@ -1341,7 +1341,7 @@ $pxe_server_ipaddr $pxe_server_hostname $other_host_hostname = str_replace("." . $cluster_domain, "", $other_host_fqdn); $other_host_id = $other_host["id"]; - $q_oh = "SELECT INET_NTOA(ips.ip) AS addr FROM networks, ips WHERE ips.machine='$other_host_id' AND networks.cluster='$machine_cluster' AND networks.id=ips.network LIMIT 1"; + $q_oh = "SELECT INET_NTOA(ips.ip) AS addr FROM networks, ips WHERE ips.machine='$other_host_id' AND networks.cluster='$machine_cluster' AND networks.id=ips.network order by case when role='all' then 1 when role='vm-net' then 2 when role='ceph-cluster' then 3 else 9 end LIMIT 1"; $r_oh = mysqli_query($con, $q_oh); $n_oh = mysqli_num_rows($r_oh); if($n_oh == 1){