Bug 1399047 - ovirt-provider-ovn.rpm should reload provider service post installation
Summary: ovirt-provider-ovn.rpm should reload provider service post installation
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-provider-ovn
Classification: oVirt
Component: provider
Version: unspecified
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ovirt-4.1.0-beta
: ---
Assignee: Marcin Mirecki
QA Contact: Mor
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-28 07:20 UTC by Mor
Modified: 2017-02-15 15:03 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-15 15:03:31 UTC
oVirt Team: Network
rule-engine: ovirt-4.1+


Attachments (Terms of Use)

Description Mor 2016-11-28 07:20:24 UTC
Description of problem:
When upgrading the OVN provider RPM package while the provider server is running (ovirt-provider-ovn), filesystem changes take effect, but the service is still running old code.

This problem might also be relevant to the reinstall and remove RPM actions, but not yet tested. And for packages: ovirt-provider-ovn-driver and OVS.

Version-Release number of selected component (if applicable):
oVirt engine: Version 4.1.0-0.0.master.20161122231312.git214a7b3.el7.centos

How reproducible:
100%

Steps to Reproduce:
1. On the oVIrt provider OVN server, make sure ovirt-provider-ovn service is running.
2. Try to upgrade the RPM package: yum -y upgrade <ovirt_provider_ovn_rpm_pakcage.rpm>

Actual results:
Provider is still running the code before the changes.

Expected results:
Provider service should be restarted post upgrade, or systemd daemon should be reloaded for the changes to take effect fully on the system.

Additional info:
We should restart the service post successful completion of upgrade.

Comment 2 Mor 2016-12-28 10:00:34 UTC
Hi Marcin,

It's not specificity mentioned on the "Steps to reproduce". But I did mention that it could also be relevant to the yum "reinstall" RPM action.

I tested it with "reinstall", and it doesn't handle the reload properly. 

See the shell log:

