[Pacemaker] drbd-xen and fencing

Vadym Chepkov vchepkov at gmail.com
Tue Nov 16 22:32:16 EST 2010


On Nov 15, 2010, at 3:45 AM, Lars Ellenberg wrote:

> On Mon, Nov 15, 2010 at 08:08:40AM +0100, Andrew Beekhof wrote:
>> Don't use init.d/drbd, use the ocf script that comes with the drbd packages
> 
> Then he loses xen live migration, I think.  Because Pacemaker cannot
> migrate dependent resources, and because xen apparently still thinks it
> needs both nodes Primary for a short amount of time.

And something needs to bring underlying storage into "Connected" state. 
It seems current drbd RA can't help with this problem


> 
>> On Thu, Nov 11, 2010 at 2:19 PM, Vadym Chepkov <vchepkov at gmail.com> wrote:
>>> Hi,
>>> 
>>> I posted a less elaborate version of this question to drbd mail-list, but,
>>> unfortunately, didn't get a reply,
>>> maybe audience of this list has more experience.
>>> I am trying to make xen live migration to work reliably, but wasn't
>>> successful so far.
>>> Here is the problem.
>>> In a cluster configuration I have two type of resources - file systems on
>>> drbd, with explicit drbd resources configuration and
>>> Xen resources with implicit, using drbd-xen block device helper. For the
>>> former everything works great, but the latter doesn't work quite well.
>>> In order for helper script to work, drbd module has to be loaded and
>>> underlying resources up. So I have to start init.d/drbd script.
>>> I can't make it an lsb cluster resource, because stop will be disastrous for
>>> file system resources. Enable it in startup sequence breaks
>>> /usr/lib/drbd/crm-unfence-peer.sh, because cluster stack is not completely
>>> up by the time drbd script finishes, and there is no way to configure only
>>> specific resources that need to be initialized.
>>> Also, I can't find a way fence Xen resource. I tried fence-peer
>>> "/usr/lib/drbd/crm-fence-peer.sh -i xen_vsvn",
>>> where xen_svn is the name of Xen primitive, but it doesn't work,
> 
> Can you be more specific?
> What did you try,
> what did you expect,
> and how do you determine it did not work?

whenever a drbd resource gets disconnected fencing script usually define a constraint, for example:

location drbd-fence-by-handler-ms_drbd_ldap ms_drbd_ldap \
	rule $id="drbd-fence-by-handler-rule-ms_drbd_ldap" $role="Master" -inf: #uname ne xen-11

This doesn't happen if I define handler 
fence-peer "/usr/lib/drbd/crm-fence-peer.sh"
or
fence-peer "/usr/lib/drbd/crm-fence-peer.sh -i xen_vsvn",
where xen_svn is Xen resource with drbd helper, I assume, because crm-fence-peer.sh expects drbd resource to be present in the cluster configuration and it is not the case.

I guess to solve this issue correctly a drbd clone is necessary, which will bring resources to Connected state and then won't freak out if both nodes are Secondary (when Xen VM is shutdown) or both nodes are Primary (when migration is in progress).

Vadym


> 
>>> so there is a danger of starting Xen VM on an out-of-date node. Then there
>>> is no way of monitoring underlying drbd resources too.
>>> I thought of adding underlying drbd resource explicitly in the cluster, but
>>> I can't figure out what would be the configuration
>>> for "this resource can be master on both nodes, but if just on one, it's
>>> fine too".
>>> allow-two-primaries has to be allowed for live migration and at the time of
>>> migration resources are primary on both nodes, but when migration finishes,
>>> it's again primary/slave. But if I configure drbd resource in the cluster
>>> with meta master-max="2" master-node-max="1",
>>> cluster insists on having them both primary all the time.
>>> Hope I didn't bore you to death and there is an elegant solution for
>>> this conundrum :)
>>> Thank you,
>>> Vadym
>>> 
>>> 
>>> _______________________________________________
>>> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
>>> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>>> 
>>> Project Home: http://www.clusterlabs.org
>>> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
>>> Bugs:
>>> http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
>>> 
>>> 
>> 
>> _______________________________________________
>> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
>> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>> 
>> Project Home: http://www.clusterlabs.org
>> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
>> Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
> 
> -- 
> : Lars Ellenberg
> : LINBIT | Your Way to High Availability
> : DRBD/HA support and consulting http://www.linbit.com
> 
> DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
> 
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker





More information about the Pacemaker mailing list