diff options
author | Greg Rose <gvrose8192@gmail.com> | 2019-06-25 11:45:52 -0700 |
---|---|---|
committer | Justin Pettit <jpettit@ovn.org> | 2019-06-25 16:12:22 -0700 |
commit | 26b3641c9a6e9461e5e307e6e8070753c0d74f55 (patch) | |
tree | 7a2d6f8cf7858d529055e2d49f3cb9b7047ce4fb /rhel | |
parent | 88d2ac50aa4e3383e185b698a1b3a44a6f7b4f80 (diff) | |
download | openvswitch-26b3641c9a6e9461e5e307e6e8070753c0d74f55.tar.gz |
rhel: Fix upgrade path
There is a bug in the upgrade path from the old kmod-openvswitch SysV
based RPM to the new openvswitch-kmod systemd based RPM. Since the
name of the package is changed it is not possible to use the yum
or rpm upgrade options. This prevents passing in a 1 or 2 to the
%postun scriptlet section of the older RPM and that causes the section
to be treated as an 'erase'. The old kmod-openvswitch %postun section
proceeds to erase the symlinks in ../weak-updates/openvwswitch that
the installation of the new package had just created.
Fix this by adding a %posttrans tag to the systemd spec file. This
scriptlet is called after the symlinks have just been erased and
it calls the ovs-kmod-manage.sh script to recreate the symlinks and
run depmod -a again so that the correct kernel modules will be
found and loaded.
VMware-BZ: #236987
Cc: Aaron Conole <aconole@redhat.com>
Cc: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Diffstat (limited to 'rhel')
-rw-r--r-- | rhel/openvswitch-kmod-fedora.spec.in | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/openvswitch-kmod-fedora.spec.in index 92d763f56..a50016d5e 100644 --- a/rhel/openvswitch-kmod-fedora.spec.in +++ b/rhel/openvswitch-kmod-fedora.spec.in @@ -120,6 +120,15 @@ done fi /sbin/depmod -a +%posttrans +# The upgrade path from the older kmod-openvswitch SysV package to +# the newer openvswitch-kmod systemd package will end up removing +# the symlinks to the weak-updates/openvswitch drivers because of +# it's %postun section. We add this section to handle that case. +if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then + %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh +fi + %files %defattr(0644,root,root) /lib/modules/*/extra/openvswitch/*.ko |