[ovs-dev] [PATCH 2/2] debian: Use restart --save-flows=yes during postinst.

Gurucharan Shetty gshetty at nicira.com
Wed Oct 24 23:28:44 UTC 2012


On Wed, Oct 24, 2012 at 3:45 PM, Ben Pfaff <blp at nicira.com> wrote:

> On Wed, Oct 24, 2012 at 02:21:40PM -0700, Gurucharan Shetty wrote:
> > When debian package for openvswitch-switch is upgraded,
> > restart the daemons using the "--save-flows=yes" flag.
> > This will save the openflow flows in vswitchd and
> > re-apply it after the upgrade.
> >
> > Feature #13555.
> > Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
>
> I think that _dh_* is supposed to be reserved namespace for use by
> debhelper, so I would remove the _dh_ prefix.
>
> I don't think it's a good idea to remove #DEBEHELPER#, because
> debhelper does more than just restart the daemon.  Maybe that's all it
> does in this postinst script now (did you check?), but it could do
> more in the future, in which case we'd end up with surprising
> problems.
>

> Actually we already ran into related problems with init scripts, see
> commit 8a5b3cfd91841c97fbc8a003857cacbd602646ed:
>
>     debian: Use a different way to avoid failing install without kernel
> module.
>
>     The dh_installinit --error-handler option makes a lot of sense, but
> after
>     playing with it for a while I could not figure out a nice way to use it
>     only for openvswitch-switch without either duplicating the
> dh_installinit
>     fragments in postinst and prerm (the actual bug that was reported) or
>     omitting them for some package.
>
>     Also, we forgot to write the error handler function for the prerm.
>
>     This commit switches to a different way to avoid failing the install
> when
>     the kernel module is not available, without using --error-handler.
>
>     CC: 663051 at bugs.debian.org
>     Reported-by: Thomas Goirand <zigo at debian.org>
>     Reviewed-by: Simon Horman <horms at verge.net.au>
>     Signed-off-by: Ben Pfaff <blp at nicira.com>
>
> Looking at the solution we used there, it might be easiest to, instead
> of using a command line option, to use an environment variable and
> then put above #DEBEHELPER# the commands to set and export that
> variable, like we do with OVS_MISSING_KMOD_OK.
>
> Sorry about all the trouble.
>
Thanks. This makes it more easier. I have sent a new patch.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20121024/17dc751f/attachment-0003.html>


More information about the dev mailing list