From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Teigland Date: Fri, 4 Sep 2009 10:37:53 -0500 Subject: [Cluster-devel] ccs_config_dump / ccs_config_validate In-Reply-To: <1252045015.339.139.camel@cerberus.int.fabbione.net> References: <20090903192244.GB23923@redhat.com> <1252045015.339.139.camel@cerberus.int.fabbione.net> Message-ID: <20090904153753.GA26463@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 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 > 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