[Linux-HA] <no subject>

Dejan Muhamedagic dejanmm at fastmail.fm
Fri Jun 19 07:29:51 MDT 2009


Hi,

On Thu, Jun 18, 2009 at 10:01:17AM -0500, David Hoskinson wrote:
> Hello list, I almost have my configuration working however I am stuck at the
> final steps.  Background is that this will be a mail cluster running
> postfix, amavisd, clamd, and spamassassin.  I am able to mount the drbd
> drive on the primary machine, bring up the ip address and filesystem and
> start the postfix service.  However when I add the next service, amavisd as
> shown in pound signs below, it breaks where the filesystem does not mount,
> the address does not start and postfix and amavis do not start.  I get the
> following messages when running crm_mon and crm_verify.

Did you test all your resources? Check for the output from
resource agents (grep lrmd) and see if they return correct exit
codes, i.e. if they can start/stop properly.

> ============
> Last updated: Wed Jun 17 16:38:23 2009
> Current DC: test1 (587adf74-2ae3-48b9-8449-d25bc0a1b511)
> 2 Nodes configured.
> 2 Resources configured.
> ============
> 
> Node: test1 (587adf74-2ae3-48b9-8449-d25bc0a1b511): online
> Node: test2 (a951b3e6-5704-479b-a36f-1728519eecca): online
> 
> Master/Slave Set: drbd0
>     drbd-mail:0    (heartbeat::ocf:drbd):    Started test1
>     drbd-mail:1    (heartbeat::ocf:drbd):    Master test2
> Resource Group: group_srv-clu-1
>     IPaddr_252    (heartbeat::ocf:IPaddr2):   Started test1
>     Filesystem-mail    (heartbeat::ocf:Filesystem):    Stopped
>     Process-postfix    (lsb:postfix):    Stopped
>     Process-amavisd    (lsb:amavisd):    Stopped
> [root at test1 crm]# crm_verify -LV
> crm_verify[16844]: 2009/06/17_16:38:33 WARN: native_color: Resource
> Filesystem-mail cannot run anywhere
> Warnings found during check: config may not be valid
> 
> I believe it has to do with my colocation statements at the end for amavisd
> which I show with the pound sign which I gathered from some examples, but
> don?t totally understand.  Here is my cib.xml file (sanitized)
> 
> 
>  <cib admin_epoch="0" epoch="1" have_quorum="true" ignore_dtd="false"
> num_peers="0" cib_feature_revision="2.0" generated="false" num_updates="146"
> cib-last-written="Wed Jun 17 16:28:41 2009" ccm_transition="2">
>    <configuration>
>      <crm_config>
>        <cluster_property_set id="cib-bootstrap-options">
>          <attributes>
>            <nvpair id="cib-bootstrap-options-dc-version" name="dc-version"
> value="2.1.3-node: 552305612591183b1628baa5bc6e903e0f1e26a3"/>
>          </attributes>
>        </cluster_property_set>
>      </crm_config>
>      <nodes>
>        <node id="587adf74-2ae3-48b9-8449-d25bc0a1b511" uname="test1"
> type="normal"/>
>        <node id="a951b3e6-5704-479b-a36f-1728519eecca" uname="test2"
> type="normal"/>
>      </nodes>
>      <resources>
>        <master_slave id="drbd0">
>          <meta_attributes id="ma-drbd0">
>            <attributes>
>              <nvpair id="ma-drbd0-1" name="clone_max" value="2"/>
>              <nvpair id="ma-drbd0-2" name="clone_node_max" value="1"/>
>              <nvpair id="ma-drbd0-3" name="master_max" value="1"/>
>              <nvpair id="ma-drbd0-4" name="master_node_max" value="1"/>
>              <nvpair id="ma-drbd0-5" name="notify" value="yes"/>
>              <nvpair id="ma-drbd0-6" name="globally_unique" value="false"/>
>              <nvpair id="ma-drbd0-7" name="target_role" value="started"/>
>            </attributes>
>          </meta_attributes>
>          <primitive id="drbd-mail" class="ocf" provider="heartbeat"
> type="drbd">
>            <instance_attributes id="ia-drbd-mail">
>              <attributes>
>                <nvpair id="ia-drbd-mail-1" name="drbd_resource" value="r0"/>
>              </attributes>
>            </instance_attributes>
>            <operations>
>              <op id="drbd-mail-monitor-1" name="monitor" interval="20s"
> timeout="10s" role="Master" start_delay="10s"/>
>              <op id="drbd-mail-monitor-2" name="monitor" interval="21s"
> timeout="10s" role="Slave" start_delay="10s"/>
>            </operations>
>          </primitive>
>        </master_slave>
>        <group id="group_srv-clu-1">
>          <primitive id="IPaddr_252" class="ocf" type="IPaddr2"
> provider="heartbeat">
>            <instance_attributes id="ia-IPaddr_252">
>              <attributes>
>                <nvpair id="ia_ip_252" name="ip" value="10.1.1.1"/>
>                <nvpair id="ia_nic_252" name="nic" value="eth1"/>
>                <nvpair id="ia_netmask_252" name="netmask"
> value="10.1.1.255"/>
>              </attributes>
>            </instance_attributes>
>          </primitive>
>          <primitive class="ocf" provider="heartbeat" type="Filesystem"
> id="Filesystem-mail">
>            <meta_attributes id="ma-Filesystem-mail">
>              <attributes>
>                <nvpair name="target_role" id="ma-Filesystem-mail-1"
> value="started"/>
>              </attributes>
>            </meta_attributes>
>            <instance_attributes id="ia-Filesystem-mail">
>              <attributes>
>                <nvpair id="ia-fs0-1" name="fstype" value="ext3"/>
>                <nvpair id="ia-fs0-2" name="directory" value="/shared"/>
>                <nvpair id="ia-fs0-3" name="device" value="/dev/drbd0"/>
>              </attributes>
>            </instance_attributes>
>          </primitive>
>          <primitive id="Process-postfix" class="lsb" provider="heartbeat"
> type="postfix">
>            <operations>
>              <op id="postfix-id" name="monitor" interval="10s"
> timeout="10s"/>
>            </operations>
>          </primitive>
> #         <primitive id="Process-amavisd" class="lsb" provider="heartbeat"
> type="amavisd">

