Andrew / Dejan,

Thanks for the quick replies. I'm basically an idiot because I had a bug in my OpenSer ocf file on the backup box. This had nothing to do with linux-ha.

Thanks also to Dejan for pointing out the resource type error and unnecessary colocation constraint. With these three issues addressed, everything is working!

For those who care, the following is my working cib.xml for OpenSer with 2 production IPs.

<cib admin_epoch="1" have_quorum="true" num_peers="1" cib_feature_revision="1.3" ignore_dtd="false" generated="true" ccm_transition="3" dc_uuid="9052abe5-87ee-4400-a008-c5f13205e94b" epoch="21" num_updates="400" cib-last-written="Fri Nov 9 18:22:16 2007">
  <configuration>
    <crm_config>
      <cluster_property_set id="cluster-property-set">
        <attributes>
<nvpair id="short_resource_names" name="short_resource_names" value="true"/> <nvpair id="pe-input-series-max" name="pe-input-series-max" value="-1"/>
        </attributes>
      </cluster_property_set>
    </crm_config>
    <nodes>
<node id="9052abe5-87ee-4400-a008-c5f13205e94b" uname="box01" type="normal"/> <node id="47658455-4da2-48d4-a8da-419b2f93f039" uname="box02" type="normal"/>
    </nodes>
    <resources>
      <group id="IPaddr2_OpenSer_group">
<primitive id="IPaddr2-10.1.53.235" class="ocf" type="IPaddr2" provider="heartbeat">
          <operations>
<op id="ipaddr2-10.1.53.235-monitor" name="monitor" interval="5s" timeout="3s"/>
          </operations>
          <instance_attributes id="IPaddr2-10.1.53.235-attributes">
            <attributes>
<nvpair id="ipaddr2-10.1.53.235-ip" name="ip" value="10.1.53.235"/> <nvpair id="ipaddr2-10.1.53.235-broadcast" name="broadcast" value="10.1.53.255"/> <nvpair id="ipaddr2-10.1.53.235-cidr_netmask" name="cidr_netmask" value="24"/>
            </attributes>
          </instance_attributes>
        </primitive>
<primitive id="IPaddr2-10.1.53.236" class="ocf" type="IPaddr2" provider="heartbeat">
          <operations>
<op id="ipaddr2-10.1.53.236-monitor" name="monitor" interval="5s" timeout="3s"/>
          </operations>
          <instance_attributes id="IPaddr2-10.1.53.236-attributes">
            <attributes>
<nvpair id="ipaddr2-10.1.53.236-ip" name="ip" value="10.1.53.236"/> <nvpair id="ipaddr2-10.1.53.236-broadcast" name="broadcast" value="10.1.53.255"/> <nvpair id="ipaddr2-10.1.53.236-cidr_netmask" name="cidr_netmask" value="24"/>
            </attributes>
          </instance_attributes>
        </primitive>
<primitive id="OpenSer" class="ocf" type="OpenSer" provider="bandwidth.com">
          <operations>
            <op id="openser-start" name="start" timeout="5s"/>
            <op id="openser-stop" name="stop" timeout="3s"/>
<op id="openser-monitor" name="monitor" interval="10s" timeout="3s">
              <instance_attributes id="monitor_10s">
                <attributes>
<nvpair id="openser-monitor-ip" name="ip" value="127.0.0.1"/>
                </attributes>
              </instance_attributes>
            </op>
          </operations>
        </primitive>
      </group>
    </resources>
    <constraints>
      <rsc_location id="OpenSer_resource_location" rsc="OpenSer">
        <rule id="OpenSer_rule" score="100">
<expression id="expression_uname_eq_box01" attribute="#uname" operation="eq" value="box01"/>
        </rule>
      </rsc_location>
    </constraints>
  </configuration>
</cib>







Andrew Beekhof wrote:

The only way I can think that might happen is if either:
 - the cluster didn't think it was running in the first place
 - the OpenSER RA ignored the stop command

Either way it would be the fault of the RA.
Have you tested it with ocf-tester ?



           <op id="openser-start" name="start" timeout="5s"/>
            <op id="openser-stop" name="stop" timeout="3s"/>
<op id="openser-monitor" name="monitor" interval="10s" timeout="3s">
              <instance_attributes id="monitor_10s">
                <attributes>
<nvpair id="openser-monitor-ip" name="ip" value="127.0.0.1"/>
                </attributes>
              </instance_attributes>
            </op>
          </operations>
        </primitive>
      </group>
    </resources>
    <constraints>
      <rsc_location id="IPaddr2_resource_location" rsc="IPaddr2">


Use the resource id for rsc and not the resource type. Also,
since your resources are in a group, then reference the group
instead of the IP address.


>         <rule id="IPaddr2_rule" score="100">
> <expression id="expression_1" attribute="#uname" > operation="eq" value="box01"/>
>         </rule>
>       </rsc_location>
> <rsc_colocation id="same_openser_ip" from="IPaddr2" to="OpenSer" > score="INFINITY"/>

This colocation constraint is not necessary, because both
resources are in a group.


>     </constraints>
>   </configuration>
> </cib>

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to