[ClusterLabs] Fwd: Resource failure

Vijay Partha vijaysarathy94 at gmail.com
Mon Jul 27 01:35:13 EDT 2015


HI .

My configuration file looks like this:

<cib crm_feature_set="3.0.9" validate-with="pacemaker-2.0" epoch="38"
num_updates="0" admin_epoch="0" cib-last-written="Fri Jul 24 15:57:06 2015"
have-quorum="1" dc-uuid="node2">
  <configuration>
    <crm_config>
      <cluster_property_set id="cib-bootstrap-options">
        <nvpair id="cib-bootstrap-options-dc-version" name="dc-version"
value="1.1.11-97629de"/>
        <nvpair id="cib-bootstrap-options-cluster-infrastructure"
name="cluster-infrastructure" value="cman"/>
        <nvpair id="cib-bootstrap-options-stonith-enabled"
name="stonith-enabled" value="false"/>
        <nvpair id="cib-bootstrap-options-no-quorum-policy"
name="no-quorum-policy" value="ignore"/>
        <nvpair id="cib-bootstrap-options-cluster-recheck-interval"
name="cluster-recheck-interval" value="2s"/>
      </cluster_property_set>
    </crm_config>
    <nodes>
      <node id="node1" uname="node1"/>
      <node id="node2" uname="node2"/>
    </nodes>
    <resources>
      <primitive class="ocf" id="my_first_svc" provider="heartbeat"
type="Dummy">
        <instance_attributes id="my_first_svc-instance_attributes"/>
        <operations>
          <op id="my_first_svc-start-timeout-20" interval="0s" name="start"
timeout="20"/>
          <op id="my_first_svc-stop-timeout-20" interval="0s" name="stop"
timeout="20"/>
          <op id="my_first_svc-monitor-interval-120s" interval="120s"
name="monitor"/>
        </operations>
      </primitive>
      <primitive class="ocf" id="WebSite" provider="heartbeat"
type="apache">
        <instance_attributes id="WebSite-instance_attributes">
          <nvpair id="WebSite-instance_attributes-configfile"
name="configfile" value="/etc/httpd/conf/httpd.conf"/>
          <nvpair id="WebSite-instance_attributes-statusurl"
name="statusurl" value="http://localhost/server-status"/>
        </instance_attributes>
        <operations>
          <op id="WebSite-start-timeout-40s" interval="0s" name="start"
timeout="40s" on-fail="restart"/>
          <op id="WebSite-stop-timeout-60s" interval="0s" name="stop"
timeout="60s" on-fail="restart"/>
          <op id="WebSite-monitor-interval-1min" interval="1min"
name="monitor" on-fail="restart"/>
        </operations>
        <meta_attributes id="WebSite-meta_attributes"/>
      </primitive>
    </resources>
    <constraints>
      <rsc_location id="location-WebSite-node2-50" node="node2"
rsc="WebSite" score="50"/>
  </constraints>
    <rsc_defaults>
      <meta_attributes id="rsc_defaults-options">
        <nvpair id="rsc_defaults-options-migration-threshold"
name="migration-threshold" value="1"/>
      </meta_attributes>
    </rsc_defaults>
    <op_defaults>
      <meta_attributes id="op_defaults-options">
        <nvpair id="op_defaults-options-timeout" name="timeout"
value="240s"/>
      </meta_attributes>
    </op_defaults>
  </configuration>
</cib>

Once i stop the httpd service the pacemaker does not restarts it
automatically.



On Mon, Jul 27, 2015 at 1:40 AM, Digimer <lists at alteeve.ca> wrote:

> You will find people can help you better if you share your config and
> relevant log entries.
>
> On 26/07/15 03:46 PM, Vijay Partha wrote:
> > hi Victor,
> >
> > thank you for your reply.I tried doing this but this doesnt work.
> >
> > On Sun, Jul 26, 2015 at 12:43 PM, Victor José Acosta Domínguez
> > <vic.ad94 at gmail.com <mailto:vic.ad94 at gmail.com>> wrote:
> >
> >     Hi Vijay, you most set the option "on-fail=restart".
> >
> >     in RedHat with pcs the commando will be "pcs resource update
> >     <resource> op on-fail=restart
> >
> >     i hope this works for you
> >
> >     Victor Acosta
> >
> >
> >     2015-07-26 15:38 GMT-04:00 Vijay Partha <vijaysarathy94 at gmail.com
> >     <mailto:vijaysarathy94 at gmail.com>>:
> >
> >
> >         ---------- Forwarded message ----------
> >         From: *Vijay Partha* <vijaysarathy94 at gmail.com
> >         <mailto:vijaysarathy94 at gmail.com>>
> >         Date: Sun, Jul 26, 2015 at 12:27 PM
> >         Subject: Resource failure
> >         To: pacemaker at oss.clusterlabs.org
> >         <mailto:pacemaker at oss.clusterlabs.org>
> >
> >
> >         Hi.
> >
> >         I have been using pacemaker for quite some time. I want you guys
> >         to help me out with an issue.My node is active and I have an
> >         apache resource running as a resource.If my apache server goes
> >         down, or if i manually kill the httpd service , I want the
> >         pacemaker to automatically restart it. Could you help me out on
> >         how to solve this issue?
> >
> >         Waiting for your reply.
> >         Thanking you
> >
> >         --
> >         With Regards
> >         P.Vijay
> >
> >
> >
> >         --
> >         With Regards
> >         P.Vijay
> >
> >         _______________________________________________
> >         Users mailing list: Users at clusterlabs.org
> >         <mailto:Users at clusterlabs.org>
> >         http://clusterlabs.org/mailman/listinfo/users
> >
> >         Project Home: http://www.clusterlabs.org
> >         Getting started:
> >         http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> >         Bugs: http://bugs.clusterlabs.org
> >
> >
> >
> >     _______________________________________________
> >     Users mailing list: Users at clusterlabs.org <mailto:
> Users at clusterlabs.org>
> >     http://clusterlabs.org/mailman/listinfo/users
> >
> >     Project Home: http://www.clusterlabs.org
> >     Getting started:
> http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> >     Bugs: http://bugs.clusterlabs.org
> >
> >
> >
> >
> > --
> > With Regards
> > P.Vijay
> >
> >
> > _______________________________________________
> > Users mailing list: Users at clusterlabs.org
> > http://clusterlabs.org/mailman/listinfo/users
> >
> > Project Home: http://www.clusterlabs.org
> > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> > Bugs: http://bugs.clusterlabs.org
> >
>
>
> --
> Digimer
> Papers and Projects: https://alteeve.ca/w/
> What if the cure for cancer is trapped in the mind of a person without
> access to education?
>
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://clusterlabs.org/mailman/listinfo/users
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
>



-- 
With Regards
P.Vijay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20150727/b4f83d45/attachment-0003.html>


More information about the Users mailing list