From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Teigland Date: Tue, 8 Sep 2009 11:01:21 -0500 Subject: [Cluster-devel] ccs_config_dump / ccs_config_validate In-Reply-To: <4AA4AB5E.5090300@redhat.com> References: <20090903192244.GB23923@redhat.com> <1252045015.339.139.camel@cerberus.int.fabbione.net> <20090904153753.GA26463@redhat.com> <1252086256.6387.25.camel@cerberus.int.fabbione.net> <20090904180612.GB26463@redhat.com> <1252131148.6387.30.camel@cerberus.int.fabbione.net> <4AA4AB5E.5090300@redhat.com> Message-ID: <20090908160121.GA11641@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 Mon, Sep 07, 2009 at 07:42:38AM +0100, Christine Caulfield wrote: > >- it can be confusing to users to see pipes and some shell magic > >commands happening. After all we don't print all the calls we do > >everywhere because the user doesn't really need to know all the internal > >magic. My whole point is that it's the plain "ccs_config_validate" that's confusing to users, and printing more detail makes it *less* confusing! > I agree. Just because it's a script that does the work doesn't mean it > should automatically show its working. If the user wants to do that then > there are -v or -x switches to the shell itself. If the whole operation > was written in C you wouldn't get it to print its source code out before > running ... would you ? Setting aside absurdities :-), I'm not convinced either of you took enough time to consider the real issue behind the unusual idea. Please try to forget everything you know about ccs/confdb/xmlconfig/ldapconfig/cmanpreconfig and put yourself the position of a user trying to debug/diagnose/understand what's happening with their cluster. These tools are for them, not for cman_tool to use, despite how they began. My motivation is that a plain ccs_config_validate is a "magical" command; a user has no clue what it's doing, which is the first key step in understanding what to make of the result. As such, I think we should encourage the use of explicit commands whenever possible, like: ccs_config_validate --test-file /etc/cluster/cluster.conf ccs_config_validate --test-load /etc/cluster/cluster.conf Echoing one of those for a plain ccs_config_validate is probably not the best way to communicate helpful info the user. So let's put some thought into something *better* and less magical. How about using -v (verbose) like, ccs_config_validate --test-file new.conf ok ccs_config_validate -v --test-file new.conf test file new.conf ok ccs_config_validate --test-file /etc/cluster/cluster.conf ok ccs_config_validate -v --test-file /etc/cluster/cluster.conf test file /etc/cluster/cluster.conf ok ccs_config_validate --test-load /etc/cluster/cluster.conf ok ccs_config_validate -v --test-load /etc/cluster/cluster.conf test load /etc/cluster/cluster.conf ok ccs_config_validate --test-load ok ccs_config_validate -v --test-load test load /etc/cluster/cluster.conf ok ccs_config_validate ok ccs_config_validate -v test load /etc/cluster/cluster.conf ok ccs_config_validate --test-load ok ccs_config_validate -v --test-load test load ldap://... ok ccs_config_validate ok ccs_config_validate -v test load ldap://... ok Dave