Bug 1360677

Summary: RHVH not able to upgrade through engine in 4 beta2
Product: Red Hat Enterprise Virtualization Manager Reporter: Pavol Brilla <pbrilla>
Component: rhev-hypervisor-ngAssignee: Ryan Barry <rbarry>
Status: CLOSED ERRATA QA Contact: Huijuan Zhao <huzhao>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.0.2CC: cshao, dfediuck, emesika, fdeutsch, gklein, melewis, mperina, nsednev, oourfali, rbarry, ycui
Target Milestone: ovirt-4.0.2Keywords: TestOnly
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-23 21:08:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Node RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pavol Brilla 2016-07-27 10:14:13 UTC
Description of problem:
I am not able to upgrade through engine


I have visible from rhvh repo: 
redhat-virtualization-host-image-update.noarch 
rhev-hypervisor7-ng-image-update.noarch  

but engine is checking for  ovirt-node-ng-image-update

Version-Release number of selected component (if applicable):
rhevm-4.0.2-0.1.rc.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Install beta2 engine + pre-beta host
2. Wait for upgrade button to became available

Actual results:
Upgrade button will be forever gray

Expected results:
Possibility to upgrade rhvh through engine

Additional info:
engine=> select option_value from vdc_options where option_name='OvirtNodePackageNamesForCheckUpdate';

        option_value        
----------------------------
 ovirt-node-ng-image-update
(1 row)


RHVH host# yum list *update
Loaded plugins: imgbased-warning, product-id, search-disabled-repos, subscription-manager
This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.
Warning: yum operations are not persisted across upgrades!
Available Packages
redhat-virtualization-host-image-update.noarch          4.0-20160714.3.el7          rhvh-beta
rhev-hypervisor7-ng-image-update.noarch                 4.0-20160616.0.el7          rhvh-beta

Comment 1 Fabian Deutsch 2016-07-27 10:17:20 UTC
Eli, can you tell what the intended upgrade flow for RHVH is in 4.0?

Comment 2 Martin Perina 2016-07-27 10:25:21 UTC
(In reply to Fabian Deutsch from comment #1)
> Eli, can you tell what the intended upgrade flow for RHVH is in 4.0?

We are checking for upgrade of ovirt-node-ng-image-update package and if such new package is found, we execute upgrade of it. This is the 1st time I've heard that downstream package name is different, so here are possible fixes:

1. Create a downstream-only patch which will change package name we should check for RHVH - IMO this is not a good options, downstream only patches complicates stuff

2. Or create redhat-virtualization-host-image-update RPM as metapackage which will require same version of ovirt-node-ng-image-update package (this is the same approach as we are currenlty using for engine, we have metapackage rhevm which depends on the same version of ovirt-engine package and this allows us to minimize changes between upstream and downstream) - even though this is bit more work, I think it's more correct solution

Comment 3 Oved Ourfali 2016-07-27 10:42:48 UTC
(In reply to Martin Perina from comment #2)
> (In reply to Fabian Deutsch from comment #1)
> > Eli, can you tell what the intended upgrade flow for RHVH is in 4.0?
> 
> We are checking for upgrade of ovirt-node-ng-image-update package and if
> such new package is found, we execute upgrade of it. This is the 1st time
> I've heard that downstream package name is different, so here are possible
> fixes:
> 
> 1. Create a downstream-only patch which will change package name we should
> check for RHVH - IMO this is not a good options, downstream only patches
> complicates stuff
> 

There can be a setup plugin that does that, but I agree it is not the right option.

> 2. Or create redhat-virtualization-host-image-update RPM as metapackage
> which will require same version of ovirt-node-ng-image-update package (this
> is the same approach as we are currenlty using for engine, we have
> metapackage rhevm which depends on the same version of ovirt-engine package
> and this allows us to minimize changes between upstream and downstream) -
> even though this is bit more work, I think it's more correct solution

I tend to agree.

Comment 4 Fabian Deutsch 2016-07-27 11:16:06 UTC
I actually consider a solution similar to option 2:

We will add an empty package

ovirt-node-ng-image-update

which is provided by

redhat-virtualization-host-image-update

Both packages depend and require each other.

In addition we need to do the same thing to the -placeholder package.

Comment 5 Martin Perina 2016-07-27 11:40:18 UTC
(In reply to Fabian Deutsch from comment #4)
> I actually consider a solution similar to option 2:
> 
> We will add an empty package
> 
> ovirt-node-ng-image-update
> 
> which is provided by
> 
> redhat-virtualization-host-image-update
> 
> Both packages depend and require each other.
> 
> In addition we need to do the same thing to the -placeholder package.

Makes sense to me, thanks

Comment 6 Fabian Deutsch 2016-07-29 13:40:08 UTC
A few notes:

- This could be solved with virtual Provides - but this solution is currently blocked by bug 1361602

Either this bug is getting fixed or we can
a) Fix it with "real" packages from the Node side
b) Fix it with additional packages to check from the Engine side

a) will have a repeating amount of overhead in the build and release processes it will also have an impact on the names exposed to users during updates
b) requires a downstream patch

Comment 20 Huijuan Zhao 2016-08-08 05:34:29 UTC
Test version:
redhat-virtualization-host-4.0-20160803.3
imgbased-0.7.4-0.1.el7ev.noarch
redhat-virtualization-host-image-update-placeholder-4.0-0.26.el7.noarch

Test Steps:
1. Install redhat-virtualization-host-4.0-20160727.1
2. Add RHVH to rhevm
3. Login RHVH and setup local repos
4. Login rhevm, install redhat-virtualization-host-image-update-4.0-20160803.3.el7_2.noarch.rpm:
   # rpm -ivh redhat-virtualization-host-image-update-4.0-20160803.3.el7_2.noarch.rpm
5. Login rhevm UI, change to "Hosts" page, wait for 10+ minutes, upgrade is available, click "Upgrade"
6. Reboot RHVH and login new build redhat-virtualization-host-image-update-4.0-20160803.3


Actual results:
1. After step5, upgrade successful
2. After step6, Login new build successful

So this bug is fixed on redhat-virtualization-host-4.0-20160803.3, change the status to VERIFIED.

Comment 23 errata-xmlrpc 2016-08-23 21:08:12 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://rhn.redhat.com/errata/RHBA-2016-1702.html