[Linux-HA] Problem Integrating HA with OpenSips

Dejan Muhamedagic dejanmm at fastmail.fm
Fri Jul 17 02:49:53 MDT 2009


Hi,

On Fri, Jul 17, 2009 at 10:26:45AM +0500, Ahmed Munir wrote:
> Hi all,
> Hoping you are fine. Current I'm working to integrate Linux HA with
> OpenSips. As without integration, both are working fine.
> 
> When I integrate both modules, I'm facing problems. By viewing HA and its
> resources by using crm_mon command, the services of testsip(defined resource
> file for OpenSIPs) are not stable. At a moment testsip *starts* at one node,
> within few seconds it gives status of *failed* and *unmanaged*. Even I've
> created a resource file for HA to integrate it with OpenSips.
> 
> I'm attaching my HA  and OpenSips configuration files, and explain what I'm
> doing in these files as I listing them below;
> 
> *authkeys*
> Where I defined authenticate key for nodes using HA

Shouldn't send this, that's supposed to be secret :)

> *ha.cf*
> Contains configuration of HA
> 
> *cib.xml*

This is probably where your problem is:

          <op id="opensips-start-ha2" name="start" timeout="5s"/>
		  <op id="opensips-stop-ha2" name="stop" timeout="3s"/>

Those timeouts are way too short. But not possible to say for
sure without logs.

Thanks,

Dejan

> Here I'm doing active-active scenario, where I defined 2 resources against
> each node  i.e. 2 nodes configured for 4 resources. 1 resource I'm using is
> IPaddr where I assigned virtual IP against nodes i.e. for node, ha1 IP is
> 192.168.0.184  and node, ha2 IP is 192.168.0.185.On other hand I've created
> another resource by myself is OpenSips / testsip, which is assigned on ha1
> and ha2 nodes.
> 
> *OpenSips*
> 
> This is my custom resource file and I'm calling it from cib.xml. This file
> monitor/checks the status of OpenSIPs and its service get reload every 30
> secs as defined in cib.xml file.
> 
> *testsip*
> 
> This is another my custom resource file. This file checks the status of
> OpenSIPs using sipsak testing tool.
> 
> *opensips.cfg*
> 
> This file is configuration of  OpenSIPs
> 
> *opensipsctlrc*
> 
> This file is using control rules for OpenSIPs.
> 
> *Problem*
> 
> When I call OpenSips resource file in cib.xml, it works fine what I desire
> i.e. it checks and monitors the status of OpenSIPs every 30 secs and
> resources of it are stable enough. On the other hand when  I call testsip
> resource file in cib.xml, problem starts. In every 1-3 secs this resource
> starts, failed, stop and so on but at the end it gives the status
> of unmanaged and failed.
> 
> I verify OpenSips resource file by ocf-tester, where it passes the test as
> well as on testsip as I list it below;
> 
> ocf-tester -n OpenSips_1 -o ip=192.168.0.185
> /usr/lib/ocf/resource.d/heartbeat/testsip
> 
> and for OpenSips
> 
> ocf-tester -n OpenSips_1 -o ip=192.168.0.185
> /usr/lib/ocf/resource.d/heartbeat/OpenSips
> 
> Even I execute sipsak manually it works fine. More than that logs are not
> showing any sort of errors as well.
> 
> 
> 
> Kindly help with this my problem ASAP so I can finish up my task.
> 
> 
> -- 
> Regards,
> 
> Ahmed Munir


