diff mbox series

doc: Fix bind address example for lttng-relayd

Message ID 20200106051954.138370-1-benjamin.poirier@gmail.com
State New
Headers show
Series doc: Fix bind address example for lttng-relayd | expand

Commit Message

Benjamin Poirier Jan. 6, 2020, 5:19 a.m. UTC
INADDR_ANY is 0.0.0.0

Fixes: c93eadade277 ("doc/man: use propagated default values in man pages")
Signed-off-by: Benjamin Poirier <benjamin.poirier at gmail.com>
---
 doc/man/lttng-relayd.8.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mathieu Desnoyers Jan. 6, 2020, 2:39 p.m. UTC | #1
----- On Jan 6, 2020, at 12:19 AM, Benjamin Poirier benjamin.poirier at gmail.com wrote:

> INADDR_ANY is 0.0.0.0

Hi Benjamin,

Double-checking this seems to confirm what the man page states:

% lttng-relayd -b
% netstat -lnp | grep lttng-relayd
tcp        0      0 0.0.0.0:5342            0.0.0.0:*               LISTEN      4445/lttng-relayd   
tcp        0      0 0.0.0.0:5343            0.0.0.0:*               LISTEN      4445/lttng-relayd   
tcp        0      0 127.0.0.1:5344          0.0.0.0:*               LISTEN      4445/lttng-relayd   
unix  2      [ ACC ]     STREAM     LISTENING     56508    4445/lttng-relayd    /home/compudj/.lttng/relayd/health-4445

Based on this output, the "live" port of the relayd daemon appears to be listening
only on 127.0.0.1 by default.

What makes you think the man page needs to be updated ?

Thanks,

Mathieu

> 
> Fixes: c93eadade277 ("doc/man: use propagated default values in man pages")
> Signed-off-by: Benjamin Poirier <benjamin.poirier at gmail.com>
> ---
> doc/man/lttng-relayd.8.txt | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/doc/man/lttng-relayd.8.txt b/doc/man/lttng-relayd.8.txt
> index be59675d..bf88a535 100644
> --- a/doc/man/lttng-relayd.8.txt
> +++ b/doc/man/lttng-relayd.8.txt
> @@ -40,7 +40,7 @@ it can write to the output directory and listen on the
> configured ports.
> If a user is within a secured network and/or has proper firewall
> settings, `lttng-relayd` can listen to LTTng live connections from _all_
> network interfaces by specifying
> -+--live-port=tcp://{default_network_viewer_bind_address}:{default_network_viewer_port}+.
> ++--live-port=tcp://0.0.0.0:{default_network_viewer_port}+.
> 
> Once a trace has been streamed completely, the trace can be processed by
> any tool that can process an LTTng trace located on the local
> --
> 2.25.0.rc0
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Benjamin Poirier Jan. 7, 2020, 1:58 a.m. UTC | #2
On 2020/01/06 09:39, Mathieu Desnoyers wrote:
> ----- On Jan 6, 2020, at 12:19 AM, Benjamin Poirier benjamin.poirier at gmail.com wrote:
> 
> > INADDR_ANY is 0.0.0.0
> 
> Hi Benjamin,
> 
> Double-checking this seems to confirm what the man page states:
> 
> % lttng-relayd -b
> % netstat -lnp | grep lttng-relayd
> tcp        0      0 0.0.0.0:5342            0.0.0.0:*               LISTEN      4445/lttng-relayd   
> tcp        0      0 0.0.0.0:5343            0.0.0.0:*               LISTEN      4445/lttng-relayd   
> tcp        0      0 127.0.0.1:5344          0.0.0.0:*               LISTEN      4445/lttng-relayd   
> unix  2      [ ACC ]     STREAM     LISTENING     56508    4445/lttng-relayd    /home/compudj/.lttng/relayd/health-4445
> 
> Based on this output, the "live" port of the relayd daemon appears to be listening
> only on 127.0.0.1 by default.

That's right but not relevant to this patch. The part of the man page
changed by this patch is not stating the defaults.

> 
> What makes you think the man page needs to be updated ?

The part of the man page changed by this patch is:
	If a user is within a secured network and/or has proper firewall
	settings, lttng-relayd can listen to LTTng live connections from
	all network interfaces by specifying
	--live-port=tcp://localhost:5344.

