Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1598905

Summary: fix https://access.redhat.com/solutions/3415181 with a proper workaround to ovs-2.6 epoch problem
Product: Red Hat Enterprise Virtualization Manager Reporter: jcastran
Component: openvswitchAssignee: Jiri Belka <jbelka>
Status: CLOSED CURRENTRELEASE QA Contact: Meni Yakove <myakove>
Severity: high Docs Contact:
Priority: medium    
Version: 4.2.7CC: aren.dej, bugs, danken, didi, eheftman, fleitner, jbelka, jbryant, jcastran, mburman, mkalfon, mmirecki
Target Milestone: ovirt-4.2.6   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1505398 Environment:
Last Closed: 2018-08-13 10:05:04 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: 1505398    
Bug Blocks: 1503566    

Description jcastran 2018-07-06 19:50:51 UTC
Cloning this old bug as the issue appears to be the exact same with another version.

Looking at the notes below we see that 2.6.1-10.git20161206.el7fdb is a "higher" version than the 4.2 versions.
~~~~~~~~~~~~~~~~~~ Notes ~~~~~~~~~~~~~~~~~~
[root@r74 ~]# rpm -q openvswitch
openvswitch-2.9.0-47.el7fdp.2.x86_64

[root@r74 ~]# yum list openvswitch --showduplicates --enablerepo=rhel-7-server-rhv-4.1-rpms
Installed Packages
openvswitch.x86_64      2.9.0-47.el7fdp.2                  @rhel-7-server-rhv-4.2-manager-rpms
Available Packages
openvswitch.x86_64      2.0.0-7.el7                        rhel-7-server-optional-rpms        
openvswitch.x86_64      2.7.2-1.git20170719.el7fdp         rhel-7-server-rhv-4.1-rpms         
openvswitch.x86_64      2.7.3-2.git20171010.el7fdp         rhel-7-server-rhv-4.1-rpms         
openvswitch.x86_64      2.7.3-3.git20180112.el7fdp         rhel-7-server-rhv-4.1-rpms         
openvswitch.x86_64      2.9.0-1.el7fdp                     rhel-7-server-rhv-4.1-rpms         
openvswitch.x86_64      2.9.0-19.el7fdp                    rhel-7-server-rhv-4.1-rpms         
openvswitch.x86_64      2.9.0-19.el7fdp                    rhel-7-server-rhv-4.2-manager-rpms 
openvswitch.x86_64      2.9.0-47.el7fdp.1                  rhel-7-server-rhv-4.2-manager-rpms 
openvswitch.x86_64      2.9.0-47.el7fdp.2                  rhel-7-server-rhv-4.2-manager-rpms 
openvswitch.x86_64      1:2.6.1-10.git20161206.el7fdb      rhel-7-server-rhv-4.1-rpms         



[root@r74 ~]# yum update openvswitch --enablerepo=rhel-7-server-rhv-4.1-rpms
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager, versionlock
Resolving Dependencies
--> Running transaction check
---> Package openvswitch.x86_64 0:2.9.0-47.el7fdp.2 will be updated
---> Package openvswitch.x86_64 1:2.6.1-10.git20161206.el7fdb will be an update
--> Processing Conflict: ovirt-provider-ovn-1.2.11-1.el7ev.noarch conflicts openvswitch = 1:2.6.1
--> Finished Dependency Resolution
Error: ovirt-provider-ovn conflicts with 1:openvswitch-2.6.1-10.git20161206.el7fdb.x86_64
 You could try using --skip-broken to work around the problem

================================================

According to the 4.1 to 4.2 documentation they should first enable the 4.2 repositories, then update which results in this error since openvswitch is installed.

Removing the package will take out a few dependencies.
   Removing:
    openvswitch             x86_64 2.9.0-47.el7fdp.2   @rhel-7-server-rhv-4.2-manager-rpms  22 M
   Removing for dependencies:
    openvswitch-ovn-central x86_64 2.9.0-47.el7fdp.2   @rhel-7-server-rhv-4.2-manager-rpms 2.4 M
    openvswitch-ovn-common  x86_64 2.9.0-47.el7fdp.2   @rhel-7-server-rhv-4.2-manager-rpms 6.7 M
    ovirt-provider-ovn      noarch 1.2.11-1.el7ev      @rhel-7-server-rhv-4.2-manager-rpms 504 k


~~~~~~~~~~~~~~~~~~ REPRODUCER STEPS~~~~~~~~~~~~~~~~~~
https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.2/html/upgrade_guide/upgrading_to_red_hat_virtualization_manager_4.2

Step 2 is to enable the repos
Step 3 will result in this issue since we are updating with both 4.1 and 4.2 repos enabled.





+++ This bug was initially created as a clone of Bug #1505398 +++

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

--- Additional comment from Mor on 2017-12-04 10:43:44 EST ---

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

--- Additional comment from Mor on 2017-12-05 06:49:14 EST ---

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.

--- Additional comment from Yaniv Kaul on 2017-12-06 06:23:22 EST ---

Dan, is that a blocker for 4.2.0?

--- Additional comment from Marcin Mirecki on 2017-12-06 10:57:03 EST ---

Doctext updated

--- Additional comment from Mor on 2017-12-07 02:30:52 EST ---

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?

--- Additional comment from Mor on 2017-12-07 02:31:19 EST ---

(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

--- Additional comment from Mor on 2017-12-07 03:25:53 EST ---

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'.

--- Additional comment from Sandro Bonazzola on 2017-12-20 05:46:17 EST ---

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.

--- Additional comment from Dan Kenigsberg on 2018-01-16 06:07:16 EST ---

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

Comment 2 Aaren 2018-07-16 18:34:24 UTC
I am seeing a similar error with this during a 4.1 to 4.2 update (both 4.1 and 4.2 repos enabled)...

--> Finished Dependency Resolution
Error: ovirt-provider-ovn conflicts with 1:python-openvswitch-2.6.1-10.git20161206.el7fdb.noarch
Error: ovirt-provider-ovn conflicts with 1:openvswitch-2.6.1-10.git20161206.el7fdb.x86_64
Error: ovirt-provider-ovn conflicts with 1:openvswitch-ovn-common-2.6.1-10.git20161206.el7fdb.x86_64
Error: ovirt-engine-setup-plugin-ovirt-engine conflicts with 1:openvswitch-ovn-central-2.6.1-10.git20161206.el7fdb.x86_64
Error: ovirt-provider-ovn conflicts with 1:openvswitch-ovn-central-2.6.1-10.git20161206.el7fdb.x86_64

Comment 3 Aaren 2018-07-16 22:37:07 UTC
yum update ovirt\*setup\* --disablerepo rhel-7-server-rhv-4.1-rpms


The above seems to allow no such dependency problems, as above.

Comment 8 Jiri Belka 2018-07-19 12:45:13 UTC
Draft https://access.redhat.com/node/3415181/draft

Comment 9 Dan Kenigsberg 2018-07-22 11:21:06 UTC
Juan, would you please review (and hopefully approve) Jiri's proposed text?

Comment 10 Dan Kenigsberg 2018-08-13 10:05:04 UTC
Jiri's update to https://access.redhat.com/node/3415181 is finally accepted.