Package: openstack-cluster-installer
Version: 42.3.0~bpo12+1
Tags: patch

When using a dedicated ceph-cluster network, puppet fails to determine
a node's Ceph IP. This is due to the SQL SELECT query including the
following impossible combination:

networks.role='ceph-cluster' AND networks.role='ipmi'

Patch attached.

--

Regards
Jim
diff --git a/src/inc/enc.php b/src/inc/enc.php
index 2b116576..e187e2bb 100644
--- a/src/inc/enc.php
+++ b/src/inc/enc.php
@@ -2906,8 +2906,8 @@ function puppet_enc($con,$conf){
             $enc_file .= "      ceph_mon_initial_members: " . $ret["data"]["osd_members"] . "\n";
             $enc_file .= "      ceph_mon_host: " . $ret["data"]["osd_ips"] . "\n";
 
-            // Get the IP for the cluster network.
-            $q = "SELECT machines.hostname AS hostname, INET_NTOA(ips.ip) AS ipaddr, networks.mtu AS mtu, networks.ip AS networkaddr, networks.cidr AS networkcidr FROM machines, ips, networks WHERE machines.id='$machine_id' AND machines.cluster='$cluster_id' AND machines.id=ips.machine AND ips.network=networks.id AND networks.is_public='no' AND networks.role='ceph-cluster' AND networks.role='ipmi'";
+            // Get the IP for the Ceph network.
+            $q = "SELECT machines.hostname AS hostname, INET_NTOA(ips.ip) AS ipaddr, networks.mtu AS mtu, networks.ip AS networkaddr, networks.cidr AS networkcidr FROM machines, ips, networks WHERE machines.id='$machine_id' AND machines.cluster='$cluster_id' AND machines.id=ips.machine AND ips.network=networks.id AND networks.is_public='no' AND networks.role='ceph-cluster'";
             $r = mysqli_query($con, $q);
             if($r === FALSE){
                 $json["status"] = "error";

Reply via email to