cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Simone Gotti <simone.gotti@email.it>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [RFC][PATCH] Unique resource name handling for rgmanager.
Date: Fri, 27 Apr 2007 17:57:16 +0200	[thread overview]
Message-ID: <1177689436.4027.49.camel@localhost> (raw)

Hi all,

starting from the clarification quoted from lon in bug 229650:
"instances of shared resources are expected to be able to operate
independently.  That is, if one instance fails, it does not imply that
they all have failed.  If it does, something is broken in the resource
agent and/or rgmanager.  If it isn't possible to make the resource
instances completely independent of one-another, then the resource agent
should not define maxinstances > 1." 
and thinking of a future ability of rgmanager to manage in the detail a
single resource inside a resource group I noticed some things:

*) restree.c:_res_op walks all the resource tree (so also resources
owned by another rg_thread) and starts working on the resource passed
with parameter "first".
This now isn't a problem as _res_op is called passing always to it, as
parameter first, the service name. 
But for example with rg_test you can test the stop/start/etc.. of a
resource inside a resource group. In this case, if I call for example
"rg_test test /etc/cluster/cluster.conf stop clusterfs gfs01"
and gfs01 has multiple instances on the same machine it will stop all
the resources of type gfs01 without the ability to stop only the one I
want to.

*) For the fact that now in the upper layer of the resource tree I can
also put a resource that it's not of type service I can have multiple
instances of it in the upper layer.


So, trying to leave unchanged the behavior of _res_op (i changed its
parameters anyway...) I (with the help of Lon on IRC) thinked:

1) Make possible to start/stop just 1 instance of a multiple instance
resource => call it with an unique name.
2) Implement this way to call the resource inside rgmanager. This means
that I'm going to work directly on the resource_node_t (and the resource
it points to) and not to a general resource_t that can be found multiple
times in the tree.

I did a basic example patch that needs a lot of work just to share it
with you and talk all togheter on its implementation.

The resource's unique name generation should be changed without changing
all the other code that use it and now it's in this format:

$TYPE:$PRIMARYATTRVALUE[$INSTANCENUMBER] 

where $INSTANCENUMBER is optional if the resource type doesn't support
multiple instances or only one multiple instances resource exists with
the cluster.
for example 2 instances of clusterfs:gfs01 will be called
clusterfs:gfs01[0] and clusterfs:gfs01[1].

This kind of naming isn't unique as if I change the cluster.conf the
$INSTANCENUMBER can change but I'll be able to know its new name for
example with rg_test.

Sorry for the long mail but I hope that everythings is clear.

Thanks!
Bye!

-- 
Simone Gotti

 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 La Cronaca del Carnevale di Ivrea 2007 visto su www.localport.it: per conoscere il Carnevale, per rivivere l?edizione 2007. Acquistalo on line
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6431&d=27-4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rgmanager-cvsHEAD-res_operations-basicexample01.patch
Type: text/x-patch
Size: 20576 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20070427/af53aabe/attachment.bin>

             reply	other threads:[~2007-04-27 15:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-27 15:57 Simone Gotti [this message]
2007-04-27 17:51 ` [Cluster-devel] [RFC][PATCH] Unique resource name handling for rgmanager Lon Hohberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1177689436.4027.49.camel@localhost \
    --to=simone.gotti@email.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).