That is incorrect. To listen for connections to all addresses on the host,
the socket has to be bound to INADDR_ANY, 0.0.0.0.
Mathieu Desnoyers Jan. 7, 2020, 4:14 p.m. UTC | #3
----- On Jan 6, 2020, at 8:58 PM, Benjamin Poirier benjamin.poirier at gmail.com wrote:

> On 2020/01/06 09:39, Mathieu Desnoyers wrote:
>> ----- On Jan 6, 2020, at 12:19 AM, Benjamin Poirier benjamin.poirier at gmail.com
>> wrote:
>> 
>> > INADDR_ANY is 0.0.0.0
>> 
>> Hi Benjamin,
>> 
>> Double-checking this seems to confirm what the man page states:
>> 
>> % lttng-relayd -b
>> % netstat -lnp | grep lttng-relayd
>> tcp        0      0 0.0.0.0:5342            0.0.0.0:*               LISTEN
>> 4445/lttng-relayd
>> tcp        0      0 0.0.0.0:5343            0.0.0.0:*               LISTEN
>> 4445/lttng-relayd
>> tcp        0      0 127.0.0.1:5344          0.0.0.0:*               LISTEN
>> 4445/lttng-relayd
>> unix  2      [ ACC ]     STREAM     LISTENING     56508    4445/lttng-relayd
>> /home/compudj/.lttng/relayd/health-4445
>> 
>> Based on this output, the "live" port of the relayd daemon appears to be
>> listening
>> only on 127.0.0.1 by default.
> 
> That's right but not relevant to this patch. The part of the man page
> changed by this patch is not stating the defaults.
> 
>> 
>> What makes you think the man page needs to be updated ?
> 
> The part of the man page changed by this patch is:
>	If a user is within a secured network and/or has proper firewall
>	settings, lttng-relayd can listen to LTTng live connections from
>	all network interfaces by specifying
>	--live-port=tcp://localhost:5344.
> 
> That is incorrect. To listen for connections to all addresses on the host,
> the socket has to be bound to INADDR_ANY, 0.0.0.0.

Oh! Good point. I was missing the context. Yes this change makes sense.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>

J?r?mie is on vacation this week, so we can expect it to be merged
somewhere next week.

Thanks,

Mathieu
Jérémie Galarneau Jan. 15, 2020, 12:45 a.m. UTC | #4
Merged in master, stable-2.11, and stable-2.10.

Thanks!
J?r?mie

On Mon, Jan 06, 2020 at 02:19:54PM +0900, Benjamin Poirier wrote:
> INADDR_ANY is 0.0.0.0
> 
> Fixes: c93eadade277 ("doc/man: use propagated default values in man pages")
> Signed-off-by: Benjamin Poirier <benjamin.poirier at gmail.com>
> ---
>  doc/man/lttng-relayd.8.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/doc/man/lttng-relayd.8.txt b/doc/man/lttng-relayd.8.txt
> index be59675d..bf88a535 100644
> --- a/doc/man/lttng-relayd.8.txt
> +++ b/doc/man/lttng-relayd.8.txt
> @@ -40,7 +40,7 @@ it can write to the output directory and listen on the configured ports.
>  If a user is within a secured network and/or has proper firewall
>  settings, `lttng-relayd` can listen to LTTng live connections from _all_
>  network interfaces by specifying
> -+--live-port=tcp://{default_network_viewer_bind_address}:{default_network_viewer_port}+.
> ++--live-port=tcp://0.0.0.0:{default_network_viewer_port}+.
>  
>  Once a trace has been streamed completely, the trace can be processed by
>  any tool that can process an LTTng trace located on the local
> -- 
> 2.25.0.rc0
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
diff mbox series

Patch

diff --git a/doc/man/lttng-relayd.8.txt b/doc/man/lttng-relayd.8.txt
index be59675d..bf88a535 100644
--- a/doc/man/lttng-relayd.8.txt
+++ b/doc/man/lttng-relayd.8.txt
@@ -40,7 +40,7 @@  it can write to the output directory and listen on the configured ports.
 If a user is within a secured network and/or has proper firewall
 settings, `lttng-relayd` can listen to LTTng live connections from _all_
 network interfaces by specifying
-+--live-port=tcp://{default_network_viewer_bind_address}:{default_network_viewer_port}+.
++--live-port=tcp://0.0.0.0:{default_network_viewer_port}+.
 
 Once a trace has been streamed completely, the trace can be processed by
 any tool that can process an LTTng trace located on the local