All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lon Hohberger <lhh@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [RFC][PATCH] Unique resource name handling for rgmanager.
Date: Fri, 27 Apr 2007 13:51:55 -0400	[thread overview]
Message-ID: <20070427175154.GJ20650@redhat.com> (raw)
In-Reply-To: <1177689436.4027.49.camel@localhost>

So far, it's pretty good - the only thing I worry about is
group-reordering.  For example, if we do:

  <resources>
    <clusterfs name="foo" .../>
  </resources>
  <service name="1">
    <clusterfs ref="foo"/>
  </service>
  <service name="2">
    <clusterfs ref="foo"/> <!-- ref = 2 -->
  </service>

...and we delete service 1 and add service 3 below service 2, we'll end
up with a different reference number for service 2:

  <service name="2">
    <clusterfs ref="foo"/> <!-- ref = 1 now -->
  </service>
  <service name="3">
    <clusterfs ref="foo"/>
  </service>

If we were using the ref number to track instances of the clusterfs
resource on disk, then the ref number '1' would disappear out from under
service:2 when we delete service:1.

The patch looks right - except the way we decide 'refno'.  That scares
me :)

To expand on what you started, we can add an easy way to fix the
reordering problem by adding a 'refno' attribute in cluster.conf for
ref= tags.

That is, the reorder case above can be eliminated if we simply require a
specific index attribute when doing ref=.  For example:

  <service name="2">
    <clusterfs ref="foo" refno="2" />
  </service>
  <service name="3">
    <clusterfs ref="foo" refno="3" />
  </service>

Of course, this complicates cluster.conf parsing from rgmanager's
perspective, because now it has to keep track of indices (what if
someone forgot to add a refno?) - while expensive, this can't be
terribly difficult to do.

As an alternative, in order to avoid configuration changes as well as
adding new configuration options, we could very easily calculate hash or
CRC values based on configuration parameters and parent node attributes
(with some sort of conflict resolution if there's overlap, I guess) -
this would get us a position independent per-type identifier.  That is:

   service:2[6fc1]      (crc-16)
   service:2[fe13c0d3]  (crc-32)

-- 
Lon Hohberger - Software Engineer - Red Hat, Inc.



      reply	other threads:[~2007-04-27 17:51 UTC|newest]

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

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=20070427175154.GJ20650@redhat.com \
    --to=lhh@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.