diff mbox

[ovs-dev] rhel-systemd: start vswitchd after udev

Message ID 20170418151349.7840-1-aconole@redhat.com
State Accepted
Delegated to: Russell Bryant
Headers show

Commit Message

Aaron Conole April 18, 2017, 3:13 p.m. UTC
It's possible to race with the udev service, such that dpdk ports are
not finished being bound until after ovs-vswitchd has been started.
This means that attempts to use the port will fail.  While it is
possible to work around this for some NICs using port hotplug, not all
port types are supported (for instance vfio), and it requires manual
intervention.

Fixes: 36af136b690c ("rhel-systemd: Delay shutting down the services")
Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1397299
Suggested-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Aaron Conole <aconole@redhat.com>
---
 rhel/usr_lib_systemd_system_ovs-vswitchd.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Aaron Conole May 13, 2017, 3:08 p.m. UTC | #1
Aaron Conole writes:
> It's possible to race with the udev service, such that dpdk ports are
> not finished being bound until after ovs-vswitchd has been started.
> This means that attempts to use the port will fail.  While it is
> possible to work around this for some NICs using port hotplug, not all
> port types are supported (for instance vfio), and it requires manual
> intervention.
>
> Fixes: 36af136b690c ("rhel-systemd: Delay shutting down the services")
> Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1397299
> Suggested-by: Flavio Leitner <fbl@sysclose.org>
> Signed-off-by: Aaron Conole <aconole@redhat.com>
> ---
>  rhel/usr_lib_systemd_system_ovs-vswitchd.service | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Ping?  Should I rebase / resend this?  I'm not sure if it still applies
to the tree.
Ben Pfaff May 18, 2017, 8:55 p.m. UTC | #2
On Sat, May 13, 2017 at 11:08:13AM -0400, Aaron Conole wrote:
> Aaron Conole writes:
> > It's possible to race with the udev service, such that dpdk ports are
> > not finished being bound until after ovs-vswitchd has been started.
> > This means that attempts to use the port will fail.  While it is
> > possible to work around this for some NICs using port hotplug, not all
> > port types are supported (for instance vfio), and it requires manual
> > intervention.
> >
> > Fixes: 36af136b690c ("rhel-systemd: Delay shutting down the services")
> > Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1397299
> > Suggested-by: Flavio Leitner <fbl@sysclose.org>
> > Signed-off-by: Aaron Conole <aconole@redhat.com>
> > ---
> >  rhel/usr_lib_systemd_system_ovs-vswitchd.service | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Ping?  Should I rebase / resend this?  I'm not sure if it still applies
> to the tree.

It still applies fine but I'm not comfortable reviewing it myself.  Is
Flavio the right one to review it or should someone else?
Aaron Conole May 18, 2017, 9:11 p.m. UTC | #3
Ben Pfaff <blp@ovn.org> writes:

> On Sat, May 13, 2017 at 11:08:13AM -0400, Aaron Conole wrote:
>> Aaron Conole writes:
>> > It's possible to race with the udev service, such that dpdk ports are
>> > not finished being bound until after ovs-vswitchd has been started.
>> > This means that attempts to use the port will fail.  While it is
>> > possible to work around this for some NICs using port hotplug, not all
>> > port types are supported (for instance vfio), and it requires manual
>> > intervention.
>> >
>> > Fixes: 36af136b690c ("rhel-systemd: Delay shutting down the services")
>> > Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1397299
>> > Suggested-by: Flavio Leitner <fbl@sysclose.org>
>> > Signed-off-by: Aaron Conole <aconole@redhat.com>
>> > ---
>> >  rhel/usr_lib_systemd_system_ovs-vswitchd.service | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> Ping?  Should I rebase / resend this?  I'm not sure if it still applies
>> to the tree.
>
> It still applies fine but I'm not comfortable reviewing it myself.  Is
> Flavio the right one to review it or should someone else?

Flavio had actually suggested it.  I'm CC'ing the tester.  Maybe we can
at least get a Tested-by tag.
Ben Pfaff May 18, 2017, 9:51 p.m. UTC | #4
On Thu, May 18, 2017 at 05:11:03PM -0400, Aaron Conole wrote:
> Ben Pfaff <blp@ovn.org> writes:
> 
> > On Sat, May 13, 2017 at 11:08:13AM -0400, Aaron Conole wrote:
> >> Aaron Conole writes:
> >> > It's possible to race with the udev service, such that dpdk ports are
> >> > not finished being bound until after ovs-vswitchd has been started.
> >> > This means that attempts to use the port will fail.  While it is
> >> > possible to work around this for some NICs using port hotplug, not all
> >> > port types are supported (for instance vfio), and it requires manual
> >> > intervention.
> >> >
> >> > Fixes: 36af136b690c ("rhel-systemd: Delay shutting down the services")
> >> > Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1397299
> >> > Suggested-by: Flavio Leitner <fbl@sysclose.org>
> >> > Signed-off-by: Aaron Conole <aconole@redhat.com>
> >> > ---
> >> >  rhel/usr_lib_systemd_system_ovs-vswitchd.service | 2 +-
> >> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >> 
> >> Ping?  Should I rebase / resend this?  I'm not sure if it still applies
> >> to the tree.
> >
> > It still applies fine but I'm not comfortable reviewing it myself.  Is
> > Flavio the right one to review it or should someone else?
> 
> Flavio had actually suggested it.  I'm CC'ing the tester.  Maybe we can
> at least get a Tested-by tag.

