Bug 1505398

Summary: OVS 2.6 obscures OVS 2.7 due to misuse of the epoch
Product: [oVirt] ovirt-engine Reporter: Marcin Mirecki <mmirecki>
Component: Setup.EngineAssignee: Marcin Mirecki <mmirecki>
Status: CLOSED CURRENTRELEASE QA Contact: Mor <mkalfon>
Severity: high Docs Contact:
Priority: medium    
Version: 4.2.0CC: bugs, danken, didi, fleitner, gveitmic, mkalfon, mmirecki
Target Milestone: ovirt-4.2.0Flags: rule-engine: ovirt-4.2+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
If Open vSwitch is already installed, the engine installation will fail and an Open vSwitch conflict warning will appear. (This will not occur if Open vSwitch has never been installed.) The solution is to download the correct version of Open vSwitch (for example, "yumdownloader openvswitch-2.7.2") and to install the RPM ("yum downgrade openvswitch-2.7.2-10.git20170914.el7fdp.x86_64.rpm"). If using the RPM directly causes yum to display a warning, clear the yum cache: "yum clean all".
Story Points: ---
Clone Of:
: 1598905 (view as bug list) Environment:
Last Closed: 2017-12-20 10:46:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1503566, 1598905    

Description Marcin Mirecki 2017-10-23 13:52:27 UTC
Adding ovs 2.7.2 to our repo does not cause ovs 2.6 to be updated as 2.6 has epoch set to a higher value (Epoch 1) than 2.7.2 (Epoch 0).
So even if we have 0:2.7.2 we are still installing 1:2.6.1.
Reason for this is that openvswitch developers doesn't want to support "downgrade" from beta to non-beta.

Some suggested solutions include modify engine-setup with something like:
  rpm -e 1:openvswitch-2.6 && yum install openvswitch

  if [ `rpm -q openvswtich` -eq 1:2.6 ] then
    pushd temp
    yum-download openvswtich
    rpm -U --force openvswtich.rpm
    popd
  done

Comment 1 Mor 2017-12-04 15:43:44 UTC
RPM spec file behaviour is verified on: 
ovirt-provider-ovn-1.2.1-1.el7ev

"Error: ovirt-provider-ovn conflicts with 1:openvswitch-2.6.1-3.git20161206.el7fdb.x86_64"

"Error: ovirt-provider-ovn-driver conflicts with 1:openvswitch-2.6.1-3.git20161206.el7fdb.x86_64"


Failed on doc text for workaround:

Option 1: '--allowerasing' is not an option available on yum package manager that is used in RHEL.

Option 2: if you download the RPM using yumdownloader and try to install it, yum will not install the package:

# yum install openvswitch-2.7.2-10.git20170914.el7fdp.x86_64.rpm
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Examining openvswitch-2.7.2-10.git20170914.el7fdp.x86_64.rpm: openvswitch-2.7.2-10.git20170914.el7fdp.x86_64
openvswitch-2.7.2-10.git20170914.el7fdp.x86_64.rpm: does not update installed package.
Error: Nothing to do

Comment 2 Mor 2017-12-05 11:49:14 UTC
Suggested doc text change (to perform a switch from epoch-1 to epoch-0): 

1. Erase specifically the unwanted epoch-1 package:
   yum remove 1:openvswitch-2.6.1-3.git20161206.el7fdb.x86_64

2. Install the correct repository RPM, which supplies repository files for epoch-0. --- I'm not sure about a proper URL to supply here ? --
   yum install <epoch_0_release.rpm>

3. Install the correct package using yum:
   yum install openvswitch-2.7.2-10.git20170914.el7fdp.x86_64.rpm

This is checked and found to be working.

Comment 3 Yaniv Kaul 2017-12-06 11:23:22 UTC
Dan, is that a blocker for 4.2.0?

Comment 4 Marcin Mirecki 2017-12-06 15:57:03 UTC
Doctext updated

Comment 5 Mor 2017-12-07 07:30:52 UTC
If you use yum directly, it will generate a WARNING message each time a user runs yum: "RPMDB altered outside of yum", and it will force the user to sync the DBs (and run additional command). What's wrong with just removing the improper packages and installing the correct ones using yum?

Comment 6 Mor 2017-12-07 07:31:19 UTC
(In reply to Mor from comment #5)
> If you use yum directly, it will generate a WARNING message each time a user
> runs yum: "RPMDB altered outside of yum", and it will force the user to sync
> the DBs (and run additional command). What's wrong with just removing the
> improper packages and installing the correct ones using yum?

* rpm

Comment 7 Mor 2017-12-07 08:25:53 UTC
In case we prefer to leave the doc text as it is, I would add additional note that using 'rpm' directly might cause a WARNING in yum. To fix it, yum cache can be cleaned using 'yum clean all'.

Comment 8 Sandro Bonazzola 2017-12-20 10:46:17 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.

Comment 9 Dan Kenigsberg 2018-01-16 11:07:16 UTC
Please follow the Doc Text of this bug if you get

 Error: ovirt-provider-ovn-driver conflicts with 1:openvswitch-2.6.1-10.git20161206.el7fdb.x86_64