bubble at hoster-ok
Apr 20, 2012, 12:15 AM
Post #7 of 8
20.04.2012 03:21, Andrew Beekhof wrote:
Re: Convenience Groups - WAS Re: [Linux-HA] Unordered groups (was Re: Is 'resource_set' still experimental?)
[In reply to]
> On Fri, Apr 20, 2012 at 7:41 AM, Vladislav Bogdanov
> <bubble [at] hoster-ok> wrote:
>> 19.04.2012 20:48, David Vossel wrote:
>>> ----- Original Message -----
>>>> From: "Alan Robertson" <alanr [at] unix>
>>>> To: pacemaker [at] oss, "Andrew Beekhof" <andrew [at] beekhof>
>>>> Cc: "Dejan Muhamedagic" <dejan [at] hello-penguin>
>>>> Sent: Thursday, April 19, 2012 10:22:48 AM
>>>> Subject: [Pacemaker] Convenience Groups - WAS Re: [Linux-HA] Unordered groups (was Re: Is 'resource_set' still
>>>> Hi Andrew,
>>>> I'm currently working on a fairly large cluster with lots of
>>>> related to attached hardware. There are 59 of these things and 24 of
>>>> those things and so on and each of them has its own resource to deal
>>>> with the the "things". They are not clones, and can't easily be made
>>>> I would like to be able to easily say "shut down all the resources
>>>> manage this kind of thing". The solution that occurs to me most
>>>> obviously is one you would likely call a "double abomination" ;-) -
>>>> unordered and un-colocated group. It seems a safe assumption that
>>>> would not be a good path to pursue given your statements from last
>>>> What would you suggest instead?
>>> This might be a terrible idea, but this is the first thing that came to mind.
>>> What if you made a Dummy resource as a sort of control switch for starting/stopping each "group" of resources that control a "thing". The resource groups wouldn't actually be defined as resource groups, but instead would be defined by order constraints that force a set of resources to start or stop when the Dummy control resource starts/stops.
>>> So, something like this...
>>> Dummy resource D1
>>> thing resource T1
>>> thing resource T2
>>> - If you start D1 then T1 and T2 can start.
>>> - If you stop D1, then T1 and T2 have to stop.
>>> - If you flip D1 back on, then T1 and T2 start again.
>>> order set start (D1) then start (T1 and T2)
>> But, when pacemaker decides to move Dummy to another node, the whole
>> stack will be restarted, even if Dummy is configured with allow_migration.
>> I solved this problem for myself with RA which manages cluster ticket,
>> and other resources depend on that ticket, exploiting it as a cluster
> I like this approach.
One more sign that I go right way ;)
> Why the resource for granting/revoking the ticket though?
Initially - just to grant the ticket at the cluster start. This goal
will be obsolete once we have persistent tickets (or cluster-wide
attributes). But see below.
> I'd have thought it would be just as easy to manually grant/revoke the
> ticket as it would be to start/stop the fake resource.
My implementation of RA (which was designed before standby/activate
feature appeared) just uses pseudo-resource functionality to report
status at monitor op, so it tolerates manual intervention to tickets.
I'm about rewrite it a bit so it will check ticket existence at monitor,
and return OCF_SUCCESS if it exists, leaving to admin to play with
standby/activate. This is actually very low priority for me though.
I initially wrote that RA to solve one issue with HA lustre
proof-of-concept I'm currently working on, but then I realized that it
can be very useful to easily manage "stacks" of resources. F.e. I have
several tickets: drbd-local, drbd-stacked, drbd-testfs-local,
drbd-testfs-stacked, lustre and testfs. They are granted by Ticketer RA
at cluster start, and other resources depend on that tickets with
rsc_ticket (including f.e. drbd-stacked resource on drbd-local ticket
and so on), allowing me to:
* easily unmount all lustre parts for given fs (testfs), still leaving
stacked drbd resources in Master state, so I can do something with them
* unmount all lustre filesystems in one shot
* do the above plus demote all stacked resources if I need to manage
"local" drbd resources
* stop everything drbd-related in one shot
and much more.
I was asked by my employer to present my results with lustre at LinuxCon
in Barcelona this November, so hopefully I'll make interesting
presentation (including this trick with tickets) if everything goes
smooth with that. Everybody are welcome.
One more interesting "feature" (actually side-effect) with this RA: when
you stop Ticketer resource, current transition is aborted because ticket
is revoked. This allows me to guarantee that advisory ordering between
"higher" resources always works (with one more trick - extra advisory
ordering constraints between several Ticketer resources, this will also
be included in presentation).
I attach that RA here, so you're free to include it in pacemaker after