[Pacemaker] [patch v2] nic and netmask are swapped by haresources2cib.py

Simon Horman horms at verge.net.au
Tue Apr 14 08:48:32 UTC 2009


Hi,

this patch fixes a problem reported by Thomas Liske whereby
haresources2cib.py swaps the values of netmask and nic.

As per Thomas's original email, found at http://bugs.debian.org/520898

The haresources file contains:

foo w.x.y.z/25/eth0:1 drbdisk::r0 [..]

Running ../haresources2cib.py --stdout -c ha.cf haresources creates
the following IPaddr resource:

<primitive class="ocf" id="IPaddr_w_x_y_z" provider="heartbeat" type="IPaddr">
    <operations>
        <op id="IPaddr_w_x_y_z_mon" interval="5s" name="monitor" timeout="5s"/>
    </operations>
    <instance_attributes id="IPaddr_w_x_y_z_inst_attr">
        <attributes>
            <nvpair id="IPaddr_w_x_y_z_attr_0" name="ip" value="w.x.y.z"/>
            <nvpair id="IPaddr_w_x_y_z_attr_1" name="nic" value="25"/>
            <nvpair id="IPaddr_w_x_y_z_attr_2" name="cidr_netmask"
+value="eth0:1"/>
        </attributes>
    </instance_attributes>
</primitive>

The nic and cidr_netmask attributes are obviously swaped.

And as subsequently pointed out by Andrew Beekhof, this
affects IPaddr2 as well as IPaddr.

Cc: Andrew Beekhof <beekhof at gmail.com>
Cc: Thomas Liske <liske at ibh.de
Signed-off-by: Simon Horman <horms at verge.net.au>

diff -r 7499efa9c2a3 tools/haresources2cib.py.in
--- a/tools/haresources2cib.py.in	Wed Jan 07 15:02:59 2009 +0100
+++ b/tools/haresources2cib.py.in	Tue Apr 14 18:46:34 2009 +1000
@@ -33,8 +33,8 @@
 
 ocf_ra_setting = {
 	"apache"    :{"params":["configfile","httpd","port","statusurl","options","testregex"],"time":["120s","60s"]},
-	"IPaddr"    :{"params":["ip","nic","cidr_netmask","broadcast","iflabel","lvs_support","local_stop_script","local_start_script","ARP_INTERVAL_MS","ARP_REPEAT","ARP_BACKGROUND","ARP_NETMASK"],"time":["5s","5s"]},
-	"IPaddr2"   :{"params":["ip","nic","cidr_netmask","broadcast","iflabel","lvs_support","mac","clusterip_hash","arp_interval","arp_count","arp_bg","arp_mac"],"time":["5s","5s"]},
+	"IPaddr"    :{"params":["ip","cidr_netmask","nic","broadcast","iflabel","lvs_support","local_stop_script","local_start_script","ARP_INTERVAL_MS","ARP_REPEAT","ARP_BACKGROUND","ARP_NETMASK"],"time":["5s","5s"]},
+	"IPaddr2"   :{"params":["ip","cidr_netmask","nic","broadcast","iflabel","lvs_support","mac","clusterip_hash","arp_interval","arp_count","arp_bg","arp_mac"],"time":["5s","5s"]},
 	"db2"       :{"params":["instance","admin"],"time":["120s","60s"]},
 	"oracle"    :{"params":["sid","home","user","ipcrm"],"time":["120s","60s"]},
 	"oralsnr"   :{"params":["sid","home","user","listener"],"time":["120s","60s"]},




More information about the Pacemaker mailing list