diff mbox

[ovs-dev] fedora: do not restart the service on a pkg upgrade

Message ID 1476810282-26272-1-git-send-email-fbl@redhat.com
State Accepted
Delegated to: Russell Bryant
Headers show

Commit Message

Flavio Leitner Oct. 18, 2016, 5:04 p.m. UTC
There is no reliable way to restore the previous networking
state after a service restart. Many things like firewall
configuration, traffic shaping, stacked devices, custom setups
are completely out of OVS control.

The OVS might be providing the network used for remote
administration, so do not automatically restart the service
during a package upgrade.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
---
 NEWS                            | 2 ++
 rhel/openvswitch-fedora.spec.in | 8 ++------
 2 files changed, 4 insertions(+), 6 deletions(-)

Comments

Russell Bryant Oct. 19, 2016, 7:26 p.m. UTC | #1
On Tue, Oct 18, 2016 at 1:04 PM, Flavio Leitner <fbl@redhat.com> wrote:

> There is no reliable way to restore the previous networking
> state after a service restart. Many things like firewall
> configuration, traffic shaping, stacked devices, custom setups
> are completely out of OVS control.
>
> The OVS might be providing the network used for remote
> administration, so do not automatically restart the service
> during a package upgrade.
>
> Signed-off-by: Flavio Leitner <fbl@redhat.com>
>

Do you think this should be backported, as well?
Flavio Leitner Oct. 20, 2016, 12:48 p.m. UTC | #2
On Wed, Oct 19, 2016 at 03:26:10PM -0400, Russell Bryant wrote:
> On Tue, Oct 18, 2016 at 1:04 PM, Flavio Leitner <fbl@redhat.com> wrote:
> 
> > There is no reliable way to restore the previous networking
> > state after a service restart. Many things like firewall
> > configuration, traffic shaping, stacked devices, custom setups
> > are completely out of OVS control.
> >
> > The OVS might be providing the network used for remote
> > administration, so do not automatically restart the service
> > during a package upgrade.
> >
> > Signed-off-by: Flavio Leitner <fbl@redhat.com>
> >
> 
> Do you think this should be backported, as well?

Yeah, it sounds like a good idea.
Thanks Russell,
Russell Bryant Oct. 20, 2016, 4:50 p.m. UTC | #3
On Thu, Oct 20, 2016 at 8:48 AM, Flavio Leitner <fbl@redhat.com> wrote:

> On Wed, Oct 19, 2016 at 03:26:10PM -0400, Russell Bryant wrote:
> > On Tue, Oct 18, 2016 at 1:04 PM, Flavio Leitner <fbl@redhat.com> wrote:
> >
> > > There is no reliable way to restore the previous networking
> > > state after a service restart. Many things like firewall
> > > configuration, traffic shaping, stacked devices, custom setups
> > > are completely out of OVS control.
> > >
> > > The OVS might be providing the network used for remote
> > > administration, so do not automatically restart the service
> > > during a package upgrade.
> > >
> > > Signed-off-by: Flavio Leitner <fbl@redhat.com>
> > >
> >
> > Do you think this should be backported, as well?
>
> Yeah, it sounds like a good idea.
> Thanks Russell,
>

OK, I applied this to master, branch-2.6, and branch-2.5.

Thanks,
diff mbox

Patch

diff --git a/NEWS b/NEWS
index 9b6fa35..d07ec45 100644
--- a/NEWS
+++ b/NEWS
@@ -33,6 +33,8 @@  Post-v2.6.0
    - DPDK:
      * New option 'n_rxq_desc' and 'n_txq_desc' fields for DPDK interfaces
        which set the number of rx and tx descriptors to use for the given port.
+   - Fedora packaging:
+     * A package upgrade does not automatically restart OVS service.
 
 v2.6.0 - 27 Sep 2016
 ---------------------
diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in
index eda8767..ab8d411 100644
--- a/rhel/openvswitch-fedora.spec.in
+++ b/rhel/openvswitch-fedora.spec.in
@@ -344,14 +344,10 @@  rm -rf $RPM_BUILD_ROOT
 /usr/sbin/semodule -i %{_datadir}/selinux/packages/%{name}/openvswitch-custom.pp &> /dev/null || :
 
 %postun
-%if 0%{?systemd_postun_with_restart:1}
-    %systemd_postun_with_restart %{name}.service
+%if 0%{?systemd_postun:1}
+    %systemd_postun %{name}.service
 %else
     /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-    if [ "$1" -ge "1" ] ; then
-    # Package upgrade, not uninstall
-        /bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
-    fi
 %endif
 
 %postun ovn-central