Re: [ovs-dev] [PATCH ovn] northd, ic: Fix handling of ovn-appctl resume.

2024-05-14 Thread Numan Siddique
On Fri, May 3, 2024 at 2:07 AM Ales Musil  wrote:
>
> On Tue, Apr 23, 2024 at 2:44 PM Xavier Simonart  wrote:
>
> > After ovn-appctl resume was issued for northd or ovn-ic, there was no
> > guarantee that northd or ovn-ic were waking up, potentially handling
> > changes received while they were paused..
> > Usually, poll_block would be woken up by POLLHUP, but race conditions could
> > cause this not to happen.
> > ovn-controller is already properly handling the resume.
> >
> > This caused the following tests to fail sporadically:
> > - ovn-ic -- sync ISB status to INB
> > - propagate Port_Binding.up to NB and OVS.
> >
> > Signed-off-by: Xavier Simonart 
> > ---
> >  ic/ovn-ic.c | 2 +-
> >  northd/ovn-northd.c | 1 +
> >  2 files changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/ic/ovn-ic.c b/ic/ovn-ic.c
> > index e947323bf..be23f199d 100644
> > --- a/ic/ovn-ic.c
> > +++ b/ic/ovn-ic.c
> > @@ -2409,7 +2409,7 @@ ovn_ic_resume(struct unixctl_conn *conn, int argc
> > OVS_UNUSED,
> >  {
> >  struct ic_state *state = state_;
> >  state->paused = false;
> > -
> > +poll_immediate_wake();
> >  unixctl_command_reply(conn, NULL);
> >  }
> >
> > diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
> > index 3a5544b0c..d71114f35 100644
> > --- a/northd/ovn-northd.c
> > +++ b/northd/ovn-northd.c
> > @@ -1107,6 +1107,7 @@ ovn_northd_resume(struct unixctl_conn *conn, int
> > argc OVS_UNUSED,
> >  {
> >  struct northd_state *state = state_;
> >  state->paused = false;
> > +poll_immediate_wake();
> >
> >  unixctl_command_reply(conn, NULL);
> >  }
> > --
> > 2.31.1
> >
> > ___
> > dev mailing list
> > d...@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> >
> >
> Looks good to me, thanks.
>
> Acked-by: Ales Musil 

Thanks.  Applied to main and backported until branch-23.03.

Numan

>
> --
>
> Ales Musil
>
> Senior Software Engineer - OVN Core
>
> Red Hat EMEA 
>
> amu...@redhat.com
> 
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovn] northd, ic: Fix handling of ovn-appctl resume.

2024-05-03 Thread Ales Musil
On Tue, Apr 23, 2024 at 2:44 PM Xavier Simonart  wrote:

> After ovn-appctl resume was issued for northd or ovn-ic, there was no
> guarantee that northd or ovn-ic were waking up, potentially handling
> changes received while they were paused..
> Usually, poll_block would be woken up by POLLHUP, but race conditions could
> cause this not to happen.
> ovn-controller is already properly handling the resume.
>
> This caused the following tests to fail sporadically:
> - ovn-ic -- sync ISB status to INB
> - propagate Port_Binding.up to NB and OVS.
>
> Signed-off-by: Xavier Simonart 
> ---
>  ic/ovn-ic.c | 2 +-
>  northd/ovn-northd.c | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/ic/ovn-ic.c b/ic/ovn-ic.c
> index e947323bf..be23f199d 100644
> --- a/ic/ovn-ic.c
> +++ b/ic/ovn-ic.c
> @@ -2409,7 +2409,7 @@ ovn_ic_resume(struct unixctl_conn *conn, int argc
> OVS_UNUSED,
>  {
>  struct ic_state *state = state_;
>  state->paused = false;
> -
> +poll_immediate_wake();
>  unixctl_command_reply(conn, NULL);
>  }
>
> diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
> index 3a5544b0c..d71114f35 100644
> --- a/northd/ovn-northd.c
> +++ b/northd/ovn-northd.c
> @@ -1107,6 +1107,7 @@ ovn_northd_resume(struct unixctl_conn *conn, int
> argc OVS_UNUSED,
>  {
>  struct northd_state *state = state_;
>  state->paused = false;
> +poll_immediate_wake();
>
>  unixctl_command_reply(conn, NULL);
>  }
> --
> 2.31.1
>
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
Looks good to me, thanks.

Acked-by: Ales Musil 

-- 

Ales Musil

Senior Software Engineer - OVN Core

Red Hat EMEA 

amu...@redhat.com

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH ovn] northd, ic: Fix handling of ovn-appctl resume.

2024-04-23 Thread Xavier Simonart
After ovn-appctl resume was issued for northd or ovn-ic, there was no
guarantee that northd or ovn-ic were waking up, potentially handling
changes received while they were paused..
Usually, poll_block would be woken up by POLLHUP, but race conditions could
cause this not to happen.
ovn-controller is already properly handling the resume.

This caused the following tests to fail sporadically:
- ovn-ic -- sync ISB status to INB
- propagate Port_Binding.up to NB and OVS.

Signed-off-by: Xavier Simonart 
---
 ic/ovn-ic.c | 2 +-
 northd/ovn-northd.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/ic/ovn-ic.c b/ic/ovn-ic.c
index e947323bf..be23f199d 100644
--- a/ic/ovn-ic.c
+++ b/ic/ovn-ic.c
@@ -2409,7 +2409,7 @@ ovn_ic_resume(struct unixctl_conn *conn, int argc 
OVS_UNUSED,
 {
 struct ic_state *state = state_;
 state->paused = false;
-
+poll_immediate_wake();
 unixctl_command_reply(conn, NULL);
 }
 
diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index 3a5544b0c..d71114f35 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -1107,6 +1107,7 @@ ovn_northd_resume(struct unixctl_conn *conn, int argc 
OVS_UNUSED,
 {
 struct northd_state *state = state_;
 state->paused = false;
+poll_immediate_wake();
 
 unixctl_command_reply(conn, NULL);
 }
-- 
2.31.1

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev