[PATCH] CTDB TCP transport connectivity fixes (bug 14084)

Martin Schwenke martin at meltin.net
Thu Aug 15 11:53:33 UTC 2019


On Wed, 14 Aug 2019 15:17:01 +1000, Amitay Isaacs <amitay at gmail.com>
wrote:

> On Wed, Aug 14, 2019 at 2:44 PM Martin Schwenke <martin at meltin.net> wrote:
> >
> > On Wed, 14 Aug 2019 14:22:27 +1000, Amitay Isaacs <amitay at gmail.com>
> > wrote:
> >  
> > > On Wed, Aug 14, 2019 at 1:54 PM Martin Schwenke via samba-technical
> > > <samba-technical at lists.samba.org> wrote:  
> > > >
> > > > Fix for:
> > > >
> > > >   https://bugzilla.samba.org/show_bug.cgi?id=14084
> > > >
> > > > The solution is to only mark nodes as connected when both incoming and
> > > > outgoing connections are up.
> > > >
> > > > Included in this pipeline:
> > > >
> > > >   https://gitlab.com/samba-team/devel/samba/pipelines/76265339
> > > >
> > > > Please review and maybe push...  
> > >
> > > In the last patch, there is no need to add "node" element to "tnode".
> > > "tnode" already includes "ctdb" for upcalls.  
> >
> > It is needed to be able to easily pass the node as the argument to the
> > upcall.
> >
> > However, you're right that:
> >
> >   tnode->node->ctdb->upcalls->node_dead(tnode->node);
> >
> > could just be:
> >
> >   tnode->ctdb->upcalls->node_dead(tnode->node);
> >
> > Do you want to tweak it or should I?  
> 
> Ah.  In that case we need to change the private_data for
> ctdb_tcp_read_cb() to "node" from "tnode".  Then we have access to
> "node" required for upcall.

The attached, improved patch set does the above and also fixes the
problem where tnode->out_queue wasn't a useful indicator that the
outbound connection was up.  As discussed offline, tnode->out_queue is
now only created when the connection becomes writable.

Included in this pipeline:

  https://gitlab.com/samba-team/devel/samba/pipelines/76501176

Please review and maybe push...

peace & happiness,
martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctdb-tcp.patch
Type: text/x-patch
Size: 23702 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20190815/7a7c9658/ctdb-tcp.bin>


More information about the samba-technical mailing list