All of lore.kernel.org
 help / color / mirror / Atom feed
* Why does messenger sends the address of himself and of the connecting peer
@ 2017-10-20 15:25 Ricardo Dias
  2017-10-20 15:30 ` Jason Dillaman
  2017-10-20 15:40 ` Sage Weil
  0 siblings, 2 replies; 5+ messages in thread
From: Ricardo Dias @ 2017-10-20 15:25 UTC (permalink / raw)
  To: Ceph Development

Hi,

In the current messenger protocol, upon accepting a new connection, the
messenger sends it's address and the connecting peer address along with
the banner string. Why does the connecting peer need these addresses?
Moreover, the connecting peer uses the connecting peer address (sent
from the server) to set as it's own address.

What happens if the network is rewriting addresses  because of NAT, or
whatever other strange reasons?

I also saw that the code that encodes these addresses have a comment
saying "// legacy". Should we remove these addresses from the new V2
protocol, or do we still need them?

Thanks,
Ricardo

-- 
Ricardo Dias
Senior Software Engineer - Storage Team
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton,
HRB 21284
(AG Nürnberg)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why does messenger sends the address of himself and of the connecting peer
  2017-10-20 15:25 Why does messenger sends the address of himself and of the connecting peer Ricardo Dias
@ 2017-10-20 15:30 ` Jason Dillaman
  2017-10-20 15:40 ` Sage Weil
  1 sibling, 0 replies; 5+ messages in thread
From: Jason Dillaman @ 2017-10-20 15:30 UTC (permalink / raw)
  To: Ricardo Dias; +Cc: Ceph Development

I had a similar question when I got hit by clients behind a NAT
failing to connect [1] to the cluster.

[1] http://tracker.ceph.com/issues/20049

On Fri, Oct 20, 2017 at 11:25 AM, Ricardo Dias <rdias@suse.com> wrote:
> Hi,
>
> In the current messenger protocol, upon accepting a new connection, the
> messenger sends it's address and the connecting peer address along with
> the banner string. Why does the connecting peer need these addresses?
> Moreover, the connecting peer uses the connecting peer address (sent
> from the server) to set as it's own address.
>
> What happens if the network is rewriting addresses  because of NAT, or
> whatever other strange reasons?
>
> I also saw that the code that encodes these addresses have a comment
> saying "// legacy". Should we remove these addresses from the new V2
> protocol, or do we still need them?
>
> Thanks,
> Ricardo
>
> --
> Ricardo Dias
> Senior Software Engineer - Storage Team
> SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton,
> HRB 21284
> (AG Nürnberg)
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Jason

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why does messenger sends the address of himself and of the connecting peer
  2017-10-20 15:25 Why does messenger sends the address of himself and of the connecting peer Ricardo Dias
  2017-10-20 15:30 ` Jason Dillaman
@ 2017-10-20 15:40 ` Sage Weil
  2017-10-23  8:47   ` Ricardo Dias
  1 sibling, 1 reply; 5+ messages in thread
From: Sage Weil @ 2017-10-20 15:40 UTC (permalink / raw)
  To: Ricardo Dias; +Cc: Ceph Development

On Fri, 20 Oct 2017, Ricardo Dias wrote:
> In the current messenger protocol, upon accepting a new connection, the
> messenger sends it's address and the connecting peer address along with
> the banner string. Why does the connecting peer need these addresses?
> Moreover, the connecting peer uses the connecting peer address (sent
> from the server) to set as it's own address.
> 
> What happens if the network is rewriting addresses  because of NAT, or
> whatever other strange reasons?

There are two cases:

1) client -> server connections.  These always are initiated in one 
directly.  The self address thing is included there partly so that the 
client can discover what its effective (public) address is.  In the case 
of the OSD, the initial osd -> mon connection allows the osd to learn what 
it's public IP address will be (we advertise our address as the one 
that is used to connect to the mon).

2) server <-> server connections, e.g., mon<->mon, osd<->osd, mds<->mds.  
Here, connections can be opened in either direction.  I believe here it is 
just used as a sanity check.

> I also saw that the code that encodes these addresses have a comment
> saying "// legacy". Should we remove these addresses from the new V2
> protocol, or do we still need them?

I think we'll still need them, since new clients will still need to 
connect to old servers, and new servers will need to allow old clients to 
connect.

HTH?

sage


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why does messenger sends the address of himself and of the connecting peer
  2017-10-20 15:40 ` Sage Weil
@ 2017-10-23  8:47   ` Ricardo Dias
  2017-10-23 12:14     ` Sage Weil
  0 siblings, 1 reply; 5+ messages in thread
