diff mbox

[ovs-dev] fedora: do not restart ovn svcs automatically on pkg upgrade

Message ID 20170502201819.3982-1-lrichard@redhat.com
State Accepted
Headers show

Commit Message

Lance Richardson May 2, 2017, 8:18 p.m. UTC
Similar to commit 5771f4765734 ("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>
---
 NEWS                            |  2 ++
 rhel/openvswitch-fedora.spec.in | 24 ++++++------------------
 2 files changed, 8 insertions(+), 18 deletions(-)

Comments

Russell Bryant May 3, 2017, 1:41 a.m. UTC | #1
On Tue, May 2, 2017 at 4:18 PM, Lance Richardson <lrichard@redhat.com> wrote:
> Similar to commit 5771f4765734 ("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>
> ---
>  NEWS                            |  2 ++
>  rhel/openvswitch-fedora.spec.in | 24 ++++++------------------
>  2 files changed, 8 insertions(+), 18 deletions(-)

Thanks!  I applied this to master.
Lance Richardson May 3, 2017, 2:36 a.m. UTC | #2
> From: "Russell Bryant" <russell@ovn.org>
> To: "Lance Richardson" <lrichard@redhat.com>
> Cc: "ovs dev" <dev@openvswitch.org>
> Sent: Tuesday, 2 May, 2017 9:41:39 PM
> Subject: Re: [ovs-dev] [PATCH] fedora: do not restart ovn svcs automatically on pkg upgrade
> 
> On Tue, May 2, 2017 at 4:18 PM, Lance Richardson <lrichard@redhat.com> wrote:
> > Similar to commit 5771f4765734 ("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>
> > ---
> >  NEWS                            |  2 ++
> >  rhel/openvswitch-fedora.spec.in | 24 ++++++------------------
> >  2 files changed, 8 insertions(+), 18 deletions(-)
> 
> Thanks!  I applied this to master.
> 
> --
> Russell Bryant
> 

It would be good to consider this for the 2.7 branch as well.

Thanks,

  Lance
Russell Bryant May 4, 2017, 2:10 a.m. UTC | #3
On Tue, May 2, 2017 at 10:36 PM, Lance Richardson <lrichard@redhat.com> wrote:
>> From: "Russell Bryant" <russell@ovn.org>
>> To: "Lance Richardson" <lrichard@redhat.com>
>> Cc: "ovs dev" <dev@openvswitch.org>
>> Sent: Tuesday, 2 May, 2017 9:41:39 PM
>> Subject: Re: [ovs-dev] [PATCH] fedora: do not restart ovn svcs automatically on pkg upgrade
>>
>> On Tue, May 2, 2017 at 4:18 PM, Lance Richardson <lrichard@redhat.com> wrote:
>> > Similar to commit 5771f4765734 ("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>
>> > ---
>> >  NEWS                            |  2 ++
>> >  rhel/openvswitch-fedora.spec.in | 24 ++++++------------------
>> >  2 files changed, 8 insertions(+), 18 deletions(-)
>>
>> Thanks!  I applied this to master.
>>
>> --
>> Russell Bryant
>>
>
> It would be good to consider this for the 2.7 branch as well.

Done!  applied to branch-2.7, as well.
diff mbox

Patch

diff --git a/NEWS b/NEWS
index 99bb48e..f9d026e 100644
--- a/NEWS
+++ b/NEWS
@@ -33,6 +33,8 @@  Post-v2.7.0
      * Bundles now support hashing by just nw_src or nw_dst.
      * The "learn" action now supports a "limit" option (see ovs-ofctl(8)).
      * The port status bit OFPPS_LIVE now reflects link aliveness.
+   - Fedora Packaging:
+     * OVN services are no longer restarted automatically after upgrade.
 
 v2.7.0 - 21 Feb 2017
 ---------------------
diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in
index 5d53284..8a1d5f3 100644
--- a/rhel/openvswitch-fedora.spec.in
+++ b/rhel/openvswitch-fedora.spec.in
@@ -411,36 +411,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