[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Cluster-devel] ccs_config_dump / ccs_config_validate

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 at this and now see that you're duplicating things like
totem.token and logging under both cluster and the root,

# corosync-objctl | grep token

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:

. 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]