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

Andrew Beekhof beekhof at gmail.com
Tue Apr 14 04:34:11 EDT 2009


Same for IPaddr2?

On Tue, Apr 14, 2009 at 10:14, Simon Horman <horms at verge.net.au> wrote:
> 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.
>
> 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:09:07 2009 +1000
> @@ -33,7 +33,7 @@
>
>  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"]},
> +       "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","nic","cidr_netmask","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"]},
>
> _______________________________________________
> Pacemaker mailing list
> Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>




More information about the Pacemaker mailing list