Bug 1067682

Summary: UPGRADE_YUM_GROUP should be 'RHEV Manager' otherwise engine-setup won't find YUM group
Product: [oVirt] otopi Reporter: rhev-integ
Component: Plugins.packagersAssignee: Alon Bar-Lev <alonbl>
Status: CLOSED ERRATA QA Contact: Jiri Belka <jbelka>
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.1.0CC: aberezin, acathrow, adahms, alonbl, bazulay, didi, dougsland, gklein, iheim, pstehlik, Rhev-m-bugs, yeylon
Target Milestone: ---Keywords: ZStream
Target Release: 1.1.2Flags: alonbl: devel_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, running engine-setup would not update the redhat-support-plugin-rhev plug-in. This was caused by the UPGRADE_YUM_GROUP constant in the constants file for engine-setup being set to 'rhevm33' instead of 'RHEV Manager', which would prevent yum from detecting the group required to update the plug-in. With this update, yum groups are now referred to using their id rather than their name, so the plug-in is correctly updated when running engine-setup.
Story Points: ---
Clone Of: 1063941 Environment:
Last Closed: 2014-03-03 13:20:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1063941    
Bug Blocks:    

Description rhev-integ 2014-02-20 20:48:35 UTC
+++ This bug is a RHEV-M zstream clone. The original bug is: +++
+++   https://bugzilla.redhat.com/show_bug.cgi?id=1063941. +++
+++ Requested by "emesika" +++
======================================================================



----------------------------------------------------------------------
Following comment by jbelka on February 11 at 16:38:46, 2014

Created attachment 861879 [details]
setup logs

Description of problem:

Scenario:
- there's newer redhat-support-plugin-rhev and engine-setup should upgrade it. It should called update on RHEVM YUM group, but /usr/share/ovirt-engine/setup/ovirt_engine_setup/constants.py has 'UPGRADE_YUM_GROUP = 'rhevm33' and this YUM group is not found. engine-setup falls back to yum update rhevm style but this does not update redhat-support-plugin-rhev.

sbonazzo@ found that it is problem between 'rhevm33' and 'RHEV Manager' names. Changing UPGRADE_YUM_GROUP to 'RHEV Manager' made engine-setup update the plugin.

17:17 < sbonazzo> jbelka: since we call yum groups update rhevm33
...
17:18 < sbonazzo> jbelka: as I said, it's not called because not found, so fallback on yum update rhevm
...
17:23 < sbonazzo> jbelka: found the bug: it compares group name "RHEV Manager" against its id "rhevm33" :-/

[root@pb-rh33 ~]# egrep 'RHEV Manager|redhat-support-plugin' /var/log/ovirt-engine/setup/ovirt-engine-setup-20140211172614.log                   
2014-02-11 17:26:27 DEBUG otopi.plugins.ovirt_engine_setup.distro-rpm.packages packages.verbose:177 Yum: queue group RHEV Manager for update
2014-02-11 17:26:29 DEBUG otopi.plugins.ovirt_engine_setup.distro-rpm.packages packages.verbose:177 Yum: group RHEV Manager queued
2014-02-11 17:26:29 DEBUG otopi.plugins.ovirt_engine_setup.distro-rpm.packages packages.verbose:177 Yum:     updated    - redhat-support-plugin-rhev-3.3.0-13.el6ev.noarch
2014-02-11 17:26:29 DEBUG otopi.plugins.ovirt_engine_setup.distro-rpm.packages packages.verbose:177 Yum:     update     - redhat-support-plugin-rhev-3.3.0-14.el6ev.noarch
2014-02-11 17:26:29 DEBUG otopi.plugins.ovirt_engine_setup.distro-rpm.packages packages._checkForProductUpdate:240 PACKAGE: [updated] redhat-support-plugin-rhev-3.3.0-13.el6ev.noarch
2014-02-11 17:26:29 DEBUG otopi.plugins.ovirt_engine_setup.distro-rpm.packages packages._checkForProductUpdate:240 PACKAGE: [update] redhat-support-plugin-rhev-3.3.0-14.el6ev.noarch
2014-02-11 17:26:30 DEBUG otopi.plugins.ovirt_engine_setup.distro-rpm.packages packages._checkForProductUpdate:254 dupes: operation [available] package redhat-support-plugin-rhev-3.3.0-14.el6ev.noarch
2014-02-11 17:26:30 DEBUG otopi.plugins.ovirt_engine_setup.distro-rpm.packages packages._checkForProductUpdate:254 dupes: operation [installed] package redhat-support-plugin-rhev-3.3.0-13.el6ev.noarch
2014-02-11 17:26:30 DEBUG otopi.plugins.ovirt_engine_setup.distro-rpm.packages packages._checkForProductUpdate:254 dupes: operation [reinstall_available] package redhat-support-plugin-rhev-3.3.0-13.el6ev.noarch
2014-02-11 17:26:30 DEBUG otopi.plugins.ovirt_engine_setup.distro-rpm.packages packages._checkForProductUpdate:254 dupes: operation [available] package redhat-support-plugin-rhev-3.3.0-14.el6ev.noarch
2014-02-11 17:26:30 DEBUG otopi.plugins.ovirt_engine_setup.distro-rpm.packages packages._checkForProductUpdate:254 dupes: operation [installed] package redhat-support-plugin-rhev-3.3.0-13.el6ev.noarch
2014-02-11 17:26:30 DEBUG otopi.plugins.ovirt_engine_setup.distro-rpm.packages packages._checkForProductUpdate:254 dupes: operation [reinstall_available] package redhat-support-plugin-rhev-3.3.0-13.el6ev.noarch
2014-02-11 17:26:37 DEBUG otopi.context context.dumpEnvironment:456 ENV OSETUP_RPMDISTRO/versionLockFilter=list:'['rhevm', 'redhat-support-plugin-rhev']'

