Bug 1505398 - OVS 2.6 obscures OVS 2.7 due to misuse of the epoch
Summary: OVS 2.6 obscures OVS 2.7 due to misuse of the epoch
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Setup.Engine
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ovirt-4.2.0
: ---
Assignee: Marcin Mirecki
QA Contact: Mor
URL:
Whiteboard:
Depends On:
Blocks: 1503566 1598905
TreeView+ depends on / blocked
 
Reported: 2017-10-23 13:52 UTC by Marcin Mirecki
Modified: 2018-08-12 22:44 UTC (History)
7 users (show)

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".
Clone Of:
: 1598905 (view as bug list)
Environment:
Last Closed: 2017-12-20 10:46:17 UTC
oVirt Team: Network
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3415181 0 None None None 2018-08-12 22:44:11 UTC
oVirt gerrit 84300 0 master MERGED Modify spec Require's to ensure ovs beta package 1:2.6.1 is not consumed 2020-06-19 15:03:48 UTC
oVirt gerrit 84381 0 master MERGED automation: install rpm if spec or make files changes 2020-06-19 15:03:48 UTC
oVirt gerrit 85175 0 master MERGED packaging: spec: Require correct version of openvswitch 2020-06-19 15:03:48 UTC
oVirt gerrit 85193 0 master MERGED packaging: require ovirt-provider-ovn >= 1.2.1 2020-06-19 15:03:48 UTC

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


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