[ovs-dev] rconn: Suppress 'connected' log for unreliable connections.

Message ID 1529480691-22830-1-git-send-email-i.maximets@samsung.com
State New
Headers show
Series
  • [ovs-dev] rconn: Suppress 'connected' log for unreliable connections.
Related show

Commit Message

Ilya Maximets June 20, 2018, 7:44 a.m.
Recent assertion failure fix changed rconn workflow for unreliable
connections (such as connections from ovs-ofctl) from

    |rconn|DBG|br-int<->unix#151: entering ACTIVE
    |rconn|DBG|br-int<->unix#151: connection closed by peer
    |rconn|DBG|br-int<->unix#151: entering DISCONNECTED

To

    |rconn|DBG|br-int<->unix#200: entering CONNECTING
    |rconn|INFO|br-int<->unix#200: connected
    |rconn|DBG|br-int<->unix#200: entering ACTIVE
    |rconn|DBG|br-int<->unix#200: connection closed by peer
    |rconn|DBG|br-int<->unix#200: entering DISCONNECTED

Many monitoring/configuring tools (ex. ovs-neutron-agent) uses
ovs-ofctl frequently to check the statuses of installed flows.
This produces a lot of "connected" logs, that are useless in general.

Fix that by changing the log level to DBG for unreliable connections.

Suggested-by: Ben Pfaff <blp@ovn.org>
Fixes: c9a9b9b00bf5 ("rconn: Introduce new invariant to fix assertion
                      failure in corner case.")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
 lib/rconn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ilya Maximets July 2, 2018, 1:54 p.m. | #1
So, what about this patch?

Best regards, Ilya Maximets.

On 20.06.2018 10:44, Ilya Maximets wrote:
> Recent assertion failure fix changed rconn workflow for unreliable
> connections (such as connections from ovs-ofctl) from
> 
>     |rconn|DBG|br-int<->unix#151: entering ACTIVE
>     |rconn|DBG|br-int<->unix#151: connection closed by peer
>     |rconn|DBG|br-int<->unix#151: entering DISCONNECTED
> 
> To
> 
>     |rconn|DBG|br-int<->unix#200: entering CONNECTING
>     |rconn|INFO|br-int<->unix#200: connected
>     |rconn|DBG|br-int<->unix#200: entering ACTIVE
>     |rconn|DBG|br-int<->unix#200: connection closed by peer
>     |rconn|DBG|br-int<->unix#200: entering DISCONNECTED
> 
> Many monitoring/configuring tools (ex. ovs-neutron-agent) uses
> ovs-ofctl frequently to check the statuses of installed flows.
> This produces a lot of "connected" logs, that are useless in general.
> 
> Fix that by changing the log level to DBG for unreliable connections.
> 
> Suggested-by: Ben Pfaff <blp@ovn.org>
> Fixes: c9a9b9b00bf5 ("rconn: Introduce new invariant to fix assertion
>                       failure in corner case.")
> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
> ---
>  lib/rconn.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/rconn.c b/lib/rconn.c
> index 7af4e73..ece8769 100644
> --- a/lib/rconn.c
> +++ b/lib/rconn.c
> @@ -511,7 +511,7 @@ run_CONNECTING(struct rconn *rc)
>  {
>      int retval = vconn_connect(rc->vconn);
>      if (!retval) {
> -        VLOG_INFO("%s: connected", rc->name);
> +        VLOG(rc->reliable ? VLL_INFO : VLL_DBG, "%s: connected", rc->name);
>          rc->n_successful_connections++;
>          state_transition(rc, S_ACTIVE);
>          rc->version = vconn_get_version(rc->vconn);
>
Ben Pfaff July 5, 2018, 5:19 p.m. | #2
On Wed, Jun 20, 2018 at 10:44:51AM +0300, Ilya Maximets wrote:
> Recent assertion failure fix changed rconn workflow for unreliable
> connections (such as connections from ovs-ofctl) from
> 
>     |rconn|DBG|br-int<->unix#151: entering ACTIVE
>     |rconn|DBG|br-int<->unix#151: connection closed by peer
>     |rconn|DBG|br-int<->unix#151: entering DISCONNECTED
> 
> To
> 
>     |rconn|DBG|br-int<->unix#200: entering CONNECTING
>     |rconn|INFO|br-int<->unix#200: connected
>     |rconn|DBG|br-int<->unix#200: entering ACTIVE
>     |rconn|DBG|br-int<->unix#200: connection closed by peer
>     |rconn|DBG|br-int<->unix#200: entering DISCONNECTED
> 
> Many monitoring/configuring tools (ex. ovs-neutron-agent) uses
> ovs-ofctl frequently to check the statuses of installed flows.
> This produces a lot of "connected" logs, that are useless in general.
> 
> Fix that by changing the log level to DBG for unreliable connections.
> 
> Suggested-by: Ben Pfaff <blp@ovn.org>
> Fixes: c9a9b9b00bf5 ("rconn: Introduce new invariant to fix assertion
>                       failure in corner case.")
> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>

I applied this to master and backported as far as branch-2.5.

Patch

diff --git a/lib/rconn.c b/lib/rconn.c
index 7af4e73..ece8769 100644
--- a/lib/rconn.c
+++ b/lib/rconn.c
@@ -511,7 +511,7 @@  run_CONNECTING(struct rconn *rc)
 {
     int retval = vconn_connect(rc->vconn);
     if (!retval) {
-        VLOG_INFO("%s: connected", rc->name);
+        VLOG(rc->reliable ? VLL_INFO : VLL_DBG, "%s: connected", rc->name);
         rc->n_successful_connections++;
         state_transition(rc, S_ACTIVE);
         rc->version = vconn_get_version(rc->vconn);