On Wed, Oct 24, 2012 at 3:45 PM, Ben Pfaff <b...@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 <gshe...@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: 663...@bugs.debian.org
>     Reported-by: Thomas Goirand <z...@debian.org>
>     Reviewed-by: Simon Horman <ho...@verge.net.au>
>     Signed-off-by: Ben Pfaff <b...@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.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to