From: David Teigland <teigland@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] ccs_config_dump / ccs_config_validate
Date: Fri, 4 Sep 2009 10:37:53 -0500 [thread overview]
Message-ID: <20090904153753.GA26463@redhat.com> (raw)
In-Reply-To: <1252045015.339.139.camel@cerberus.int.fabbione.net>
On Fri, Sep 04, 2009 at 08:16:55AM +0200, Fabio M. Di Nitto wrote:
> On Thu, 2009-09-03 at 14:22 -0500, David Teigland wrote:
>
> > ccs_config_validate file.conf
> > - just run xmllint --relaxng cluster.rng file.conf and report errors,
> > don't do anything more
>
> As it is implemented now, ccs_config_validate does only validate the
> config. It's not loaded in the running cluster.
It's first loaded into xmlconfig and cmanpreconfig, then validated. That's
the bit that's strange or confusing to a user. A user would generally expect
this command to validate precisely the file they provide, not a transmogrified
version of it.
> > ccs_config_dump > file.conf
> > - should dump the entire contents of running corosync confdb in xml format
>
> We can only dump safely and reliably the contents of <cluster...
> The corosync confdb/objdb contains objects that are not "xml friendly"
> and filtering them is a nightmare. We have been down that path before
> with libccs and we had to move back to <cluster.. only contents.
OK, I looked more@this and now see that you're duplicating things like
totem.token and logging under both cluster and the root,
# corosync-objctl | grep token
cluster.totem.token=2000
totem.token=2000
I'd feared we'd miss those by just dumping cluster.
> > To a user, this would make
> > sense conceptually as "load file.conf with --dry-run". And that's what cman
> > actually wants to do prior to loading a new config. So, my question is what
> > does/should the command for "load file.conf with --dry-run" look like?
>
> I am not 100% sure I understand what you mean here.
Here are usages I think would make sense to users:
ccs_config_dump
. dumps cluster section of confdb
ccs_config_validate /path/to/file
. just xmllint on file
. (do not load file into any libs)
ccs_config_validate --load-test /path/to/file
. load file into xmlconfig and cmanpreconfig
. dump result to tmpfile
. xmllint tmpfile
. rm tmpfile
ccs_config_validate --load-test
. depending on /etc/sysconfig/
. load /etc/cluster/cluster.conf into xmlconfig and cmanpreconfig, or
. load other source like ldap into cmanpreconfig
. dump result to tmpfile
. xmllint tmpfile
. rm tmpfile
Dave
next prev parent reply other threads:[~2009-09-04 15:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-03 19:22 [Cluster-devel] ccs_config_dump / ccs_config_validate David Teigland
2009-09-04 6:16 ` Fabio M. Di Nitto
2009-09-04 15:37 ` David Teigland [this message]
2009-09-04 17:44 ` Fabio M. Di Nitto
2009-09-04 18:06 ` David Teigland
2009-09-05 6:12 ` Fabio M. Di Nitto
2009-09-07 6:42 ` Christine Caulfield
2009-09-08 16:01 ` David Teigland
2009-09-08 16:49 ` Fabio M. Di Nitto
2009-09-08 18:34 ` David Teigland
2009-09-08 20:47 ` Fabio M. Di Nitto
2009-09-08 20:50 ` Fabio M. Di Nitto
2009-09-09 15:42 ` David Teigland
2009-09-09 17:24 ` Fabio M. Di Nitto
2009-09-09 18:09 ` David Teigland
2009-09-09 18:37 ` Fabio M. Di Nitto
2009-09-10 8:22 ` Christine Caulfield
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=20090904153753.GA26463@redhat.com \
--to=teigland@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 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).