[ovs-dev] [PATCH] debian: Change openvswitch restart logic for kernel package.

Ben Pfaff blp at nicira.com
Thu Jan 17 19:24:52 UTC 2013


On Thu, Jan 17, 2013 at 10:30:28AM -0800, Gurucharan Shetty wrote:
> Currently, every time we install the non-dkms openvswitch kernel package,
> we restart openvswitch. This is unnecessary when there is already a kernel
> module insmodded.
> 
> With this patch, we only restart openvswitch if there is no kernel module
> currently insmodded (which is a case for a fresh install of openvswitch).
> 
> If someone wants to use the latest kernel module after an upgrade, they need
> to run "/etc/init.d/openvswitch-switch force-reload-kmod" manually.
> 
> Issue #13556
> Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>

The situation here is funny.  First, the comment previously in the
script:
> -# If the switch is running, restart it.  This ensures that we are using the
> -# latest kernel module, because the init script will unload and reload the
> -# module.
was just wrong, because the init script does not unload and reload the
module on "restart".

Second, the situation we end up in after the patch seems even odder.
The init script refuses to start Open vSwitch if the kernel module
cannot be loaded.  So it would be odd indeed for the kernel module to
not be loaded but to have the switch running.

I think that the situation that the script here is intended to cover
is:

        - The admin installs openvswitch-switch but there's no kernel
          module so ovs-vswitchd doesn't start.

        - The admin installs a kernel module.  Now ovs-vswitchd should
          start.

but I'm not sure exactly how we should do that.

Thought?



More information about the dev mailing list