Bug 1462684 - Incorrect validation check for HE appliance version while doing HE upgrade
Incorrect validation check for HE appliance version while doing HE upgrade
Status: CLOSED DUPLICATE of bug 1464866
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-hosted-engine-setup (Show other bugs)
4.0.7
All Linux
unspecified Severity medium
: ovirt-4.1.3
: ---
Assigned To: Sandro Bonazzola
meital avital
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-19 05:28 EDT by nijin ashok
Modified: 2017-06-29 03:46 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-06-29 03:46:41 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Integration
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description nijin ashok 2017-06-19 05:28:46 EDT
Description of problem:

As per the bug 1405065, we have a extra validation check to avoid using hosted-engine --upgrade-appliance  script for upgrade from 4.0 to 4.1 . However the validation of the appliance image is wrong.

It took the version info from /etc/ovirt-hosted-engine/10-appliance.conf. The naming pattern for version info in this file is not consistent in different appliance rpm.

I have checked few rpm's and here is the version info recorded in 10-appliance.conf in each rpm.

rhevm-appliance-20170425.0-1.el7ev.noarch.rpm : version=20170425.0-1.el7ev
rhevm-appliance-4.0.20170307.0-1.el7ev.noarch.rpm : version=4.0.20170307.0-1.el7ev
rhevm-appliance-20170106.0-1.el7ev.noarch.rpm : version=20170106.0-1.el7ev

The code is expecting the format as 4.0-20170307.0-1.el7ev

===
    def _check_upgrade_versions(self):
        supported = True
        if not self._e_version:
            self.logger.warning(_('Unable to detect engine version'))
            supported = False
        else:
            if (
                self._e_version not in
                ohostedcons.Const.UPGRADE_SUPPORTED_SOURCES
            ):
                supported = False
        if not self.environment[ohostedcons.VMEnv.APPLIANCE_VERSION]:
            self.logger.warning(_('Unable to detect appliance version'))
            supported = False
        else:
            a_version = self.environment[
                ohostedcons.VMEnv.APPLIANCE_VERSION
            ].split('-')[0]
            if a_version not in ohostedcons.Const.UPGRADE_SUPPORTED_TARGETS:
                supported = False
        if not supported:
            self.logger.warning(_('Unsupported upgrade path'))

constants.py

   UPGRADE_SUPPORTED_SOURCES = ['3.6']
   UPGRADE_SUPPORTED_TARGETS = ['4.0']

===

Because of this, user will get below warning while upgrading.

===
This procedure has been designed and tested only for upgrading the engine VM from ['3.6'] to ['4.0']. Any other usage is highly experimental and potentially dangerous: Current engine: 3.6 selected appliance: 4.0.20170307.0-1.el7ev
UPGRADE_ABORT_ON_UNSUPPORTED_VER

Do you want to abort the upgrade process? (Yes, No) [Yes]:
===


Version-Release number of selected component (if applicable):

ovirt-hosted-engine-setup-2.0.4.3-3.el7ev.noarch


How reproducible:

100%

Steps to Reproduce:

1. Run hosted-engine --upgrade-appliance in 3.6 with 4.0 appliance image. 


Actual results:

hosted-engine --upgrade-appliance is showing incorrect warning

Expected results:

hosted-engine --upgrade-appliance should work fine when using 3.6 engine version and 4.0 appliance version.

Additional info:
Comment 1 Sandro Bonazzola 2017-06-29 03:46:41 EDT
Thanks for reporting, this has been already addressed in bug #1464866. Closing this as duplicate.

*** This bug has been marked as a duplicate of bug 1464866 ***

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