Bug 1464866

Summary: [downstream clone - 4.1.3] hosted-engine --upgrade-appliance reports unsupported upgrade path
Product: Red Hat Enterprise Virtualization Manager Reporter: rhev-integ
Component: ovirt-hosted-engine-setupAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED ERRATA QA Contact: Artyom <alukiano>
Severity: high Docs Contact:
Priority: urgent    
Version: 4.0.7CC: lsurette, mavital, mtessun, nashok, pstehlik, ykaul
Target Milestone: ovirt-4.1.3Keywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Downstream appliances versioning schema differs from upstream one and so a version check was too severe. Fixing it for downstream appliances.
Story Points: ---
Clone Of: 1464461 Environment:
Last Closed: 2017-07-06 07:30:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1464461    
Bug Blocks:    

Description rhev-integ 2017-06-26 06:19:36 UTC
+++ This bug is a downstream clone. The original bug is: +++
+++   bug 1464461 +++
======================================================================

Description of problem:
The "hosted-engine --upgrade-appliance" report unsupportred path when upgrading from RHEV 3.6 to RHV 4.0

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

How reproducible:
100%

Steps to Reproduce:
1.Upgrade from latest RHEL host nad latest RHEV-M 3.6 to 40

Actual results:
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-20170623152821-ikhe8k.log
          Version: otopi-1.6.2 (otopi-1.6.2-1.el7ev)
[ INFO  ] Detecting available oVirt engine appliances
[ INFO  ] Stage: Environment packages setup
[ INFO  ] Stage: Programs detection
[ INFO  ] Stage: Environment setup
[ INFO  ] Checking maintenance mode
[ INFO  ] The engine VM is running on this host
[ INFO  ] Stage: Environment customization
[ INFO  ] Answer file successfully loaded
          Enter engine admin password: 
          Confirm engine admin password: 
[ INFO  ] Acquiring internal CA cert from the engine
[ INFO  ] The following CA certificate is going to be used, please immediately interrupt if not correct:
[ INFO  ] Issuer: C=US, O=sbr-virt.gsslab.brq.redhat.com, CN=rhodain-rhel7-36-m-upgrade.sbr-virt.gsslab.brq.redhat.c.82144, Subject: C=US, O=sbr-virt.gsslab.brq.redhat.com, CN=rhodain-rhel7-36-m-upgrade.sbr-virt.gsslab.brq.redhat.c.82144, Fingerprint (SHA-1): A0D381ACB005FD2F34C2FADF6E6339CEC31144E
[ INFO  ] Bridge ovirtmgmt already created
[WARNING] Unable to uniquely detect the interface where Bridge ovirtmgmt has been created on, [u'eth0', u'vnet0'] appear to be valid alternatives
[ INFO  ] Checking SPM status on this host
[ INFO  ] Connecting to the Engine
[ INFO  ] This upgrade tool is running on the SPM host
          The following appliance have been found on your system:
          	[1] - The RHEV-M Appliance image (OVA) - 4.0.20170307.0-1.el7ev
          	[2] - Directly select an OVA file
          Please select an appliance (1, 2) [1]: 
[ INFO  ] Verifying its sha1sum
[ INFO  ] Checking OVF archive content (could take a few minutes depending on archive size)
[ INFO  ] Checking OVF XML content (could take a few minutes depending on archive size)
          Please specify the size of the VM disk in GB: [50]: 
[ INFO  ] Connecting to the Engine
[ INFO  ] The hosted-engine storage domain has enough free space to contain a new backup disk.
[WARNING] On the hosted-engine disk there is not enough available space to fit the new appliance disk: required 50GiB - available 20GiB. 
          This upgrade tool can resize the hosted-engine VM disk; before resizing a backup will be created.
           Are you sure you want to continue? (Yes, No)[Yes]: 
[ INFO  ] Checking version requirements
[ INFO  ] Hosted-engine configuration is at a compatible level
[ INFO  ] Connecting to the Engine
[ INFO  ] All the datacenters and clusters are at a compatible level
[WARNING] Unsupported upgrade path
          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
          Do you want to abort the upgrade process? (Yes, No) [Yes]: 


Expected results:
"[WARNING] Unsupported upgrade path" is not reported

(Originally by Roman Hodain)

Comment 1 rhev-integ 2017-06-26 06:19:41 UTC
Created attachment 1291073 [details]
sosreport from the node

(Originally by Roman Hodain)

Comment 4 rhev-integ 2017-06-26 06:19:48 UTC
appliance version detection here fails because upstream uses a versioning schema like: ovirt-engine-appliance-4.1-20170622.1.el7.centos.noarch.rpm which resolves to "4.1" while downstream use a schema like: rhvm-appliance-4.1.20170621.0-1.el7.noarch.rpm which resolves to "4.1.20170621.0".

(Originally by Sandro Bonazzola)

Comment 6 Sandro Bonazzola 2017-06-29 07:46:41 UTC
*** Bug 1462684 has been marked as a duplicate of this bug. ***

Comment 7 Artyom 2017-07-02 12:17:13 UTC
Verification steps:
1) Started with host 3.6 with appliance 3.6
2) Add master storage domain
3) Update host packages to 4.0 including appliance
4) Update host packages to 4.1 not including appliance
5) Set global maintenance
6) Run hosted-engine --upgrade-appliance
[ INFO  ] This upgrade tool is running on the SPM host
          The following appliance have been found on your system:
                [1] - The RHEV-M Appliance image (OVA) - 4.0.20170302.0-1.el7ev
                [2] - Directly select an OVA file
          Please select an appliance (1, 2) [1]: 1
[ INFO  ] Verifying its sha1sum
[ INFO  ] Checking OVF archive content (could take a few minutes depending on archive size)
[ INFO  ] Checking OVF XML content (could take a few minutes depending on archive size)
          Please specify the size of the VM disk in GB: [50]: 
[ INFO  ] Connecting to the Engine                                                                                                                        
[ INFO  ] The hosted-engine storage domain has enough free space to contain a new backup disk.
[ INFO  ] Checking version requirements
[ INFO  ] Hosted-engine configuration is at a compatible level
[ INFO  ] Connecting to the Engine
[ INFO  ] All the datacenters and clusters are at a compatible level
[ INFO  ] Detecting host timezone.
          Enter root password that will be used for the engine appliance (leave it empty to skip): 
          Confirm appliance root password: 
          Enter ssh public key for the root user that will be used for the engine appliance (leave it empty to skip): 
[WARNING] Skipping appliance root ssh public key
          Do you want to enable ssh access for the root user (yes, no, without-password) [yes]: 
          Please take a backup of the current engine running this command on the engine VM:
           engine-backup --mode=backup --archive-compressor=gzip --file=engine_backup.tar.gz --log=engine_backup.log
          Then copy the backup archive to this host and input here its path when ready.
...
deployment pass


for invalid upgrade path I have:
[ INFO  ] Checking version requirements
[ INFO  ] Hosted-engine configuration is at a compatible level
[ INFO  ] Connecting to the Engine
[ INFO  ] All the datacenters and clusters are at a compatible level
[WARNING] Unsupported upgrade path
          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: 4.0
            Selected appliance: 4.0.20170302.0-1.el7ev
          Do you want to abort the upgrade process? (Yes, No) [Yes]: 

We will need this fix for 4.0.

Comment 9 errata-xmlrpc 2017-07-06 07:30:02 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-2017:1691