On Wed, Apr 10, 2013 at 03:41:23PM -0700, Gurucharan Shetty wrote:
> Currently, when we upgrade openvswitch packages, we do restart
> of userspace daemons. This does not replace the kernel module.
> 
> But almost everytime, we want to also use the new kernel module
> that comes with the new version. This means that we need to
> manually do a "force-reload-kmod". This step, along with reloading
> kernel module also restarts userspace daemons. This gives us a
> total of 2 restarts. This is quite expensive in a hypervisor with
> hundreds of VMs sending real traffic. This also hurts the controller
> as it gets 2 reconnections in a short amount of time.
> 
> With this patch, during a package upgrade, we will automatically do
> a force-reload-kmod while openvswitch-switch is installed. Usually,
> when openvswitch is upgraded, both kernel package and userspace
> package is upgraded together with a "dpkg -i" on command line. This
> results in both packages unpacked first and then configured. This
> ensures that we use the new kernel module during the postinst of
> openvswitch-switch package. One can also install the kernel package
> first and then install the userspace package in 2 separate steps.
> 
> If anyone wants to just restart the userspace package instead of
> force-reload-kmod, they can set the value of OVS_FORCE_RELOAD_KMOD=no
> while installing the package.
> Ex: OVS_FORCE_RELOAD_KMOD=no dpkg -i openvswitch-switch*
> 
> Signed-off-by: Gurucharan Shetty <gshe...@nicira.com>

Did you consider using dpkg "triggers" to accomplish this instead?
Installing either openvswitch-switch or a kernel module package would
fire the appropriate trigger, but the implementation of the triggers
would only do either "force-reload-kmod" or "restart" even if both
triggers had fired.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to