Bug 1449557 - ovirt-hosted-engine-setup installs an older HE appliance and then upgrade to latest HE image (currently RHV-4.1)
Summary: ovirt-hosted-engine-setup installs an older HE appliance and then upgrade to ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-hosted-engine-setup
Version: 4.0.7
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ovirt-4.2.0
: ---
Assignee: Simone Tiraboschi
QA Contact: Nikolai Sednev
URL:
Whiteboard:
Depends On:
Blocks: 1458655 1458709
TreeView+ depends on / blocked
 
Reported: 2017-05-10 09:12 UTC by Andreas Bleischwitz
Modified: 2021-05-01 16:47 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Fixed an issue where ovirt-hosted-engine-setup would install rhevm-appliance and then upgrade to rhvm-appliance. Engine setup now downloads and installs only the required appliance.
Clone Of:
: 1458655 (view as bug list)
Environment:
Last Closed: 2018-05-15 17:32:21 UTC
oVirt Team: Integration
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1471 0 None None None 2018-05-15 17:34:05 UTC
oVirt gerrit 77280 0 'None' MERGED appliance: allow two distinct appliance names 2020-12-10 15:25:59 UTC
oVirt gerrit 77335 0 'None' MERGED appliance: allow two distinct appliance names 2020-12-10 15:25:31 UTC

Description Andreas Bleischwitz 2017-05-10 09:12:22 UTC
Description of problem:
ovirt-hosted-engine-setup currently unconditionally pulls in the latest available rhevm-appliance package. This will break upgrades from 3.6 as RHV4.1 is unable to import data from RHEV3.6

Version-Release number of selected component (if applicable):
ovirt-hosted-engine-setup-2.1.0.5-1.el7ev.noarch

How reproducible:
Install and run ovirt-hosted-engine-setup, using defaults. See ovirt-hosted-engine-setup pulling in rhevm-appliance and then upgrading to rhvm-appliance - which is RHV-4.1.

Steps to Reproduce:
1. yum install ovirt-hosted-engine-setup
2. ovirt-hosted-engine-setup
3. accept defaults, ovirt-hosted-engine-setup will install appliance with latest version

Actual results:
- rhevm-appliance is installed but not used (unnecessary bandwidth usage?)
- rhvm-appliance is installed and used

Expected results:
- ovirt-hosted-engine-setup asks if a upgrade is planned and pulls only rhevm-appliance. rhevm-appliance shall be installed otherwise - without pulling rhevm-appliance before.

Additional info:

