Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: Pacemaker

Convenience Groups - WAS Re: [Linux-HA] Unordered groups (was Re: Is 'resource_set' still experimental?)

 

 

Linux-HA pacemaker RSS feed   Index | Next | Previous | View Threaded


alanr at unix

Apr 19, 2012, 8:22 AM

Post #1 of 8 (455 views)
Permalink
Convenience Groups - WAS Re: [Linux-HA] Unordered groups (was Re: Is 'resource_set' still experimental?)

Hi Andrew,

I'm currently working on a fairly large cluster with lots of resources
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
clones.

I would like to be able to easily say "shut down all the resources that
manage this kind of thing". The solution that occurs to me most
obviously is one you would likely call a "double abomination" ;-) - an
unordered and un-colocated group. It seems a safe assumption that this
would not be a good path to pursue given your statements from last year...

What would you suggest instead?






On 01/19/2011 01:19 AM, Andrew Beekhof wrote:
> On Tue, Jan 18, 2011 at 1:42 PM, Florian Haas<florian.haas [at] linbit> wrote:
>> On 01/18/2011 11:49 AM, RaSca wrote:
>>> As discussed yesterday on IRC with Andrew, there is no way of creating a
>>> group with indipendent resources.
>>> I was hoping that setting the options you mentioned can do the trick,
>>> but I've just tested:
>>>
>>> If you declare a group like this:
>>>
>>> group groupA resA resB resC meta ordered=false colocated=false
>>>
>>> and then you do a:
>>>
>>> crm resource stop resB, then resC is also stopped.
>> To the best of my knowledge this shouldn't happen and I'd be inclined to
>> call this a bug. But I'm not certain. Andrew, can you shed some light on
>> that?
> Unordered and/or uncolocated groups are an abomination.
> Is that enough light?
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker [at] oss
> 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
>


--
Alan Robertson<alanr [at] unix> - @OSSAlanR

"Openness is the foundation and preservative of friendship... Let me claim from you at all times your undisguised opinions." - William Wilberforce

_______________________________________________
Pacemaker mailing list: Pacemaker [at] oss
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://bugs.clusterlabs.org


dvossel at redhat

Apr 19, 2012, 10:48 AM

Post #2 of 8 (433 views)
Permalink
Re: Convenience Groups - WAS Re: [Linux-HA] Unordered groups (was Re: Is 'resource_set' still experimental?) [In reply to]

----- 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
> experimental?)
>
> Hi Andrew,
>
> I'm currently working on a fairly large cluster with lots of
> resources
> 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
> clones.
>
> I would like to be able to easily say "shut down all the resources
> that
> manage this kind of thing". The solution that occurs to me most
> obviously is one you would likely call a "double abomination" ;-) -
> an
> unordered and un-colocated group. It seems a safe assumption that
> this
> would not be a good path to pursue given your statements from last
> year...
>
> 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)


-- Vossel

_______________________________________________
Pacemaker mailing list: Pacemaker [at] oss
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://bugs.clusterlabs.org


rasto.levrinc at gmail

Apr 19, 2012, 12:03 PM

Post #3 of 8 (447 views)
Permalink
Re: Convenience Groups - WAS Re: [Linux-HA] Unordered groups (was Re: Is 'resource_set' still experimental?) [In reply to]

On Thu, Apr 19, 2012 at 5:22 PM, Alan Robertson <alanr [at] unix> wrote:
> Hi Andrew,
>
> I'm currently working on a fairly large cluster with lots of resources
> 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 clones.
>
> I would like to be able to easily say "shut down all the resources that
> manage this kind of thing".    The solution that occurs to me most obviously
> is one you would likely call a "double abomination" ;-) - an unordered and
> un-colocated group.  It seems a safe assumption that this would not be a
> good path to pursue given your statements from last year...
>
> What would you suggest instead?

This is maybe not what you are looking for, but with the LCMC GUI you
can do this one easily. You can group resources together in the graph,
select them by drawing a rectangle around them and stop the whole
selections.

See the screenshot:
http://sourceforge.net/apps/gallery/lcmc/index.php?g2_itemId=49&g2_imageViewsIndex=1

Rasto

--
Dipl.-Ing. Rastislav Levrinc
rasto.levrinc [at] gmail
Linux Cluster Management Console
http://lcmc.sf.net/

_______________________________________________
Pacemaker mailing list: Pacemaker [at] oss
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://bugs.clusterlabs.org


alanr at unix

Apr 19, 2012, 12:46 PM

Post #4 of 8 (433 views)
Permalink
Re: Convenience Groups - WAS Re: [Linux-HA] Unordered groups (was Re: Is 'resource_set' still experimental?) [In reply to]

That's a very interesting idea. Since I'm generating the configuration
from a script, that would be easy to add.

Also, I could have a variety of different - even overlapping -
pseudo-groups implemented in this way.



On 04/19/2012 11:48 AM, 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
>> experimental?)
>>
>> Hi Andrew,
>>
>> I'm currently working on a fairly large cluster with lots of
>> resources
>> 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
>> clones.
>>
>> I would like to be able to easily say "shut down all the resources
>> that
>> manage this kind of thing". The solution that occurs to me most
>> obviously is one you would likely call a "double abomination" ;-) -
>> an
>> unordered and un-colocated group. It seems a safe assumption that
>> this
>> would not be a good path to pursue given your statements from last
>> year...
>>
>> 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)
>
>
> -- Vossel
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker [at] oss
> 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://bugs.clusterlabs.org
>


--
Alan Robertson<alanr [at] unix> - @OSSAlanR

"Openness is the foundation and preservative of friendship... Let me claim from you at all times your undisguised opinions." - William Wilberforce

