Message ID | 1448929293-5072-1-git-send-email-guru@ovn.org |
---|---|
State | Accepted |
Headers | show |
On Mon, Nov 30, 2015 at 04:21:33PM -0800, Gurucharan Shetty wrote: > After some experimentation on Ubuntu15.04, I see the > following behavior. > > 1. If you install openvswitch-switch with 'apt-get install', > then you automatically get a upstart and systemd config files > for openvswitch. The integration with 'interfaces' fails > because both the upstart and systemd jobs do not have logic > to handle it. > > The above behavior will likely get fixed soon in upstream > Ubuntu. > > 2. If you install openvswitch-switch via the packages > created from the openvswitch repo, there is no systemd or > upstart conf files installed. But systemd notices this > and creates a runtime openvswitch conf file which does > nothing but call back the sysv startup script. > > In the above case when you call > "/etc/init.d/openvswitch-switch start", it inturn calls > "/bin/systemctl start openvswitch-switch.service". But the > above for some reason simply hangs. It looks like a call > to ifup when invoked in this manner does not return. > I am not sure why this is happening. > > We can avoid the above behavior completely by skipping the > systemctl redirect as done in this commit. > > Signed-off-by: Gurucharan Shetty <guru@ovn.org> Does this fix #1 or #2 or both?
> > > Does this fix #1 or #2 or both? > It fixes #2. It will fix #1 too as long as upstream Ubuntu does not change the sysv script that we provide.
On Tue, Dec 01, 2015 at 11:51:34AM -0800, Guru Shetty wrote: > > > > > > Does this fix #1 or #2 or both? > > > It fixes #2. It will fix #1 too as long as upstream Ubuntu does not change > the sysv script that we provide. OK, I understand. Might be worth clarifying that a little in the commit message. Acked-by: Ben Pfaff <blp@ovn.org>
On 1 December 2015 at 12:00, Ben Pfaff <blp@ovn.org> wrote: > On Tue, Dec 01, 2015 at 11:51:34AM -0800, Guru Shetty wrote: > > > > > > > > > Does this fix #1 or #2 or both? > > > > > It fixes #2. It will fix #1 too as long as upstream Ubuntu does not > change > > the sysv script that we provide. > > OK, I understand. Might be worth clarifying that a little in the commit > message. > > Acked-by: Ben Pfaff <blp@ovn.org> > Thanks I applied this to master, 2.4 and 2.3
diff --git a/debian/openvswitch-switch.init b/debian/openvswitch-switch.init index 8e156da..aece780 100755 --- a/debian/openvswitch-switch.init +++ b/debian/openvswitch-switch.init @@ -27,6 +27,8 @@ (test -x /usr/sbin/ovs-vswitchd && test -x /usr/sbin/ovsdb-server) || exit 0 +_SYSTEMCTL_SKIP_REDIRECT=yes + . /usr/share/openvswitch/scripts/ovs-lib test -e /etc/default/openvswitch-switch && . /etc/default/openvswitch-switch
After some experimentation on Ubuntu15.04, I see the following behavior. 1. If you install openvswitch-switch with 'apt-get install', then you automatically get a upstart and systemd config files for openvswitch. The integration with 'interfaces' fails because both the upstart and systemd jobs do not have logic to handle it. The above behavior will likely get fixed soon in upstream Ubuntu. 2. If you install openvswitch-switch via the packages created from the openvswitch repo, there is no systemd or upstart conf files installed. But systemd notices this and creates a runtime openvswitch conf file which does nothing but call back the sysv startup script. In the above case when you call "/etc/init.d/openvswitch-switch start", it inturn calls "/bin/systemctl start openvswitch-switch.service". But the above for some reason simply hangs. It looks like a call to ifup when invoked in this manner does not return. I am not sure why this is happening. We can avoid the above behavior completely by skipping the systemctl redirect as done in this commit. Signed-off-by: Gurucharan Shetty <guru@ovn.org> --- debian/openvswitch-switch.init | 2 ++ 1 file changed, 2 insertions(+)