>  <cib admin_epoch="0" have_quorum="true" ignore_dtd="false" num_peers="0" cib_feature_revision="2.0" epoch="189" generated="false" num_updates="1928" cib-last-written="Thu Jul 16 13:38:16 2009" ccm_transition="1">
>    <configuration>
>      <crm_config>
>        <cluster_property_set id="cib-bootstrap-options">
>          <attributes>
>            <nvpair id="cib-bootstrap-options-symmetric-cluster" name="symmetric-cluster" value="true"/>
>            <nvpair id="cib-bootstrap-options-no-quorum-policy" name="no-quorum-policy" value="stop"/>
>            <nvpair id="cib-bootstrap-options-default-resource-stickiness" name="default-resource-stickiness" value="0"/>
>            <nvpair id="cib-bootstrap-options-default-resource-failure-stickiness" name="default-resource-failure-stickiness" value="0"/>
>            <nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="false"/>
>            <nvpair id="cib-bootstrap-options-stonith-action" name="stonith-action" value="reboot"/>
>            <nvpair id="cib-bootstrap-options-startup-fencing" name="startup-fencing" value="true"/>
>            <nvpair id="cib-bootstrap-options-stop-orphan-resources" name="stop-orphan-resources" value="true"/>
>            <nvpair id="cib-bootstrap-options-stop-orphan-actions" name="stop-orphan-actions" value="true"/>
>            <nvpair id="cib-bootstrap-options-remove-after-stop" name="remove-after-stop" value="false"/>
>            <nvpair id="cib-bootstrap-options-short-resource-names" name="short-resource-names" value="true"/>
>            <nvpair id="cib-bootstrap-options-transition-idle-timeout" name="transition-idle-timeout" value="5min"/>
>            <nvpair id="cib-bootstrap-options-default-action-timeout" name="default-action-timeout" value="20s"/>
>            <nvpair id="cib-bootstrap-options-is-managed-default" name="is-managed-default" value="true"/>
>            <nvpair id="cib-bootstrap-options-cluster-delay" name="cluster-delay" value="60s"/>
>            <nvpair id="cib-bootstrap-options-pe-error-series-max" name="pe-error-series-max" value="-1"/>
>            <nvpair id="cib-bootstrap-options-pe-warn-series-max" name="pe-warn-series-max" value="-1"/>
>            <nvpair id="cib-bootstrap-options-pe-input-series-max" name="pe-input-series-max" value="-1"/>
>            <nvpair id="cib-bootstrap-options-dc-version" name="dc-version" value="2.1.3-node: 552305612591183b1628baa5bc6e903e0f1e26a3"/>
>          </attributes>
>        </cluster_property_set>
>      </crm_config>
>      <nodes>
>        <node uname="ha1" type="normal" id="e651c120-b9a1-489a-baf7-caf0028ad540">
>          <instance_attributes id="standby-e651c120-b9a1-489a-baf7-caf0028ad540">
>            <attributes>
>              <nvpair name="standby" id="e651c120-b9a1-489a-baf7-caf0028ad540" value="off"/>
>            </attributes>
>          </instance_attributes>
>        </node>
>        <node uname="ha2" type="normal" id="70503c2e-bb4a-48f8-aab3-53696656a4d0">
>          <instance_attributes id="standby-70503c2e-bb4a-48f8-aab3-53696656a4d0">
>            <attributes>
>              <nvpair name="standby" id="70503c2e-bb4a-48f8-aab3-53696656a4d0" value="off"/>
>            </attributes>
>          </instance_attributes>
>        </node>
>      </nodes>
>      <resources>
>        <primitive class="ocf" provider="heartbeat" type="IPaddr" id="IPaddr_1">
>          <operations>
>            <op id="IPaddr_1_mon" interval="10s" name="monitor" timeout="8s"/>
>          </operations>
>          <instance_attributes id="IPaddr_1_inst_attr">
>            <attributes>
>              <nvpair name="ip" value="192.168.0.184" id="IPaddr_1_machine_1"/>
>            </attributes>
>          </instance_attributes>
>        </primitive>
>        <primitive class="ocf" provider="heartbeat" type="IPaddr" id="IPaddr_2">
>          <operations>
>            <op id="IPaddr_2_mon" interval="10s" name="monitor" timeout="8s"/>
>          </operations>
>          <instance_attributes id="IPaddr_2_inst_attr">
>            <attributes>
>              <nvpair name="ip" value="192.168.0.185" id="IPaddr_2_machine_2"/>
>            </attributes>
>          </instance_attributes>
>        </primitive>
>        <primitive class="ocf" type="OpenSips" provider="heartbeat" id="OpenSips_1">
>          <operations>
>            <op id="opensips-start-ha1" name="start" timeout="5s"/>
>            <op id="opensips-stop-ha1" name="stop" timeout="3s"/>
>            <op name="monitor" timeout="10s" id="opensips-monitor-1" interval="30s">
>              <instance_attributes id="ha1-monitor_10s">
>                <attributes>
>                  <nvpair name="ip" id="ha1-opensips-monitor-ip" value="192.168.0.184"/>
>                </attributes>
>              </instance_attributes>
>            </op>
>          </operations>
>        </primitive>
>        <primitive class="ocf" type="OpenSips" provider="heartbeat" id="OpenSips_2">
>          <operations>
>            <op id="opensips-start-ha2" name="start" timeout="5s"/>
>            <op id="opensips-stop-ha2" name="stop" timeout="3s"/>
>            <op name="monitor" timeout="10s" id="opensips-monitor-2" interval="30s">
>              <instance_attributes id="ha2-monitor_10s">
>                <attributes>
>                  <nvpair name="ip" id="ha2-opensips-monitor-ip" value="192.168.0.185"/>
>                </attributes>
>              </instance_attributes>
>            </op>
>          </operations>
>        </primitive>
>      </resources>
>      <constraints>
>        <rsc_location id="OpenSips_resource_location_1" rsc="OpenSips_1">
>          <rule id="rule_ha1" score="100">
>            <expression id="expression_uname_eq_ha1" attribute="#uname" operation="eq" value="ha1"/>
>          </rule>
>        </rsc_location>
>        <rsc_location id="OpenSips_resource_location_2" rsc="OpenSips_2">
>          <rule id="rule_ha2" score="100">
>            <expression id="expression_uname_eq_ha2" attribute="#uname" operation="eq" value="ha2"/>
>          </rule>
>        </rsc_location>
>        <rsc_location id="rsc_location_IPaddr_1" rsc="IPaddr_1">
>          <rule id="prefered_location_IPaddr_1" score="200">
>            <expression attribute="#uname" id="prefered_location_IPaddr_1_expr" operation="eq" value="ha1"/>
>          </rule>
>        </rsc_location>
>        <rsc_location id="rsc_location_IPaddr_2" rsc="IPaddr_2">
>          <rule id="prefered_location_IPaddr_2" score="200">
>            <expression attribute="#uname" id="prefered_location_IPaddr_2_expr" operation="eq" value="ha2"/>
>          </rule>
>        </rsc_location>
>        <rsc_location id="my1_resource1:connected" rsc="IPaddr_1">
>          <rule id="my1_resource1:connected:rule" score_attribute="pingd">
>            <expression id="my1_resource1:connected:expr:defined" attribute="pingd" operation="defined"/>
>          </rule>
>        </rsc_location>
>        <rsc_location id="my2_resource2:connected" rsc="IPaddr_2">
>          <rule id="my2_resource2:connected:rule" score_attribute="pingd">
>            <expression id="my2_resource2:connected:expr:defined" attribute="pingd" operation="defined"/>
>          </rule>
>        </rsc_location>
>      </constraints>
>    </configuration>
>  </cib>






> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems



More information about the Linux-HA mailing list