Hi,

I'm trying to write OCF script for Redis
(http://code.google.com/p/redis/). I need two nodes and master-slave
behavior. My cib.xml looks like this:

<configuration>
  <crm_config>
    <cluster_property_set id="cib-bootstrap-options">
      <nvpair id="cib-bootstrap-options-dc-version" name="dc-version"
value="1.0.4-2ec1d189f9c23093bf9239a980534b661baf782d"/>
      <nvpair id="cib-bootstrap-options-cluster-infrastructure"
name="cluster-infrastructure" value="openais"/>
      <nvpair id="cib-bootstrap-options-expected-quorum-votes"
name="expected-quorum-votes" value="1"/>
      <nvpair id="cib-bootstrap-options-last-lrm-refresh"
name="last-lrm-refresh" value="1268384033"/>
      <nvpair id="cib-bootstrap-options-stonith-enabled"
name="stonith-enabled" value="false"/>
    </cluster_property_set>
  </crm_config>
  <nodes>
    <node id="noc-test-10" uname="noc-test-10" type="normal"/>
    <node id="noc-test-20" uname="noc-test-20" type="normal"/>
  </nodes>

  <resources>
    <master id="redis">
      <meta_attributes id="redis-meta_attributes">
        <nvpair id="redis-clone-max" name="clone-max" value="2"/>
        <nvpair id="redis-notify" name="notify" value="false"/>
        <nvpair id="redis-globally-unique" name="globally-unique"
value="false"/>
        <nvpair id="redis-target-role" name="target-role" value="Master"/>
        <nvpair id="redis-master-max" name="master-max" value="1"/>
      </meta_attributes>
      <primitive class="ocf" id="redis-master" provider="linbit"
type="redis-master">
        <meta_attributes id="redis-meta-1">
          <nvpair id="redis-failure-timeout" name="failure-timeout" value="1s"/>
        </meta_attributes>

        <operations>
          <op id="redis-monitor-master" interval="19s" name="monitor"
role="Master" timeout="20s"/>
          <op id="redis-monitor-slave" interval="10s" name="monitor"
role="Slave" timeout="20s"/>
          <op id="redis-start" name="start" interval="0" timeout="10m"/>
          <op id="redis-stop" name="stop" interval="0" timeout="10s"/>
        </operations>
      </primitive>
    </master>
  </resources>
  <constraints/>
</configuration>

I set master-max to 1, so there should be only one master node, but
after promoting first node Pacemaker keeps trying to promote second
node. Redis doesn't support master-master replication, so my scripts
exits with 1 in that case. Should it exit with some other value or
rather there is something wrong with my config? The latter I suppose,
since after first promote on second node, the monitor never gets
called. Just promote over and over againg.

My system:

Distributor ID: Debian
Description:    Debian GNU/Linux 5.0.2 (lenny)

Package: openais-legacy
Version: 0.80.5+svn20090606-1~bpo50+1
Architecture: amd64

Package: pacemaker-openais
Source: pacemaker
Version: 1.0.4.1+hg20090606-1~bpo50+1


-- 
Maciej Lotkowski
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to