_______________________________________________
Pacemaker mailing list: Pacemaker [at] oss
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://bugs.clusterlabs.org


bubble at hoster-ok

Apr 19, 2012, 2:41 PM

Post #5 of 8 (432 views)
Permalink
Re: Convenience Groups - WAS Re: [Linux-HA] Unordered groups (was Re: Is 'resource_set' still experimental?) [In reply to]

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
>> experimental?)
>>
>> Hi Andrew,
>>
>> I'm currently working on a fairly large cluster with lots of
>> resources
>> 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
>> clones.
>>
>> I would like to be able to easily say "shut down all the resources
>> that
>> manage this kind of thing". The solution that occurs to me most
>> obviously is one you would likely call a "double abomination" ;-) -
>> an
>> unordered and un-colocated group. It seems a safe assumption that
>> this
>> would not be a good path to pursue given your statements from last
>> year...
>>
>> 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
attribute.

This solution works for me with post-1.1.7 pacemaker (somewhere near the
current master branch).

Best,
Vladislav

_______________________________________________
Pacemaker mailing list: Pacemaker [at] oss
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://bugs.clusterlabs.org


andrew at beekhof

Apr 19, 2012, 5:21 PM

Post #6 of 8 (426 views)
Permalink
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
>>> experimental?)
>>>
>>> Hi Andrew,
>>>
>>> I'm currently working on a fairly large cluster with lots of
>>> resources
>>> 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
>>> clones.
>>>
>>> I would like to be able to easily say "shut down all the resources
>>> that
>>> manage this kind of thing".    The solution that occurs to me most
>>> obviously is one you would likely call a "double abomination" ;-) -
>>> an
>>> unordered and un-colocated group.  It seems a safe assumption that
>>> this
>>> would not be a good path to pursue given your statements from last
>>> year...
>>>
>>> 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
> attribute.

I like this approach.
Why the resource for granting/revoking the ticket though?
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.

>
> This solution works for me with post-1.1.7 pacemaker (somewhere near the
> current master branch).
>
> Best,
> Vladislav
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker [at] oss
> 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://bugs.clusterlabs.org

_______________________________________________
Pacemaker mailing list: Pacemaker [at] oss
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://bugs.clusterlabs.org


bubble at hoster-ok

Apr 20, 2012, 12:15 AM

Post #7 of 8 (428 views)
Permalink
Re: Convenience Groups - WAS Re: [Linux-HA] Unordered groups (was Re: Is 'resource_set' still experimental?) [In reply to]

20.04.2012 03:21, Andrew Beekhof wrote:
> 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
>>>> experimental?)
>>>>
>>>> Hi Andrew,
>>>>
>>>> I'm currently working on a fairly large cluster with lots of
>>>> resources
>>>> 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
>>>> clones.
>>>>
>>>> I would like to be able to easily say "shut down all the resources
>>>> that
>>>> manage this kind of thing". The solution that occurs to me most
>>>> obviously is one you would likely call a "double abomination" ;-) -
>>>> an
>>>> unordered and un-colocated group. It seems a safe assumption that
>>>> this
>>>> would not be a good path to pursue given your statements from last
>>>> year...
>>>>
>>>> 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
>> attribute.
>
> 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
review.

Best,
Vladislav
Attachments: Ticketer (5.45 KB)


andrew at beekhof

Apr 26, 2012, 8:16 PM

Post #8 of 8 (383 views)
Permalink
Re: Convenience Groups - WAS Re: [Linux-HA] Unordered groups (was Re: Is 'resource_set' still experimental?) [In reply to]

Did the ticket suggestion work for you?

On Fri, Apr 20, 2012 at 1:22 AM, Alan Robertson <alanr [at] unix> wrote:
> Hi Andrew,
>
> I'm currently working on a fairly large cluster with lots of resources
> 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 clones.
>
> I would like to be able to easily say "shut down all the resources that
> manage this kind of thing".    The solution that occurs to me most obviously
> is one you would likely call a "double abomination" ;-) - an unordered and
> un-colocated group.  It seems a safe assumption that this would not be a
> good path to pursue given your statements from last year...
>
> What would you suggest instead?
>
>
>
>
>
>
> On 01/19/2011 01:19 AM, Andrew Beekhof wrote:
>>
>> On Tue, Jan 18, 2011 at 1:42 PM, Florian Haas<florian.haas [at] linbit>
>>  wrote:
>>>
>>> On 01/18/2011 11:49 AM, RaSca wrote:
>>>>
>>>> As discussed yesterday on IRC with Andrew, there is no way of creating a
>>>> group with indipendent resources.
>>>> I was hoping that setting the options you mentioned can do the trick,
>>>> but I've just tested:
>>>>
>>>> If you declare a group like this:
>>>>
>>>> group groupA resA resB resC meta ordered=false colocated=false
>>>>
>>>> and then you do a:
>>>>
>>>> crm resource stop resB, then resC is also stopped.
>>>
>>> To the best of my knowledge this shouldn't happen and I'd be inclined to
>>> call this a bug. But I'm not certain. Andrew, can you shed some light on
>>> that?
>>
>> Unordered and/or uncolocated groups are an abomination.
>> Is that enough light?
>>
>> _______________________________________________
>> Pacemaker mailing list: Pacemaker [at] oss
>> 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
>>
>
>
> --
>    Alan Robertson<alanr [at] unix>  - @OSSAlanR
>
> "Openness is the foundation and preservative of friendship...  Let me claim
> from you at all times your undisguised opinions." - William Wilberforce

_______________________________________________
Pacemaker mailing list: Pacemaker [at] oss
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://bugs.clusterlabs.org

Linux-HA pacemaker RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.