Pete Zaitcev | 1 Apr 2010 02:42
Picon
Favicon

[Patch 0/3] End-to-end verbosity

These patches have an API change, so as usual CLD must be built first.
But surely this ought to be the last logging API change ever, right?

Most importantly, this thing is DEAD:
	/* nsess->udp->sess->log.verbose = 1; */
For some reason it peeved me a lot.

-- Pete
Pete Zaitcev | 1 Apr 2010 02:43
Picon
Favicon

[Patch 1/3] CLD: End-to-end verbosity

It has been observed that it's not possible to enable the session-level
verbose dump with -v switch of cldcli anymore (post XDR and ncld).

The main issue is that it is impossible to set the session verbosity by
an application control. Secondary issue is that if application attempts
to change the verbosity level, it cannot do so for newly-created sessions,
because the session structure is allocated when session is created.

Contributing to the confusion is the desire not to enable excessive
verbosity in the CLD sessions whenever debugging is requested.

To fix these issues, the patch does the following:

 - Drops all commented-out inserts that assign additional verbosity
   from libraries. Permits top-level applications to specify verbosity
   (what cldcli -v was intended to do).

 - Splits per-packet verbosity away from debugging messages.

 - Establishes -v to mean "CLD protocol verbosity" across applications
   and the daemon. The existing -D now controls the program debugging
   only, and there is no bit mask. However in case of cld it continues
   to accept a numeric argument. It is compatible, does not hurt anything
   and may be used in the future.

Coincidentially this fixes the crash whenever there's a resolution
failure for an SRV record.

Signed-Off-By: Pete Zaitcev <zaitcev <at> redhat.com>

(Continue reading)

Pete Zaitcev | 1 Apr 2010 02:43
Picon
Favicon

[Patch 2/3] chunkd: End-to-end verbosity

Signed-Off-By: Pete Zaitcev <zaitcev <at> redhat.com>

---
 server/cldu.c   |    3 ++-
 server/server.c |    9 ++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

commit 764bd81a304fd3b961e7c3661a498ba0f6565a51
Author: Master <zaitcev <at> lembas.zaitcev.lan>
Date:   Wed Mar 31 18:16:18 2010 -0600

    End-2-end verbosity.

diff --git a/server/cldu.c b/server/cldu.c
index 51d01a3..b2d3388 100644
--- a/server/cldu.c
+++ b/server/cldu.c
 <at>  <at>  -319,7 +319,8  <at>  <at>  static int cldu_set_cldc(struct cld_session *cs, int newactive)
 		       hp->host, hp->port);

 	cs->nsess = ncld_sess_open(hp->host, hp->port, &error,
-				   cldu_sess_event, cs, "tabled", "tabled");
+				   cldu_sess_event, cs, "tabled", "tabled",
+				   &cldu_hail_log);
 	if (cs->nsess == NULL) {
 		if (error < 1000) {
 			applog(LOG_ERR, "ncld_sess_open(%s,%u) error: %s",
diff --git a/server/server.c b/server/server.c
index 69f3973..38fa5b6 100644
--- a/server/server.c
(Continue reading)

Pete Zaitcev | 1 Apr 2010 02:43
Picon
Favicon

[Patch 3/3] tabled: End-to-end verbosity

Signed-Off-By: Pete Zaitcev <zaitcev <at> redhat.com>

---
 server/cldu.c   |    9 ++++++---
 server/server.c |   11 ++++++++---
 server/tabled.h |    3 +--
 3 files changed, 15 insertions(+), 8 deletions(-)

commit 820e53ea5ec85a69f6e1648e8d445a0d87ea6a72
Author: Master <zaitcev <at> lembas.zaitcev.lan>
Date:   Wed Mar 31 18:27:00 2010 -0600

    End-2-end verbosity.

diff --git a/server/cldu.c b/server/cldu.c
index aecf336..e705725 100644
--- a/server/cldu.c
+++ b/server/cldu.c
 <at>  <at>  -82,7 +82,7  <at>  <at>  static void add_chunk_node(struct cld_session *sp, const char *name);

 static struct timeval cldu_rescan_delay = { 50, 0 };

-struct hail_log cldu_hail_log = {
+static struct hail_log cldu_hail_log = {
 	.func		= applog,
 };

 <at>  <at>  -223,7 +223,8  <at>  <at>  static int cldu_set_cldc(struct cld_session *sp, int newactive)
 		       hp->host, hp->port);

(Continue reading)

Samba - BoYang | 1 Apr 2010 13:01
Picon
Favicon

CLD doesn't build on db-4.3

hi, *
    CLD doesn't build on db-4.3 on suse 11, since db-4.3 uses deprecated
structure members DBC->c_xxx(c_close(), etc) instead of DBC->xxx. :-)

    It won't build on db-4.4, either. probably won't build on db-4.5, as
db-5.0 says DBC->xxx was introduced in db-4.6. :-) Should we disable
support for 4.3 - 4.5 and add 4.9 - 5.0?
--

-- 
Samba Team	boyang <at> samba.org	http://www.samba.org
Jeff Garzik | 1 Apr 2010 17:03
Favicon

Re: CLD doesn't build on db-4.3

On 04/01/2010 07:01 AM, Samba - BoYang wrote:
> hi, *
>      CLD doesn't build on db-4.3 on suse 11, since db-4.3 uses deprecated
> structure members DBC->c_xxx(c_close(), etc) instead of DBC->xxx. :-)
>
>      It won't build on db-4.4, either. probably won't build on db-4.5, as
> db-5.0 says DBC->xxx was introduced in db-4.6. :-) Should we disable
> support for 4.3 - 4.5 and add 4.9 - 5.0?