Version-Release number of selected component (if applicable):
rhevm-setup-3.3.0-0.46.el6ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. have a repo with newer redhat-support-plugin-rhev
2. engine-setup
3.

Actual results:
redhat-support-plugin-rhev is not updated as engine-setup does not find valid YUM group and falls back to metapackage update

Expected results:
work

Additional info:

----------------------------------------------------------------------
Following comment by alonbl on February 11 at 17:23:02, 2014

This code hasn't been changed since 3.2, so either it was never tested, or the groups within the channel changed.

Nevertheless I suggest to apply this since 3.3.z.

----------------------------------------------------------------------
Following comment by aberezin on February 20 at 20:28:57, 2014

(In reply to Alon Bar-Lev from comment #1)
> This code hasn't been changed since 3.2, so either it was never tested, or
> the groups within the channel changed.
> 
> Nevertheless I suggest to apply this since 3.3.z.

Does that latest change represent the current correct group names ?

----------------------------------------------------------------------
Following comment by alonbl on February 20 at 20:33:04, 2014

(In reply to Arthur Berezin from comment #2)
> (In reply to Alon Bar-Lev from comment #1)
> > This code hasn't been changed since 3.2, so either it was never tested, or
> > the groups within the channel changed.
> > 
> > Nevertheless I suggest to apply this since 3.3.z.
> 
> Does that latest change represent the current correct group names ?

the code change is getting grp.groupid instead grp.name, in the past (3.2) there was no problem with grp.name, now (3.3) grp.name returns description and grp.groupid seems to behave nicely and probably more correct. Maybe it was yum change, not sure.

Comment 2 Jiri Belka 2014-02-24 09:28:45 UTC
ok, otopi-1.1.3-1.el6ev.noarch

installed is33 + otopi 1.1.3 and having a repo with newer redhat-support-plugin-rhev (from is34.3). `engine-setup' got redhat-support-plugin updated as it was internally updating YUM group.

...
[ INFO  ] Stage: Package installation
[ INFO  ] Yum Status: Downloading Packages
[ INFO  ] Yum Download/Verify: redhat-support-plugin-rhev-3.3.0-14.el6ev.noarch
[ INFO  ] Yum Status: Check Package Signatures
[ INFO  ] Yum Status: Running Test Transaction
[ INFO  ] Yum Status: Running Transaction
[ INFO  ] Yum update: 1/2: redhat-support-plugin-rhev-3.3.0-14.el6ev.noarch
[ INFO  ] Yum updated: 2/2: redhat-support-plugin-rhev
[ INFO  ] Yum Verify: 1/2: redhat-support-plugin-rhev.noarch 0:3.3.0-14.el6ev - u
[ INFO  ] Yum Verify: 2/2: redhat-support-plugin-rhev.noarch 0:3.3.0-13.el6ev - ud
...

...
2014-02-24 10:24:42 DEBUG otopi.plugins.ovirt_engine_setup.distro-rpm.packages packages.verbose:177 Yum: queue group rhevm33 for update
2014-02-24 10:24:45 DEBUG otopi.plugins.ovirt_engine_setup.distro-rpm.packages packages.verbose:177 Yum: group rhevm33 queued
...

Comment 4 errata-xmlrpc 2014-03-03 13:20:05 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.

http://rhn.redhat.com/errata/RHBA-2014-0235.html