Comment 1 Sandro Bonazzola 2017-05-10 15:32:21 UTC
(In reply to Andreas Bleischwitz from comment #0)
> Description of problem:
> ovirt-hosted-engine-setup currently unconditionally pulls in the latest
> available rhevm-appliance package. This will break upgrades from 3.6 as
> RHV4.1 is unable to import data from RHEV3.6
> 
> Version-Release number of selected component (if applicable):
> ovirt-hosted-engine-setup-2.1.0.5-1.el7ev.noarch
> 
> How reproducible:
> Install and run ovirt-hosted-engine-setup, using defaults. See
> ovirt-hosted-engine-setup pulling in rhevm-appliance and then upgrading to
> rhvm-appliance - which is RHV-4.1.
> 
> Steps to Reproduce:
> 1. yum install ovirt-hosted-engine-setup
> 2. ovirt-hosted-engine-setup
> 3. accept defaults, ovirt-hosted-engine-setup will install appliance with
> latest version
> 
> Actual results:
> - rhevm-appliance is installed but not used (unnecessary bandwidth usage?)

This is weird, Simone, can you check why rhevm-appliance is installed instead of rhvm-appliance?

> - rhvm-appliance is installed and used
> 
> Expected results:
> - ovirt-hosted-engine-setup asks if a upgrade is planned and pulls only
> rhevm-appliance.

No, ovirt-hosted-engine-setup is not an upgrade tool. It's not designed to perform upgrades.


> rhevm-appliance shall be installed otherwise - without
> pulling rhevm-appliance before.

rhvm-appliance-4.1 should be pulled in when ovirt-hosted-engine 2.1 is used.
Simone please check this, Yuval can help on appliance side if needed.

Updated bug summary accordingly with the bug description.

Comment 2 Simone Tiraboschi 2017-05-22 12:43:30 UTC
OK, reproduced.
hosted-engine-setup tries to install ovirt-engine-appliance and the otopi yum packager tries to install rhevm-appliance and rhvm-appliance at the same time.

2017-05-22 08:22:57 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum processing package 1:rhevm-appliance-4.0.20170307.0-1.el7ev.noarch for install
2017-05-22 08:22:58 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum package 1:rhevm-appliance-4.0.20170307.0-1.el7ev.noarch queued
2017-05-22 08:22:58 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum processing package 1:rhvm-appliance-4.1.20170413.0-1.el7.noarch for install
2017-05-22 08:22:58 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum package 1:rhvm-appliance-4.1.20170413.0-1.el7.noarch queued

On the same system a direct 'yum install ovirt-engine-appliance' resolves just in rhvm-appliance

Comment 3 Yedidyah Bar David 2017-05-22 13:57:54 UTC
Seems like a bug in otopi. Still discussing with Simone possible solutions - we might eventually decide to patch both otopi and hosted-engine-setup or the appliance, not sure. Setting needinfo on myself for now.

Comment 4 Yaniv Kaul 2017-05-22 14:05:08 UTC
(In reply to Yedidyah Bar David from comment #3)
> Seems like a bug in otopi. Still discussing with Simone possible solutions -
> we might eventually decide to patch both otopi and hosted-engine-setup or
> the appliance, not sure. Setting needinfo on myself for now.

Can we just remove the old package?

Comment 5 Yedidyah Bar David 2017-05-22 14:24:36 UTC
(In reply to Yaniv Kaul from comment #4)
> (In reply to Yedidyah Bar David from comment #3)
> > Seems like a bug in otopi. Still discussing with Simone possible solutions -
> > we might eventually decide to patch both otopi and hosted-engine-setup or
> > the appliance, not sure. Setting needinfo on myself for now.
> 
> Can we just remove the old package?

No, we need it for migrating from 3.6 to 4.0. In principle we can allow migrating directly to 4.1, but we do not want to test/support that.

Comment 6 Yedidyah Bar David 2017-05-23 12:53:45 UTC
Simone, as discussed today, Sandro says we might better solve this using Obsoletes: or something like that in the spec file(s). Please ping or open a bug on otopi if you think we need to solve it.

To clarify, for reference, the bug in otopi we discuss is that if a plugin calls self.packager.install('package'), and 'package' is a virtual package provided by more than one existing package, all (or at least, both, in our current case) of them will be installed, instead of just one of them.

I agree this is a bug, but not sure if it's worth solving. Incidentally, in my very limited testing, yum and dnf chose different packages, so we can't rely on the existing logic of them for selecting the package we want - we have to be explicit, if it matters. And in current bug's case, it does.

Comment 7 Simone Tiraboschi 2017-05-23 14:16:34 UTC
We cannot simply solve with Obsoletes or Conflicts:
- with obsoletes rhevm-appliance is not install-able anymore via yum because it's obsoleted by rhvm-appliance but we need to keep rhevm-appliance for 3.6/el6 -> 4.0/el7
- with conflicts otopi transaction will fail since otopi will still try to install both in the same transaction but then it will fail at rpm level since rhvm-appliance conflicts rhevm-appliance

Comment 8 Nikolai Sednev 2017-06-04 10:08:12 UTC
(In reply to Simone Tiraboschi from comment #7)
> We cannot simply solve with Obsoletes or Conflicts:
> - with obsoletes rhevm-appliance is not install-able anymore via yum because
> it's obsoleted by rhvm-appliance but we need to keep rhevm-appliance for
> 3.6/el6 -> 4.0/el7
> - with conflicts otopi transaction will fail since otopi will still try to
> install both in the same transaction but then it will fail at rpm level
> since rhvm-appliance conflicts rhevm-appliance

So what was the fix decision?

Any 3.6->4.0 upgrades supported only for 3.6->4.0 on which customer being warned during the upgrade itself and from the documentation, so for such flows only rhevm-appliance should be used, while for 4.0->4.1 simply "yum update ovirt-hosted-engine-setup" + "engine-setup" will do the upgrade for the engine 4.0->4.1.
For clean deployment of 4.1 rhvm-appliance is required.

Comment 10 Simone Tiraboschi 2017-06-05 09:28:13 UTC
(In reply to Nikolai Sednev from comment #8)
> So what was the fix decision?

Downstream we are now going to install rhevm-appliance on 3.6/el7 upgrades and rhvm-appliance on fresh installs.

Comment 11 Sahina Bose 2017-06-08 08:29:51 UTC
Simone, will this fix be in 4.1.x as well? Currently Cockpit HE installation fails on pulling the appliance.

Comment 12 Yaniv Kaul 2017-06-14 14:16:06 UTC
(In reply to Sahina Bose from comment #11)
> Simone, will this fix be in 4.1.x as well? Currently Cockpit HE installation
> fails on pulling the appliance.

Isn't https://bugzilla.redhat.com/show_bug.cgi?id=1458655 fixes it in 4.1.3?

Comment 13 Nikolai Sednev 2017-06-21 15:30:42 UTC
[ INFO  ] Stage: Initializing
[ INFO  ] Generating a temporary VNC password.
[ INFO  ] Stage: Environment setup
          During customization use CTRL-D to abort.
          Continuing will configure this host for serving as hypervisor and create a VM where you have to install the engine afterwards.
          Are you sure you want to continue? (Yes, No)[Yes]: 
[ INFO  ] Hardware supports virtualization
          Configuration files: []
          Log file: /var/log/ovirt-hosted-engine-setup/ovirt-hosted-engine-setup-20170621182718-m88jhx.log
          Version: otopi-1.6.2 (otopi-1.6.2-1.el7ev)
[ INFO  ] Detecting available oVirt engine appliances
[ ERROR ] No engine appliance image is available on your system.
          The oVirt engine appliance is now required to deploy hosted-engine.
          You could get oVirt engine appliance installing ovirt-engine-appliance rpm.
          Do you want to install ovirt-engine-appliance rpm? (Yes, No) [Yes]: 
[ INFO  ] Stage: Environment packages setup
[ INFO  ] Installing the oVirt engine appliance
[ INFO  ] Yum Status: Downloading Packages
[ INFO  ] Yum Downloading: (1/2): rhevm-appliance-4.0.20170307.0-1.el7ev.noarch.rpm 155 M(10%)
[ INFO  ] Yum Downloading: (1/2): rhevm-appliance-4.0.20170307.0-1.el7ev.noarch.rpm 321 M(21%)
[ INFO  ] Yum Downloading: (1/2): rhevm-appliance-4.0.20170307.0-1.el7ev.noarch.rpm 498 M(33%)


Looks wrong on newly reprovisioned and subscribed RHEL7.3 for 4.1 repos.

Comment 14 Nikolai Sednev 2017-06-21 15:54:09 UTC
OK, so the issue was in that ovirt-hosted-engine-setup-2.1.0.6-1.el7ev.noarch from official channel has no patch in it, while rhvm-appliance-4.1.20170608.0-1.el7.noarch has the patch and getting correct appliance on fresh deployment (rhvm-appliance-4.1.20170608.0-1.el7.noarch.rpm).
Fresh deployment passed correctly with rhvm-appliance-4.1.20170608.0-1.el7.noarch.rpm being downloaded from RHN.

[ INFO  ] Generating a temporary VNC password.
[ INFO  ] Stage: Environment setup
          During customization use CTRL-D to abort.
          Continuing will configure this host for serving as hypervisor and create a VM where you have to install the engine afterwards.
          Are you sure you want to continue? (Yes, No)[Yes]: 
[ INFO  ] Hardware supports virtualization
          Configuration files: []
          Log file: /var/log/ovirt-hosted-engine-setup/ovirt-hosted-engine-setup-20170621184824-o8k5b8.log
          Version: otopi-1.6.2 (otopi-1.6.2-1.el7ev)
[ INFO  ] Detecting available oVirt engine appliances
[ ERROR ] No engine appliance image is available on your system.
          The engine appliance is now required to deploy hosted-engine.
          You could get it installing rhvm-appliance rpm.
          Do you want to install rhvm-appliance rpm? (Yes, No) [Yes]: 
[ INFO  ] Stage: Environment packages setup
[ INFO  ] Installing the oVirt engine appliance
[ INFO  ] Yum Status: Downloading Packages
[ INFO  ] Yum Downloading: rhvm-appliance-4.1.20170608.0-1.el7.noarch.rpm 910 M(64%)
[ INFO  ] Yum Download/Verify: 1:rhvm-appliance-4.1.20170608.0-1.el7.noarch
[ INFO  ] Yum Status: Check Package Signatures
[ INFO  ] Yum Status: Running Test Transaction
[ INFO  ] Yum Status: Running Transaction
[ INFO  ] Yum install: 1/1: 1:rhvm-appliance-4.1.20170608.0-1.el7.noarch
[ INFO  ] Yum Verify: 1/1: rhvm-appliance.noarch 1:4.1.20170608.0-1.el7 - u
[ INFO  ] Stage: Programs detection
[ INFO  ] Stage: Environment setup
[ INFO  ] Generating libvirt-spice certificates
[ INFO  ] Stage: Environment customization
         
          --== STORAGE CONFIGURATION ==--
         
          Please specify the storage you would like to use (glusterfs, iscsi, fc, nfs3, nfs4)[nfs3]:

Comment 15 Nikolai Sednev 2017-06-22 12:18:55 UTC
Works for me also for the upgrade 3.6->4.0 flow correctly:
1-Deployed 3.6 HE over NFS and added 2 NFS data storage domains on host with these components:
ovirt-vmconsole-1.0.4-1.el7ev.noarch
mom-0.5.6-1.el7ev.noarch
ovirt-hosted-engine-setup-1.3.7.4-1.el7ev.noarch
rhevm-sdk-python-3.6.9.1-1.el7ev.noarch
ovirt-vmconsole-host-1.0.4-1.el7ev.noarch
qemu-kvm-rhev-2.6.0-28.el7_3.11.x86_64
ovirt-hosted-engine-ha-1.3.5.10-2.el7ev.noarch
ovirt-host-deploy-1.4.1-1.el7ev.noarch
libvirt-client-2.0.0-10.el7_3.9.x86_64
vdsm-4.17.39-1.el7ev.noarch
rhevm-appliance-20160620.0-1.el7ev.noarch
sanlock-3.4.0-1.el7.x86_64
ovirt-setup-lib-1.0.1-1.el7ev.noarch
Linux version 3.10.0-514.26.1.el7.x86_64 (mockbuild.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Tue Jun 20 01:16:02 EDT 2017
Linux 3.10.0-514.26.1.el7.x86_64 #1 SMP Tue Jun 20 01:16:02 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 7.3 (Maipo)

Engine:
rhevm-image-uploader-3.6.1-2.el6ev.noarch
rhevm-webadmin-portal-3.6.11.3-0.1.el6.noarch
rhevm-spice-client-x64-cab-3.6-7.el6.noarch
rhevm-setup-plugins-3.6.5-1.el6ev.noarch
rhevm-setup-plugin-ovirt-engine-3.6.11.3-0.1.el6.noarch
rhevm-setup-3.6.11.3-0.1.el6.noarch
rhevm-tools-backup-3.6.11.3-0.1.el6.noarch
rhevm-branding-rhev-3.6.0-10.el6ev.noarch
rhevm-dbscripts-3.6.11.3-0.1.el6.noarch
rhevm-tools-3.6.11.3-0.1.el6.noarch
rhevm-spice-client-x86-cab-3.6-7.el6.noarch
rhevm-guest-agent-common-1.0.11-6.el6ev.noarch
rhevm-setup-base-3.6.11.3-0.1.el6.noarch
rhevm-setup-plugin-websocket-proxy-3.6.11.3-0.1.el6.noarch
rhevm-vmconsole-proxy-helper-3.6.11.3-0.1.el6.noarch
rhevm-doc-3.6.10-1.el6ev.noarch
rhevm-log-collector-3.6.1-1.el6ev.noarch
rhevm-restapi-3.6.11.3-0.1.el6.noarch
rhevm-3.6.11.3-0.1.el6.noarch
rhevm-spice-client-x86-msi-3.6-7.el6.noarch
rhevm-sdk-python-3.6.9.1-1.el6ev.noarch
rhevm-setup-plugin-ovirt-engine-common-3.6.11.3-0.1.el6.noarch
rhevm-cli-3.6.9.0-1.el6ev.noarch
rhevm-dependencies-3.6.1-1.el6ev.noarch
rhevm-setup-plugin-vmconsole-proxy-helper-3.6.11.3-0.1.el6.noarch
rhevm-websocket-proxy-3.6.11.3-0.1.el6.noarch
rhevm-backend-3.6.11.3-0.1.el6.noarch
rhevm-lib-3.6.11.3-0.1.el6.noarch
rhev-guest-tools-iso-3.6-6.el6ev.noarch
rhevm-extensions-api-impl-3.6.11.3-0.1.el6.noarch
rhevm-userportal-3.6.11.3-0.1.el6.noarch
rhevm-spice-client-x64-msi-3.6-7.el6.noarch
rhevm-iso-uploader-3.6.0-1.el6ev.noarch
Linux version 2.6.32-642.el6.x86_64 (mockbuild.eng.bos.redhat.com) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC) ) #1 SMP Wed Apr 13 00:51:26 EDT 2016
Linux 2.6.32-642.el6.x86_64 #1 SMP Wed Apr 13 00:51:26 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 6.8 (Santiago)

2-Upgraded host's ovirt-hosted-engine-setup from el7.3(3.6) to el7.3(4.1) with latest ovirt-hosted-engine-setup-2.1.3.1-1.el7ev.noarch.
3-Subscribed to RHN channel.
4-Removed all old repos.
5-Upgraded hosted-engine using "hosted-engine --upgrade-appliance":

alma03 ~]# hosted-engine --upgrade-appliance
[ INFO  ] Stage: Initializing
[ INFO  ] Stage: Environment setup
          During customization use CTRL-D to abort.
         
          ==================================================================================
          Welcome to the oVirt Self Hosted Engine setup/Upgrade tool.
         
          Please refer to the oVirt install guide:
          https://www.ovirt.org/documentation/how-to/hosted-engine/#fresh-install
          Please refer to the oVirt upgrade guide:
          https://www.ovirt.org/documentation/how-to/hosted-engine/#upgrade-hosted-engine
          ==================================================================================
          Continuing will upgrade the engine VM running on this hosts deploying and configuring a new appliance.
          If your engine VM is already based on el7 you can also simply upgrade the engine there.
          This procedure will create a new disk on the hosted-engine storage domain and it will backup there the content of your current engine VM disk.
          The new el7 based appliance will be deployed over the existing disk destroying its content; at any time you will be able to rollback using the content of the backup disk.
          You will be asked to take a backup of the running engine and copy it to this host.
          The engine backup will be automatically injected and recovered on the new appliance.
          Are you sure you want to continue? (Yes, No)[Yes]: 
          Configuration files: []
          Log file: /var/log/ovirt-hosted-engine-setup/ovirt-hosted-engine-setup-20170622151442-wv89r2.log
          Version: otopi-1.6.2 (otopi-1.6.2-1.el7ev)
[ INFO  ] Detecting available oVirt engine appliances
[ ERROR ] No engine appliance image is available on your system.
          The engine appliance is now required to deploy hosted-engine.
          You could get it installing rhevm-appliance rpm.
          Do you want to install rhevm-appliance rpm? (Yes, No) [Yes]: 
[ INFO  ] Stage: Environment packages setup
[ INFO  ] Installing the oVirt engine appliance
[ INFO  ] Yum Status: Downloading Packages
[ INFO  ] Yum Downloading: rhevm-appliance-4.0.20170307.0-1.el7ev.noarch.rpm 57 M(3%)

As you can see, rhevm-appliance-4.0.20170307.0-1.el7ev.noarch.rpm being downloaded to host during the upgrade, like it was designed for the upgrade flow.

Moving this bug to verified as both flows are working as designed (clean fresh deployment with rhvm-appliance and upgrade with rhevm-appliance).

Comment 18 errata-xmlrpc 2018-05-15 17:32:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHBA-2018:1471

Comment 19 Franta Kust 2019-05-16 13:09:06 UTC
BZ<2>Jira Resync


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