I didn't realize there was a tester.  I guess that I should have looked
at the bugzilla URL.

If Maxim tested it successfully, we don't really need him to give us the
Tested-by, we can add it ourselves.  (But now that we've asked, we might
as well get an answer.)

Thanks,

Ben.
Karthik Sundaravel May 29, 2017, 11:30 a.m. UTC | #5
Hi

Tested-by: ksundara@redhat.com
I've tested the patch. Please see https://bugzilla.redhat.
com/show_bug.cgi?id=1397299#c17.

Regards
Karthik S

On Fri, May 19, 2017 at 3:21 AM, Ben Pfaff <blp@ovn.org> wrote:

> On Thu, May 18, 2017 at 05:11:03PM -0400, Aaron Conole wrote:
> > Ben Pfaff <blp@ovn.org> writes:
> >
> > > On Sat, May 13, 2017 at 11:08:13AM -0400, Aaron Conole wrote:
> > >> Aaron Conole writes:
> > >> > It's possible to race with the udev service, such that dpdk ports
> are
> > >> > not finished being bound until after ovs-vswitchd has been started.
> > >> > This means that attempts to use the port will fail.  While it is
> > >> > possible to work around this for some NICs using port hotplug, not
> all
> > >> > port types are supported (for instance vfio), and it requires manual
> > >> > intervention.
> > >> >
> > >> > Fixes: 36af136b690c ("rhel-systemd: Delay shutting down the
> services")
> > >> > Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1397299
> > >> > Suggested-by: Flavio Leitner <fbl@sysclose.org>
> > >> > Signed-off-by: Aaron Conole <aconole@redhat.com>
>
Tested-by: ksundara@redhat.com

> > >> > ---
> > >> >  rhel/usr_lib_systemd_system_ovs-vswitchd.service | 2 +-
> > >> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >>
> > >> Ping?  Should I rebase / resend this?  I'm not sure if it still
> applies
> > >> to the tree.
> > >
> > > It still applies fine but I'm not comfortable reviewing it myself.  Is
> > > Flavio the right one to review it or should someone else?
> >
> > Flavio had actually suggested it.  I'm CC'ing the tester.  Maybe we can
> > at least get a Tested-by tag.
>
> I didn't realize there was a tester.  I guess that I should have looked
> at the bugzilla URL.
>
> If Maxim tested it successfully, we don't really need him to give us the
> Tested-by, we can add it ourselves.  (But now that we've asked, we might
> as well get an answer.)
>
> Thanks,
>
> Ben.
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Russell Bryant June 29, 2017, 7:27 p.m. UTC | #6
On Mon, May 29, 2017 at 7:30 AM, Karthik Sundaravel <ksundara@redhat.com> wrote:
> Hi
>
> Tested-by: ksundara@redhat.com
> I've tested the patch. Please see https://bugzilla.redhat.
> com/show_bug.cgi?id=1397299#c17.

Thanks for testing and reporting back!

Sorry for the slow review.

I've applied this to master and branch-2.7.

>
> Regards
> Karthik S
>
> On Fri, May 19, 2017 at 3:21 AM, Ben Pfaff <blp@ovn.org> wrote:
>
>> On Thu, May 18, 2017 at 05:11:03PM -0400, Aaron Conole wrote:
>> > Ben Pfaff <blp@ovn.org> writes:
>> >
>> > > On Sat, May 13, 2017 at 11:08:13AM -0400, Aaron Conole wrote:
>> > >> Aaron Conole writes:
>> > >> > It's possible to race with the udev service, such that dpdk ports
>> are
>> > >> > not finished being bound until after ovs-vswitchd has been started.
>> > >> > This means that attempts to use the port will fail.  While it is
>> > >> > possible to work around this for some NICs using port hotplug, not
>> all
>> > >> > port types are supported (for instance vfio), and it requires manual
>> > >> > intervention.
>> > >> >
>> > >> > Fixes: 36af136b690c ("rhel-systemd: Delay shutting down the
>> services")
>> > >> > Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1397299
>> > >> > Suggested-by: Flavio Leitner <fbl@sysclose.org>
>> > >> > Signed-off-by: Aaron Conole <aconole@redhat.com>
>>
> Tested-by: ksundara@redhat.com
>
>> > >> > ---
>> > >> >  rhel/usr_lib_systemd_system_ovs-vswitchd.service | 2 +-
>> > >> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> > >>
>> > >> Ping?  Should I rebase / resend this?  I'm not sure if it still
>> applies
>> > >> to the tree.
>> > >
>> > > It still applies fine but I'm not comfortable reviewing it myself.  Is
>> > > Flavio the right one to review it or should someone else?
>> >
>> > Flavio had actually suggested it.  I'm CC'ing the tester.  Maybe we can
>> > at least get a Tested-by tag.
>>
>> I didn't realize there was a tester.  I guess that I should have looked
>> at the bugzilla URL.
>>
>> If Maxim tested it successfully, we don't really need him to give us the
>> Tested-by, we can add it ourselves.  (But now that we've asked, we might
>> as well get an answer.)
>>
>> Thanks,
>>
>> Ben.
>> _______________________________________________
>> dev mailing list
>> dev@openvswitch.org
>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Aaron Conole June 29, 2017, 8:24 p.m. UTC | #7
Russell Bryant <russell@ovn.org> writes:

> On Mon, May 29, 2017 at 7:30 AM, Karthik Sundaravel <ksundara@redhat.com> wrote:
>> Hi
>>
>> Tested-by: ksundara@redhat.com
>> I've tested the patch. Please see https://bugzilla.redhat.
>> com/show_bug.cgi?id=1397299#c17.
>
> Thanks for testing and reporting back!
>
> Sorry for the slow review.

Still not the longest I've had to wait for a bugfix, so no problems :)

> I've applied this to master and branch-2.7.

Great!  Thanks, Russell!

>>
>> Regards
>> Karthik S
>>
>> On Fri, May 19, 2017 at 3:21 AM, Ben Pfaff <blp@ovn.org> wrote:
>>
>>> On Thu, May 18, 2017 at 05:11:03PM -0400, Aaron Conole wrote:
>>> > Ben Pfaff <blp@ovn.org> writes:
>>> >
>>> > > On Sat, May 13, 2017 at 11:08:13AM -0400, Aaron Conole wrote:
>>> > >> Aaron Conole writes:
>>> > >> > It's possible to race with the udev service, such that dpdk ports
>>> are
>>> > >> > not finished being bound until after ovs-vswitchd has been started.
>>> > >> > This means that attempts to use the port will fail.  While it is
>>> > >> > possible to work around this for some NICs using port hotplug, not
>>> all
>>> > >> > port types are supported (for instance vfio), and it requires manual
>>> > >> > intervention.
>>> > >> >
>>> > >> > Fixes: 36af136b690c ("rhel-systemd: Delay shutting down the
>>> services")
>>> > >> > Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1397299
>>> > >> > Suggested-by: Flavio Leitner <fbl@sysclose.org>
>>> > >> > Signed-off-by: Aaron Conole <aconole@redhat.com>
>>>
>> Tested-by: ksundara@redhat.com
>>
>>> > >> > ---
>>> > >> >  rhel/usr_lib_systemd_system_ovs-vswitchd.service | 2 +-
>>> > >> >  1 file changed, 1 insertion(+), 1 deletion(-)
>>> > >>
>>> > >> Ping?  Should I rebase / resend this?  I'm not sure if it still
>>> applies
>>> > >> to the tree.
>>> > >
>>> > > It still applies fine but I'm not comfortable reviewing it myself.  Is
>>> > > Flavio the right one to review it or should someone else?
>>> >
>>> > Flavio had actually suggested it.  I'm CC'ing the tester.  Maybe we can
>>> > at least get a Tested-by tag.
>>>
>>> I didn't realize there was a tester.  I guess that I should have looked
>>> at the bugzilla URL.
>>>
>>> If Maxim tested it successfully, we don't really need him to give us the
>>> Tested-by, we can add it ourselves.  (But now that we've asked, we might
>>> as well get an answer.)
>>>
>>> Thanks,
>>>
>>> Ben.
>>> _______________________________________________
>>> dev mailing list
>>> dev@openvswitch.org
>>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>>>
>> _______________________________________________
>> dev mailing list
>> dev@openvswitch.org
>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
diff mbox

Patch

diff --git a/rhel/usr_lib_systemd_system_ovs-vswitchd.service b/rhel/usr_lib_systemd_system_ovs-vswitchd.service
index 39627e9..22a4c63 100644
--- a/rhel/usr_lib_systemd_system_ovs-vswitchd.service
+++ b/rhel/usr_lib_systemd_system_ovs-vswitchd.service
@@ -1,6 +1,6 @@ 
 [Unit]
 Description=Open vSwitch Forwarding Unit
-After=ovsdb-server.service network-pre.target
+After=ovsdb-server.service network-pre.target systemd-udev-settle.service
 Before=network.target network.service
 Requires=ovsdb-server.service
 ReloadPropagatedFrom=ovsdb-server.service