First of all: Please upgrade to the latest pacemaker software. You'll
have a lot less pain getting things to work and get support here.

Read http://clusterlabs.org/wiki/Install on how to install the new software.

Michael Grant wrote:
> I'm trying to set up heartbeat-2 to manage xen in a drbd device over a
> cluster of 2 servers.
> 
> In the syslog I see this:
> xen-strange^I(heartbeat::ocf:Xen):^IStarted strange.example.org
> Master/Slave Set: drbd_root1
>     c65f6e43-32d4-42cd-a798-691e6f494cc5:0^I(ocf:drbd):^IStarted
> strange.example.org (unmanaged) FAILED
>     c65f6e43-32d4-42cd-a798-691e6f494cc5:1^I(ocf:drbd):^IStarted
> strange.example.org (unmanaged) FAILED
> 
> my drbd resource looks like this:
> 
> <master_slave id="drbd_root1">
>   <instance_attributes>
>     <attributes>
>       <nvpair name="clone_max" value="2"/>
>       <nvpair name="globally_unique" value="true"/>
>       <nvpair name="master_max" value="1"/>
>     </attributes>
>   </instance_attributes>
>  <primitive type="drbd" class="ocf">
>   <instance_attributes id="ia_drbd_root1">
>     <attributes>
>       <nvpair id="at_drbd_root1"
>               name="drbd_resource"
>               value="root1"/>
>      </attributes>
>   </instance_attributes>
>  </primitive>
> </master_slave>
> 
> 
> My xen resource looks like this:
> 
> <resources>
>  <primitive id="xen-strange" class="ocf" type="Xen" provider="heartbeat">
>   <operations>
>    <op id="xen-strange-op01" name="monitor" interval="10s" timeout="60s" 
> prereq=
> "nothing"/>
>    <op id="xen-strange-op02" name="start" timeout="60s" start_delay="0"/>
>    <op id="xen-strange-op03" name="stop" timeout="300s"/>
>  </operations>
>  <instance_attributes id="xen-strange">
>   <attributes>
>    <nvpair id="xen-strange-attr01" name="xmfile" value="/etc/xen/strange.xm"/>
>    <nvpair id="xen-strange-attr02" name="target_role" value="started"/>
>   </attributes>
>  </instance_attributes>
>  <meta_attributes id="xen-strange-meta01">
>   <attributes>
>    <nvpair id="xen-strange-meta-attr01" name="allow_migrate" value="true"/>
>   </attributes>
>  </meta_attributes>
>  </primitive>
> </resources>
> 
> I also have an rsc_order so root1 is started (not mounted, but drbd is
> started primary):
> 
> <rsc_order id="order-root1-strange"
>  from="xen-strange" type="after" to="drbd_root1"/>

You'll also need a colocation for the master role. Upgrade your software
and then refer to this howto: http://www.clusterlabs.org/wiki/DRBD_HowTo_1.0

> I have a working resource named 'root1' in my drbd.conf file, root1 is
> /dev/drbd0.
> 
> Any ideas why my drbd resource is unmanaged?
> 
> I disabled drbd's LSB rc script by removing the symlinks in /etc/rc*.d
> (but not /etc/init.d/drbd itself).  I understand I need to do this to
> let heartbeat manage that instead.
> 
> For Xen, I see 2 lsb scripts: xend and xendomains, which of these (or
> both) must I disable in /etc/rc*.d/?

Only xendomains. Xend needs to be running, otherwise you can't run any
domUs at all I think.

> One thing I noticed is that my domU's name, (the name attr in the
> xen-strange.xm file), must match the primitive id name in the
> resource.  

Afair, the agent reads the domU config file and runs the domU with a
name of the resource's "id". It ignores the "name" configuration in the
domU config file.

> I guess hearbeat uses this and the 'xm list' command to
> know if the domain is running (perhaps not the greatest way to know
> it's health).  Since those names must be unique in the CIB, I
> prepended 'xen-' to the name of my domU, however, this forced me to
> then rename the domU in the .xm file.  Maybe there is some attribute I
> can set in the CIB to tell heartbeat the domU's name rather than
> forcing me to rename all my domUs?
> 
> Is there something like a man page for each of these resource types
> like a drbd resource, or a xen resource that tells me what the
> available attributes I can use are?  I have found loads of great
> examples but so far nothing that actually describes everything that's
> possible.

That's what the meta-data is for. Try

export OCF_ROOT=/usr/lib/ocf
$script meta-data

Regards
Dominik
_______________________________________________
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