Skip to content

Commit

Permalink
fedora: do not restart ovn svcs automatically on pkg upgrade
Browse files Browse the repository at this point in the history
Similar to commit 5771f47 ("fedora: do not restart the
service on a pkg upgrade"), this change eliminates the
automatic restart of OVN services after upgrade.

Note that the post-uninstall scriptlet affected by this change
is executed from the previously installed package when upgrading,
so existing installations need to go through two package upgrades
before this change will take effect.

Signed-off-by: Lance Richardson <lrichard@redhat.com>
Signed-off-by: Russell Bryant <rbryant@redhat.com>
  • Loading branch information
hlrichardson authored and russellb committed May 4, 2017
1 parent b1bfe0c commit d0ff4f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
5 changes: 5 additions & 0 deletions NEWS
@@ -1,3 +1,8 @@
v2.7.1 - xx xxx xxxx
---------------------
- Fedora Packaging:
* OVN services are no longer restarted automatically after upgrade.

v2.7.0 - 21 Feb 2017
---------------------
- Utilities and daemons that support SSL now allow protocols and
Expand Down
24 changes: 6 additions & 18 deletions rhel/openvswitch-fedora.spec.in
Expand Up @@ -410,36 +410,24 @@ if [ $1 -eq 0 ] ; then
fi

%postun ovn-central
%if 0%{?systemd_postun_with_restart:1}
%systemd_postun_with_restart ovn-northd.service
%if 0%{?systemd_postun:1}
%systemd_postun ovn-northd.service
%else
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ "$1" -ge "1" ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart ovn-northd.service >/dev/null 2>&1 || :
fi
%endif

%postun ovn-host
%if 0%{?systemd_postun_with_restart:1}
%systemd_postun_with_restart ovn-controller.service
%if 0%{?systemd_postun:1}
%systemd_postun ovn-controller.service
%else
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ "$1" -ge "1" ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart ovn-controller.service >/dev/null 2>&1 || :
fi
%endif

%postun ovn-vtep
%if 0%{?systemd_postun_with_restart:1}
%systemd_postun_with_restart ovn-controller-vtep.service
%if 0%{?systemd_postun:1}
%systemd_postun ovn-controller-vtep.service
%else
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ "$1" -ge "1" ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart ovn-controller-vtep.service >/dev/null 2>&1 || :
fi
%endif

%postun selinux-policy
Expand Down

0 comments on commit d0ff4f4

Please sign in to comment.