[Pacemaker] Migrate resources based on connectivity

Lars Ellenberg lars.ellenberg at linbit.com
Mon Oct 11 13:38:31 UTC 2010


On Mon, Oct 11, 2010 at 03:50:01PM +0300, Dan Frincu wrote:
> Hi,
> 
> Dejan Muhamedagic wrote:
> >Hi,
> >
> >On Sun, Oct 10, 2010 at 10:27:13PM +0300, Dan Frincu wrote:
> >>Hi,
> >>
> >>I have the following setup:
> >>- order drbd0:promote drbd1:promote
> >>- order drbd1:promote drbd2:promote
> >>- order drbd2:promote all:start
> >>- collocation all drbd2:Master
> >>- all is a group of resources, drbd{0..3} are drbd ms resources.
> >>
> >>I want to migrate the resources based on ping connectivity to a
> >>default gateway. Based on http://www.clusterlabs.org/wiki/Pingd_with_resources_on_different_networks
> >>and http://www.clusterlabs.org/wiki/Example_configurations I've
> >>tried the following:
> >>- primitive ping ocf:pacemaker:ping params host_list=1.2.3.4
> >>multiplier=100 op monitor interval=5s timeout=5s
> >>- clone ping_clone ping meta globally-unique=false
> >>- location ping_nok all \
> >>   rule $id="ping_nok-rule" -inf: not_defined ping_clone or
> >>ping_clone number:lte 0
> >
> >Use pingd to reference the attribute in the location constraint.
> Not to be disrespectful, but after 3 days being stuck on this issue,
> I don't exactly understand how to do that. Could you please provide
> an example.
> 
> Thank you in advance.

The example you reference lists:

	primitive pingdnet1 ocf:pacemaker:pingd \
		params host_list=192.168.23.1 \
			name=pingdnet1
			^^^^^^^^^^^^^^

	clone cl-pingdnet1 pingdnet1
			   ^^^^^^^^^

param name default is pingd,
and is the attribute name to be used in the location constraints.

You will need to reference pingd in you location constraint, or set an
explicit name in the primitive definition, and reference that.

Your ping primitive sets the default 'pingd' attribute,
but you reference some 'ping_clone' attribute,
which apparently no-one really references.

-- 
: 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.



More information about the Pacemaker mailing list