[root@network-ge-3 ~]# systemctl status ovirt-provider-ovn
● ovirt-provider-ovn.service - oVirt OVN provider
   Loaded: loaded (/usr/lib/systemd/system/ovirt-provider-ovn.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2016-12-28 11:39:57 IST; 17min ago
 Main PID: 31335 (python)
   CGroup: /system.slice/ovirt-provider-ovn.service
           └─31335 /usr/bin/python /usr/share/ovirt-provider-ovn/ovirt_provider_ovn.py

Dec 28 11:39:57 network-ge-3.scl.lab.tlv.redhat.com systemd[1]: Started oVirt OVN provider.
Dec 28 11:39:57 network-ge-3.scl.lab.tlv.redhat.com systemd[1]: Starting oVirt OVN provider...
[root@network-ge-3 ~]# date
Wed Dec 28 11:57:18 IST 2016
[root@network-ge-3 ~]# yum -v -y reinstall ovirt-provider-ovn-1.0-1.20161228093622.git3b3d6e1.fc24.noarch.rpm 
Not loading "rhnplugin" plugin, as it is disabled
Loading "langpacks" plugin
Loading "product-id" plugin
Loading "search-disabled-repos" plugin
Loading "subscription-manager" plugin
Loading "versionlock" plugin
Adding en_US.UTF-8 to language list
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Config time: 0.191
Yum version: 3.4.3
rpmdb time: 0.000
Examining ovirt-provider-ovn-1.0-1.20161228093622.git3b3d6e1.fc24.noarch.rpm: ovirt-provider-ovn-1.0-1.20161228093622.git3b3d6e1.fc24.noarch
Resolving Dependencies
--> Running transaction check
---> Package ovirt-provider-ovn.noarch 0:1.0-1.20161228093622.git3b3d6e1.fc24 will be reinstalled
Checking deps for ovirt-provider-ovn.noarch 0:1.0-1.20161228093622.git3b3d6e1.fc24 - u
looking for ('config(ovirt-provider-ovn)', 'EQ', ('0', '1.0', '1.20161228093622.git3b3d6e1.fc24')) as a requirement of ovirt-provider-ovn.noarch 0:1.0-1.20161228093622.git3b3d6e1.fc24 - u
looking for ('kernel', 'GE', ('0', '3.10.0', '512')) as a requirement of ovirt-provider-ovn.noarch 0:1.0-1.20161228093622.git3b3d6e1.fc24 - u
looking for ('openvswitch-ovn-central', 'GE', ('0', '2.6', None)) as a requirement of ovirt-provider-ovn.noarch 0:1.0-1.20161228093622.git3b3d6e1.fc24 - u
looking for ('python-openvswitch', 'GE', ('0', '2.6', None)) as a requirement of ovirt-provider-ovn.noarch 0:1.0-1.20161228093622.git3b3d6e1.fc24 - u
looking for ('/bin/sh', None, (None, None, None)) as a requirement of ovirt-provider-ovn.noarch 0:1.0-1.20161228093622.git3b3d6e1.fc24 - u
looking for ('/bin/sh', None, (None, None, None)) as a requirement of ovirt-provider-ovn.noarch 0:1.0-1.20161228093622.git3b3d6e1.fc24 - u
looking for ('/bin/sh', None, (None, None, None)) as a requirement of ovirt-provider-ovn.noarch 0:1.0-1.20161228093622.git3b3d6e1.fc24 - u
looking for ('firewalld-filesystem', None, (None, None, None)) as a requirement of ovirt-provider-ovn.noarch 0:1.0-1.20161228093622.git3b3d6e1.fc24 - u
--> Finished Dependency Resolution
Dependency Process ending
Depsolve time: 1.776

Dependencies Resolved

===================================================================================================================================================================================================================
 Package                               Arch                      Version                                                  Repository                                                                          Size
===================================================================================================================================================================================================================
Reinstalling:
 ovirt-provider-ovn                    noarch                    1.0-1.20161228093622.git3b3d6e1.fc24                     /ovirt-provider-ovn-1.0-1.20161228093622.git3b3d6e1.fc24.noarch                    115 k

Transaction Summary
===================================================================================================================================================================================================================
Reinstall  1 Package

Total size: 115 k
Installed size: 115 k
Downloading packages:
Member: ovirt-provider-ovn.noarch 0:1.0-1.20161228093622.git3b3d6e1.fc24 - u
Adding Package ovirt-provider-ovn-1.0-1.20161228093622.git3b3d6e1.fc24.noarch in mode u
Running transaction check
Transaction check time: 0.115
Running transaction test
Transaction test succeeded
Transaction test time: 0.021
Member: ovirt-provider-ovn.noarch 0:1.0-1.20161228093622.git3b3d6e1.fc24 - u
Adding Package ovirt-provider-ovn-1.0-1.20161228093622.git3b3d6e1.fc24.noarch in mode u
Running transaction
  Installing : ovirt-provider-ovn-1.0-1.20161228093622.git3b3d6e1.fc24.noarch                                                                                                                                  1/1 
Setting up Package Sacks
Reading version lock configuration
pkgsack time: 0.046
Installed products updated.
  Verifying  : ovirt-provider-ovn-1.0-1.20161228093622.git3b3d6e1.fc24.noarch                                                                                                                                  1/1 
VerifyTransaction time: 0.299
Transaction time: 6.597

Installed:
  ovirt-provider-ovn.noarch 0:1.0-1.20161228093622.git3b3d6e1.fc24                                                                                                                                                 

Complete!
[root@network-ge-3 ~]# systemctl status ovirt-provider-ovn
● ovirt-provider-ovn.service - oVirt OVN provider
   Loaded: loaded (/usr/lib/systemd/system/ovirt-provider-ovn.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2016-12-28 11:39:57 IST; 17min ago
 Main PID: 31335 (python)
   CGroup: /system.slice/ovirt-provider-ovn.service
           └─31335 /usr/bin/python /usr/share/ovirt-provider-ovn/ovirt_provider_ovn.py

Dec 28 11:39:57 network-ge-3.scl.lab.tlv.redhat.com systemd[1]: Started oVirt OVN provider.
Dec 28 11:39:57 network-ge-3.scl.lab.tlv.redhat.com systemd[1]: Starting oVirt OVN provider...
[root@network-ge-3 ~]# ps -o etime 31335
    ELAPSED
      17:39

Comment 3 Dan Kenigsberg 2017-01-15 09:06:10 UTC
Would you retest this on el7, and make sure that the version before `yum reinstall` is different than the one before. If anything fails, please include yum.log.

Comment 4 Dan Kenigsberg 2017-01-15 09:14:37 UTC
If the bug is seen only with `yum reinstall` but never with `yum upgrade`, we should not care. We need to restart the service only if the code changes.

Comment 5 Mor 2017-01-15 09:26:07 UTC
(In reply to Dan Kenigsberg from comment #3)
> Would you retest this on el7, and make sure that the version before `yum
> reinstall` is different than the one before. If anything fails, please
> include yum.log.

I'm using the "reinstall" action for package that is already installed in the system. "reinstall" works only with the same package name (version) that is already installed.

Comment 6 Dan Kenigsberg 2017-01-15 09:46:45 UTC
I never use "reinstall" myself (nor do I know why it is useful). But if the old version is the same as the new version, there is no need to restart the service.

If "upgrade" works, we're good.

Comment 7 Mor 2017-01-15 10:06:38 UTC
(In reply to Dan Kenigsberg from comment #6)
> I never use "reinstall" myself (nor do I know why it is useful). But if the
> old version is the same as the new version, there is no need to restart the
> service.
> 
> If "upgrade" works, we're good.

For what I know, reinstall is useful in cases were you want to repair the current installation, for example, in cases of damage to files, databases and/or any installed objects.

Comment 8 Mor 2017-01-15 12:16:36 UTC
Update is verified on version: ovirt-provider-ovn.noarch 0:1.0-2.20170108083010.git799f87f.el7.centos


Note You need to log in before you can comment on or make changes to this bug.