I can alter the postinst behavior from 1.4 and up branches to the following:

> if upgrade-from-pre-1.4-ovs to 1.4+-ovs then
>   throw a warning that kernel module needs to be reloaded so not
> restarting user space
> else
>   do only userspace restart and use old kernel module
> fi


See other comments below.

On Mon, Jan 16, 2012 at 10:36 AM, Ben Pfaff <b...@nicira.com> wrote:

> On Fri, Jan 13, 2012 at 11:40:50AM -0800, Ansis Atteka wrote:
> > This will make Debian upgrade consistent with Xenserver
> > and RH where user must manually run force-reload-kmod
> > command after the upgrade.
> >
> > Issue: 9128
> >
> > Signed-off-by: Ansis Atteka <aatt...@nicira.com>
> > Reported-by: Michael Kruze <mkr...@nicira.com>
>
> I'm not sure that I support this change.
>
I know. I also feel that this upgrade thing is getting a little bit too much
workarounded for different branches/different platforms. The intent
of this patch was to get OVS to work on Debian exactly the same way
as on Xenserver.

> The warning seems too severe.  Userspace should be able to cooperate
> with newer and older kernel modules (since 1.4), so restarting or
> loading the new kernel module isn't strictly necessary.

When upgrading from 1.3 to 1.4 it looks like 1.4 user-space can't talk
with older 1.3 kernel-space. So kernel reload is necessary for
this particular
upgrade combination.

>  Furthermore,
> if only userspace is being upgraded, there is no advantage to running
> "force-reload-kmod" over the less risky "restart".
>
The warning also should mention rebooting as an alternative, I think.
>
Agree.

>
> In general I think we'd prefer to restart OVS automatically whenever
> the new package is installed, except when that is not going to work
> because we are upgrading from a pre-1.4 version.  Looking at the issue
> you cited, the problem was an upgrade from a 1.3 version of OVS to a
> later version.  It would make sense to me, in that case, to print this
> kind of warning and avoid restarting OVS.  You could use "dpkg
> --compare-versions" to figure out when it is appropriate.

I agree that most of users would like the packaging scripts to trigger
the restart automatically for them. But I also think it would be preferable
to do the upgrade exactly the same way across all platforms (e.g. Xenserver
and RH). AFAIK these two platforms do not trigger automatic restart as
of now.

> I'm not sure that the warning is appropriate in all cases where $2 is
> nonnull.  Did you think about all the cases listed for "postinst"
> here:
>
> http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#s-mscriptsinstact
> (I'm not saying that the behavior is wrong, I'm trying to make sure
> that you thought about it.)
>
I took the "if this is upgrade condition" from dh_installinit autogenerated
code (-r vs -R option),
so it should work correctly (although I tested only simple upgrade and
fresh install).
Anyway I will double check with Debian Policy manual.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to