public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH] conf: No routable interface for IPv4 or IPv6 is informational, not a warning
@ 2024-02-15 22:50 Stefano Brivio
  2024-02-16  2:49 ` David Gibson
  0 siblings, 1 reply; 3+ messages in thread
From: Stefano Brivio @ 2024-02-15 22:50 UTC (permalink / raw)
  To: passt-dev; +Cc: Paul Holzinger

...Podman users might get confused by the fact that if we can't
find a default route for a given IP version, we'll report that as a
warning message and possibly just before actual error messages.

However, a lack of routable interface for IPv4 or IPv6 can be a
normal circumstance: don't warn about it, just state that as
informational message, if those are displayed (they're not in
non-error paths in Podman, for example).

Reported-by: Paul Holzinger <pholzing@redhat.com>
Link: https://github.com/containers/podman/pull/21563#issuecomment-1937024642
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
 conf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/conf.c b/conf.c
index 5e15b66..2341007 100644
--- a/conf.c
+++ b/conf.c
@@ -579,7 +579,7 @@ static unsigned int conf_ip4(unsigned int ifi,
 		ifi = nl_get_ext_if(nl_sock, AF_INET);
 
 	if (!ifi) {
-		warn("No external routable interface for IPv4");
+		info("No external routable interface for IPv4");
 		return 0;
 	}
 
@@ -651,7 +651,7 @@ static unsigned int conf_ip6(unsigned int ifi,
 		ifi = nl_get_ext_if(nl_sock, AF_INET6);
 
 	if (!ifi) {
-		warn("No external routable interface for IPv6");
+		info("No external routable interface for IPv6");
 		return 0;
 	}
 
-- 
@@ -579,7 +579,7 @@ static unsigned int conf_ip4(unsigned int ifi,
 		ifi = nl_get_ext_if(nl_sock, AF_INET);
 
 	if (!ifi) {
-		warn("No external routable interface for IPv4");
+		info("No external routable interface for IPv4");
 		return 0;
 	}
 
@@ -651,7 +651,7 @@ static unsigned int conf_ip6(unsigned int ifi,
 		ifi = nl_get_ext_if(nl_sock, AF_INET6);
 
 	if (!ifi) {
-		warn("No external routable interface for IPv6");
+		info("No external routable interface for IPv6");
 		return 0;
 	}
 
-- 
2.39.2


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

* Re: [PATCH] conf: No routable interface for IPv4 or IPv6 is informational, not a warning
  2024-02-15 22:50 [PATCH] conf: No routable interface for IPv4 or IPv6 is informational, not a warning Stefano Brivio
@ 2024-02-16  2:49 ` David Gibson
  2024-02-16  5:08   ` Stefano Brivio
  0 siblings, 1 reply; 3+ messages in thread
From: David Gibson @ 2024-02-16  2:49 UTC (permalink / raw)
  To: Stefano Brivio; +Cc: passt-dev, Paul Holzinger

[-- Attachment #1: Type: text/plain, Size: 2388 bytes --]

On Thu, Feb 15, 2024 at 11:50:59PM +0100, Stefano Brivio wrote:
> ...Podman users might get confused by the fact that if we can't
> find a default route for a given IP version, we'll report that as a
> warning message and possibly just before actual error messages.
> 
> However, a lack of routable interface for IPv4 or IPv6 can be a
> normal circumstance: don't warn about it, just state that as
> informational message, if those are displayed (they're not in
> non-error paths in Podman, for example).
> 
> Reported-by: Paul Holzinger <pholzing@redhat.com>
> Link: https://github.com/containers/podman/pull/21563#issuecomment-1937024642
> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>

I have mixed feelings about this.  On the one hand it's certainly true
that these messages don't necessarily indicate a problem.  Also that
we've had people think they were the undelying cause of later hard
errors, when in fact they were unrelated.

On the other hand, these messages do indicate that we're entirely
disabling either IPv4 or IPv6 connectivity.  The fact that this relies
on having external routability is itself non-obvious (and is something
we want to remove, but it will take a while).  As an info message, I
can see people being confused instead that "why is no IPv[46]
working?" despite no errors or warnings.

So... maybe reduce to info level, but make the text clearer that we're
disabling the relevant IP version?

> ---
>  conf.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/conf.c b/conf.c
> index 5e15b66..2341007 100644
> --- a/conf.c
> +++ b/conf.c
> @@ -579,7 +579,7 @@ static unsigned int conf_ip4(unsigned int ifi,
>  		ifi = nl_get_ext_if(nl_sock, AF_INET);
>  
>  	if (!ifi) {
> -		warn("No external routable interface for IPv4");
> +		info("No external routable interface for IPv4");
>  		return 0;
>  	}
>  
> @@ -651,7 +651,7 @@ static unsigned int conf_ip6(unsigned int ifi,
>  		ifi = nl_get_ext_if(nl_sock, AF_INET6);
>  
>  	if (!ifi) {
> -		warn("No external routable interface for IPv6");
> +		info("No external routable interface for IPv6");
>  		return 0;
>  	}
>  

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] conf: No routable interface for IPv4 or IPv6 is informational, not a warning
  2024-02-16  2:49 ` David Gibson
@ 2024-02-16  5:08   ` Stefano Brivio
  0 siblings, 0 replies; 3+ messages in thread
From: Stefano Brivio @ 2024-02-16  5:08 UTC (permalink / raw)
  To: David Gibson; +Cc: passt-dev, Paul Holzinger

On Fri, 16 Feb 2024 13:49:01 +1100
David Gibson <david@gibson.dropbear.id.au> wrote:

> On Thu, Feb 15, 2024 at 11:50:59PM +0100, Stefano Brivio wrote:
> > ...Podman users might get confused by the fact that if we can't
> > find a default route for a given IP version, we'll report that as a
> > warning message and possibly just before actual error messages.
> > 
> > However, a lack of routable interface for IPv4 or IPv6 can be a
> > normal circumstance: don't warn about it, just state that as
> > informational message, if those are displayed (they're not in
> > non-error paths in Podman, for example).
> > 
> > Reported-by: Paul Holzinger <pholzing@redhat.com>
> > Link: https://github.com/containers/podman/pull/21563#issuecomment-1937024642
> > Signed-off-by: Stefano Brivio <sbrivio@redhat.com>  
> 
> I have mixed feelings about this.  On the one hand it's certainly true
> that these messages don't necessarily indicate a problem.  Also that
> we've had people think they were the undelying cause of later hard
> errors, when in fact they were unrelated.
> 
> On the other hand, these messages do indicate that we're entirely
> disabling either IPv4 or IPv6 connectivity.  The fact that this relies
> on having external routability is itself non-obvious (and is something
> we want to remove, but it will take a while).  As an info message, I
> can see people being confused instead that "why is no IPv[46]
> working?" despite no errors or warnings.
> 
> So... maybe reduce to info level, but make the text clearer that we're
> disabling the relevant IP version?

Right, yes, changed in v2.

-- 
Stefano


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

end of thread, other threads:[~2024-02-16  5:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-15 22:50 [PATCH] conf: No routable interface for IPv4 or IPv6 is informational, not a warning Stefano Brivio
2024-02-16  2:49 ` David Gibson
2024-02-16  5:08   ` Stefano Brivio

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).