From: Ricardo Dias @ 2017-10-23  8:47 UTC (permalink / raw)
  To: Sage Weil; +Cc: Ceph Development

On Fri, 2017-10-20 at 15:40 +0000, Sage Weil wrote:
> On Fri, 20 Oct 2017, Ricardo Dias wrote:
> > In the current messenger protocol, upon accepting a new connection,
> the
> > messenger sends it's address and the connecting peer address along
> with
> > the banner string. Why does the connecting peer need these
> addresses?
> > Moreover, the connecting peer uses the connecting peer address
> (sent
> > from the server) to set as it's own address.
> > 
> > What happens if the network is rewriting addresses  because of NAT,
> or
> > whatever other strange reasons?
> 
> There are two cases:
> 
> 1) client -> server connections.  These always are initiated in one 
> directly.  The self address thing is included there partly so that
> the 
> client can discover what its effective (public) address is.  In the
> case 
> of the OSD, the initial osd -> mon connection allows the osd to learn
> what 
> it's public IP address will be (we advertise our address as the one 
> that is used to connect to the mon).
> 
> 2) server <-> server connections, e.g., mon<->mon, osd<->osd, mds<-
> >mds.  
> Here, connections can be opened in either direction.  I believe here
> it is 
> just used as a sanity check.
> 
> > I also saw that the code that encodes these addresses have a
> comment
> > saying "// legacy". Should we remove these addresses from the new
> V2
> > protocol, or do we still need them?
> 
> I think we'll still need them, since new clients will still need to 
> connect to old servers, and new servers will need to allow old
> clients to 
> connect.

The Messenger will still support the V1 protocol, so if a new client
needs to talk with an old server it will instantiate a V1 messenger.
Therefore, I think we can drop this from the V2 protocol, right?

> 
> HTH?
> 
> sage
> 
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" 
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
-- 
Ricardo Dias
Senior Software Engineer - Storage Team
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton,
HRB 21284
(AG Nürnberg)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why does messenger sends the address of himself and of the connecting peer
  2017-10-23  8:47   ` Ricardo Dias
@ 2017-10-23 12:14     ` Sage Weil
  0 siblings, 0 replies; 5+ messages in thread
From: Sage Weil @ 2017-10-23 12:14 UTC (permalink / raw)
  To: Ricardo Dias; +Cc: Ceph Development

On Mon, 23 Oct 2017, Ricardo Dias wrote:
> On Fri, 2017-10-20 at 15:40 +0000, Sage Weil wrote:
> > On Fri, 20 Oct 2017, Ricardo Dias wrote:
> > > In the current messenger protocol, upon accepting a new connection,
> > the
> > > messenger sends it's address and the connecting peer address along
> > with
> > > the banner string. Why does the connecting peer need these
> > addresses?
> > > Moreover, the connecting peer uses the connecting peer address
> > (sent
> > > from the server) to set as it's own address.
> > > 
> > > What happens if the network is rewriting addresses  because of NAT,
> > or
> > > whatever other strange reasons?
> > 
> > There are two cases:
> > 
> > 1) client -> server connections.  These always are initiated in one 
> > directly.  The self address thing is included there partly so that
> > the 
> > client can discover what its effective (public) address is.  In the
> > case 
> > of the OSD, the initial osd -> mon connection allows the osd to learn
> > what 
> > it's public IP address will be (we advertise our address as the one 
> > that is used to connect to the mon).
> > 
> > 2) server <-> server connections, e.g., mon<->mon, osd<->osd, mds<-
> > >mds.  
> > Here, connections can be opened in either direction.  I believe here
> > it is 
> > just used as a sanity check.
> > 
> > > I also saw that the code that encodes these addresses have a
> > comment
> > > saying "// legacy". Should we remove these addresses from the new
> > V2
> > > protocol, or do we still need them?
> > 
> > I think we'll still need them, since new clients will still need to 
> > connect to old servers, and new servers will need to allow old
> > clients to 
> > connect.
> 
> The Messenger will still support the V1 protocol, so if a new client
> needs to talk with an old server it will instantiate a V1 messenger.
> Therefore, I think we can drop this from the V2 protocol, right?

Oh, right.. yes!

sage

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-10-23 12:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-20 15:25 Why does messenger sends the address of himself and of the connecting peer Ricardo Dias
2017-10-20 15:30 ` Jason Dillaman
2017-10-20 15:40 ` Sage Weil
2017-10-23  8:47   ` Ricardo Dias
2017-10-23 12:14     ` Sage Weil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.