Hi, On Mon, Dec 28, 2009 at 03:45:28PM +0100, Martin Gombač wrote: > > Michael Schwartzkopff wrote: >> Am Montag, 28. Dezember 2009 15:30:05 schrieb Martin Gombač: >> >>> Michael Schwartzkopff wrote: >>> >>>> Am Montag, 28. Dezember 2009 14:36:11 schrieb Martin Gombač: >>>> >>>>> Hi, >>>>> >>>>> i have mostly working Xen + DRBD + Live migration + Resource fencing, >>>>> but here is a slight issue with my crm config. >>>>> >>>>> I want for resource Hosting to migrate to other node only when the drbd >>>>> resource there is primary. I did try to achieve this using ordering (see >>>>> config below). Currently it can happen, that drbd resouce is still in >>>>> slave (secondary) while migration starts. Example: >>>>> >>>> What about a colocation constraints refering to the resource in master >>>> state? >>>> >>> I'm not sure what you mean. I think i already did this with: >>> >>> colocation Hosting_on_ms_drbd_r0 inf: Hosting ms_drbd_r0:Master >>> >>> Is this what you mean? If not, i'll be happy if you provide me with an >>> example, or point me to the docs. :-) >>> >> >> Sorry, you also need ordering >> >> order ordDRBDHosting inf: ms_drbd_r0:promote Hosting:start >> >> > > I did that already, just without adding :start: > > > order ms_drbd_r0_b4_Hosting inf: ms_drbd_r0:promote Hosting > > > Is this wrong, should i add :start to Hosting and behavior will change?
Yes. A tad counterintuitive, but the action of the second resource defaults to the one specified for the first resource. Similar for orders. Thanks, Dejan > Here is the relevant part of my config again; order and collocation are > the last two lines: > > > primitive Hosting ocf:heartbeat:Xen \ > params xmfile="/etc/xen/Hosting.cfg" \ > meta target-role="Started" allow-migrate="true" is-managed="true" \ > op monitor interval="120s" timeout="300s" > primitive drbd_r0 ocf:linbit:drbd \ > params drbd_resource="r0" \ > op monitor interval="15s" role="Master" timeout="30s" \ > op monitor interval="30s" role="Slave" timeout="30" > ms ms_drbd_r0 drbd_r0 \ > meta notify="true" master-max="2" inteleave="true" > location cli-prefer-Hosting Hosting \ > rule $id="cli-prefer-rule-Hosting" inf: #uname eq ibm1 > colocation Hosting_on_ms_drbd_r0 inf: Hosting ms_drbd_r0:Master > order ms_drbd_r0_b4_Hosting inf: ms_drbd_r0:promote Hosting > > > > Thank you for your time mr. Schwartzkopff, > M. > > _______________________________________________ > Pacemaker mailing list > Pacemaker@oss.clusterlabs.org > http://oss.clusterlabs.org/mailman/listinfo/pacemaker _______________________________________________ Pacemaker mailing list Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker