[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, 2009-09-04 at 10:37 -0500, David Teigland wrote:
> 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.

Right because we want to validate the config that is going to be running
if that cluster.conf is going to be pushed into production. See my other
comments below.

> > >   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

Ok this is done and working. Let's remove it from the list :)

> 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

Ok now I see what you mean. It's easily doable. I was planning to add
help and options support to ccs_config_validate anyway.

All of the above is easily doable, but I think i would still prefer to
have the --load-test by default because it's what is really going to run
on the cluster and document maybe a --validate-file to validate only the
file since it is a special case (there is no easy equivalent for ldap or
other loaders at the moment).


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