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

Re: [Cluster-devel] ccs_config_dump / ccs_config_validate



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


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