I'd answer "yes", by a circuitous route:  if I understand things 
correctly, the replicated PAXOS db4 backend that we are heading towards 
(see the 'replica' branch of 
git://git.kernel.org/pub/scm/daemon/cld/cld.git) was buggy in early db4 
releases.

Therefore, it sounds like we could eliminate two issues with a single 
change, by removing support for db 4.3 - 4.5, the DBC issue and the 
PAXOS issue.

I'm fine with adding support for 4.9+ as long as the APIs function in a 
compatible manner.

Want to create the simple patch for this?  :)

Thanks,

	Jeff

Pete Zaitcev | 1 Apr 2010 15:56
Picon
Favicon

Re: CLD doesn't build on db-4.3

On Thu, 01 Apr 2010 19:01:59 +0800
Samba - BoYang <boyang <at> samba.org> wrote:

>     CLD doesn't build on db-4.3 on suse 11, since db-4.3 uses deprecated
> structure members DBC->c_xxx(c_close(), etc) instead of DBC->xxx. :-)

That's unexpected. Jeff is our portability expert, but he's busy
with the baby, so I guess I'll have to look if it's something
easily fixable.

-- Pete
Pete Zaitcev | 1 Apr 2010 22:50
Picon
Favicon

Re: CLD doesn't build on db-4.3

On Thu, 01 Apr 2010 11:03:48 -0400
Jeff Garzik <jeff <at> garzik.org> wrote:

> >      It won't build on db-4.4, either. probably won't build on db-4.5, as
> > db-5.0 says DBC->xxx was introduced in db-4.6. :-) Should we disable
> > support for 4.3 - 4.5 and add 4.9 - 5.0?
> 
> I'd answer "yes", by a circuitous route:  if I understand things 
> correctly, the replicated PAXOS db4 backend that we are heading towards 
> (see the 'replica' branch of 
> git://git.kernel.org/pub/scm/daemon/cld/cld.git) was buggy in early db4 
> releases.

> Therefore, it sounds like we could eliminate two issues with a single 
> change, by removing support for db 4.3 - 4.5, the DBC issue and the 
> PAXOS issue.

RHEL 5 ships with db4-4.3.29-10.el5 (I checked for Bo's problem
this morning), so dropping 4.3 will make RHEL 5 unsupportable.
Just a point to consider.

-- Pete
Samba - BoYang | 2 Apr 2010 02:38
Picon
Favicon

Re: CLD doesn't build on db-4.3

On 04/02/2010 04:50 AM, Pete Zaitcev wrote:

> RHEL 5 ships with db4-4.3.29-10.el5 (I checked for Bo's problem
> this morning), so dropping 4.3 will make RHEL 5 unsupportable.
> Just a point to consider.

It might add a lot of #ifdef to the code to support 4.5-. :-)

> 
> -- Pete
> 

--

-- 
Samba Team	boyang <at> samba.org	http://www.samba.org
Samba - BoYang | 2 Apr 2010 02:35
Picon
Favicon

Re: CLD doesn't build on db-4.3

On 04/01/2010 11:03 PM, Jeff Garzik wrote:

> I'm fine with adding support for 4.9+ as long as the APIs function in a
> compatible manner.
> 
> Want to create the simple patch for this?  :)

Here is the patch for master, please review it. Thanks!

> 
> Thanks,
> 
>     Jeff
> 
> 
> 
> 
> 
> 

--

-- 
Samba Team	boyang <at> samba.org	http://www.samba.org

Gmane