There's no provider for class lsb. Though I think that the
cluster can tolerate this too.

> #           <operations>
> #             <op id="amavisd-id" name="monitor" interval="10s"
> timeout="10s"/>
> #           </operations>
> #         </primitive>
>        </group>
>      </resources>
>      <constraints>
>        <rsc_location id="run_group_srv-clu-1_resource"
> rsc="group_srv-clu-1">
>          <rule id="pref_run_group_srv-clu-1_resource" score="100">
>            <expression id="rsc_grp_srv-clu-1" attribute="#uname"
> operation="eq" value="test1"/>
>          </rule>
>        </rsc_location>
>        <rsc_location id="drbd0-placement-1" rsc="drbd0">
>          <rule id="drbd0-rule-1" score="100">
>            <expression id="rsc_drbd0" attribute="#uname" operation="eq"
> value="test1"/>
>          </rule>
>        </rsc_location>

You need only one location constraint. The other resource (or group)
should follow because of the collocation. I think it's better to
remove the drbd0 location constraint.

>        <rsc_order id="drbd0_before_Filesystem-mail" from="Filesystem-mail"
> action="start" to="drbd0" to_action="promote"/>
>        <rsc_colocation id="Filesystem-mail_on_drbd0" to="drbd0"
> to_role="master" from="Filesystem-mail" score="infinity"/>

OK. Use upper case for infinity. Not sure if lower case works.

>        <rsc_colocation id="Process-postfix_tie_Filesystem-mail"
> to="Process-postfix" from="Filesystem-mail" score="infinity"/>
> #       <rsc_colocation id="Process-amavisd_tie_Filesystem-mail"
> to="Process-amavisd" from="Filesystem-mail" score="infinity"/>

These are already in a group, so no constraints necessary.

Thanks,

Dejan

>      </constraints>
>    </configuration>
>  </cib>
> 
> Any help would be appreciated and thanks....
> 
> _______________________________________________
> 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