Bug 1412985

Summary: [z-stream clone - 4.0.7] upgrade engine from 4.0.5 to 4.1 failed (unless rhevm-setup-plugins is updated manually first)
Product: Red Hat Enterprise Virtualization Manager Reporter: rhev-integ
Component: ovirt-engineAssignee: Sandro Bonazzola <sbonazzo>
Status: CLOSED ERRATA QA Contact: Lucie Leistnerova <lleistne>
Severity: high Docs Contact:
Priority: high    
Version: 4.0.5CC: gklein, lsurette, mkalinin, pstehlik, rbalakri, Rhev-m-bugs, sbonazzo, srevivo, ykaul, ylavi
Target Milestone: ovirt-4.0.7Keywords: CodeChange, Regression, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1409551 Environment:
Last Closed: 2017-03-16 15:31:03 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: 1409551    
Bug Blocks:    

Description rhev-integ 2017-01-13 10:43:30 UTC
+++ This bug is a downstream clone. The original bug is: +++
+++   bug 1409551 +++
======================================================================

Created attachment 1236660 [details]
setup log

Description of problem:
Upgrade engine from 4.0.5 to 4.1 failed with error 
Failed to execute stage 'Misc configuration': 'module' object has no attribute 'EngineConst'

Version-Release number of selected component (if applicable):
ovirt-engine-4.0.5.5-0.1.el7ev.noarch 
ovirt-engine-setup.noarch 0:4.0.5.5-0.1.el7ev -> ovirt-engine-setup-4.1.0-0.3.beta2.el7.noarch
rhevm-setup-plugins-4.0.0.3-1.el7ev.noarch

How reproducible: always


Steps to Reproduce:
1. have engine 4.0.5.5 installed and running
2. run yum update ovirt-engine-setup ovirt-engine-setup-plugin-websocket-proxy ovirt-engine-dwh-setup
   installed: ovirt-engine-setup-4.1
3. run engine-setup

Actual results: engine-setup ends with error and rollbacks, setup log in attachment


Expected results: engine-setup successfully upgrades to 4.1


Additional info:

engine-setup output repos:
[ INFO  ] Yum Download/Verify: ovirt-engine-4.1.0-0.3.beta2.el7.noarch
[ INFO  ] Yum Download/Verify: ovirt-engine-backend-4.1.0-0.3.beta2.el7.noarch
[ INFO  ] Yum Download/Verify: ovirt-engine-dashboard-1.1.0-0.20161122git65721f8.el7ev.x86_64
[ INFO  ] Yum Download/Verify: ovirt-engine-dbscripts-4.1.0-0.3.beta2.el7.noarch
[ INFO  ] Yum Download/Verify: ovirt-engine-dwh-4.1.0-0.0.master.20161221120158.el7ev.noarch
[ INFO  ] Yum Download/Verify: ovirt-engine-extension-aaa-jdbc-1.1.2-1.el7ev.noarch
[ INFO  ] Yum Download/Verify: ovirt-engine-extensions-api-impl-4.1.0-0.3.beta2.el7.noarch
[ INFO  ] Yum Download/Verify: ovirt-engine-hosts-ansible-inventory-4.1.0-0.3.beta2.el7.noarch
[ INFO  ] Yum Download/Verify: ovirt-engine-restapi-4.1.0-0.3.beta2.el7.noarch
[ INFO  ] Yum Download/Verify: ovirt-engine-tools-4.1.0-0.3.beta2.el7.noarch
[ INFO  ] Yum Download/Verify: ovirt-engine-tools-backup-4.1.0-0.3.beta2.el7.noarch
[ INFO  ] Yum Download/Verify: ovirt-engine-userportal-4.1.0-0.3.beta2.el7.noarch
[ INFO  ] Yum Download/Verify: ovirt-engine-vmconsole-proxy-helper-4.1.0-0.3.beta2.el7.noarch
[ INFO  ] Yum Download/Verify: ovirt-engine-webadmin-portal-4.1.0-0.3.beta2.el7.noarch
[ INFO  ] Yum Download/Verify: ovirt-engine-websocket-proxy-4.1.0-0.3.beta2.el7.noarch
[ INFO  ] Yum Download/Verify: ovirt-host-deploy-1.6.0-0.2.master.gitb76ad50.el7ev.noarch
[ INFO  ] Yum Download/Verify: ovirt-host-deploy-java-1.6.0-0.2.master.gitb76ad50.el7ev.noarch
[ INFO  ] Yum Download/Verify: ovirt-iso-uploader-4.1.0-0.0.master.git14502bd.el7ev.noarch
[ INFO  ] Yum Download/Verify: ovirt-log-collector-4.1.0-0.0.master.git9a06a36.el7.noarch
[ INFO  ] Yum Download/Verify: ovirt-web-ui-0.1.1-2.el7ev.x86_64
[ INFO  ] Yum Download/Verify: redhat-support-plugin-rhev-4.1.0-1.el7.noarch
[ INFO  ] Yum Download/Verify: rhevm-4.1.0-0.3.beta2.el7.noarch
[ INFO  ] Yum Download/Verify: rhevm-branding-rhev-4.1.0-0.0.master.20161128195345.el7ev.noarch
[ INFO  ] Yum Download/Verify: rhevm-dependencies-4.1.0-0.1.alpha.gite3bec5a.el7ev.noarch
[ INFO  ] Yum Download/Verify: rhevm-doc-4.1.0-0.0.master.201611252145.el7ev.noarch
[ INFO  ] Yum Download/Verify: rhevm-setup-plugins-4.1.0-0.1.alpha.20161130141652.el7ev.noarch
[ INFO  ] Yum Download/Verify: vdsm-jsonrpc-java-1.3.5-1.el7ev.noarch

...

[ INFO  ] Yum Verify: 1/52: rhevm.noarch 0:4.0.5.5-0.1.el7ev - u
[ INFO  ] Yum Verify: 2/52: ovirt-host-deploy-java.noarch 0:1.5.3-1.el7ev - u
[ INFO  ] Yum Verify: 3/52: vdsm-jsonrpc-java.noarch 0:1.2.7-1.el7ev - u
[ INFO  ] Yum Verify: 4/52: rhevm-doc.noarch 0:4.0.5-1.el7ev - u
[ INFO  ] Yum Verify: 5/52: ovirt-log-collector.noarch 0:4.0.1-1.el7ev - u
[ INFO  ] Yum Verify: 6/52: ovirt-engine-websocket-proxy.noarch 0:4.0.5.5-0.1.el7ev - u
[ INFO  ] Yum Verify: 7/52: ovirt-engine-dbscripts.noarch 0:4.0.5.5-0.1.el7ev - u
[ INFO  ] Yum Verify: 8/52: rhevm-setup-plugins.noarch 0:4.0.0.3-1.el7ev - u
[ INFO  ] Yum Verify: 9/52: ovirt-host-deploy.noarch 0:1.5.3-1.el7ev - u
[ INFO  ] Yum Verify: 10/52: ovirt-engine-dwh.noarch 0:4.0.5-1.el7ev - u
[ INFO  ] Yum Verify: 11/52: ovirt-engine-extension-aaa-jdbc.noarch 0:1.1.1-1.el7ev - u
[ INFO  ] Yum Verify: 12/52: ovirt-iso-uploader.noarch 0:4.0.2-1.el7ev - u
[ INFO  ] Yum Verify: 13/52: rhevm-dependencies.noarch 0:4.0.0-1.el7ev - u
[ INFO  ] Yum Verify: 14/52: redhat-support-plugin-rhev.noarch 0:4.0.0-7.el7ev - u
[ INFO  ] Yum Verify: 15/52: ovirt-engine-vmconsole-proxy-helper.noarch 0:4.0.5.5-0.1.el7ev - u
[ INFO  ] Yum Verify: 16/52: ovirt-engine-dashboard.x86_64 0:1.0.5-1.el7ev - u
[ INFO  ] Yum Verify: 17/52: rhevm-branding-rhev.noarch 0:4.0.0-5.el7ev - u
[ INFO  ] Yum Verify: 18/52: ovirt-engine-userportal.noarch 0:4.0.5.5-0.1.el7ev - u
[ INFO  ] Yum Verify: 19/52: ovirt-engine-restapi.noarch 0:4.0.5.5-0.1.el7ev - u
[ INFO  ] Yum Verify: 20/52: ovirt-engine-webadmin-portal.noarch 0:4.0.5.5-0.1.el7ev - u
[ INFO  ] Yum Verify: 21/52: ovirt-engine-tools.noarch 0:4.0.5.5-0.1.el7ev - u
[ INFO  ] Yum Verify: 22/52: ovirt-engine-backend.noarch 0:4.0.5.5-0.1.el7ev - u
[ INFO  ] Yum Verify: 23/52: ovirt-engine.noarch 0:4.0.5.5-0.1.el7ev - u
[ INFO  ] Yum Verify: 24/52: ovirt-engine-tools-backup.noarch 0:4.0.5.5-0.1.el7ev - u
[ INFO  ] Yum Verify: 25/52: ovirt-engine-extensions-api-impl.noarch 0:4.0.5.5-0.1.el7ev - u
[ INFO  ] Yum Verify: 26/52: ovirt-log-collector.noarch 0:4.1.0-0.0.master.git9a06a36.el7 - e
[ INFO  ] Yum Verify: 27/52: rhevm.noarch 0:4.1.0-0.3.beta2.el7 - e
[ INFO  ] Yum Verify: 28/52: ovirt-engine-dbscripts.noarch 0:4.1.0-0.3.beta2.el7 - e
[ INFO  ] Yum Verify: 29/52: ovirt-host-deploy.noarch 0:1.6.0-0.2.master.gitb76ad50.el7ev - e
[ INFO  ] Yum Verify: 30/52: ovirt-engine.noarch 0:4.1.0-0.3.beta2.el7 - e
[ INFO  ] Yum Verify: 31/52: ovirt-web-ui.x86_64 0:0.1.1-2.el7ev - e
[ INFO  ] Yum Verify: 32/52: ovirt-engine-backend.noarch 0:4.1.0-0.3.beta2.el7 - e
[ INFO  ] Yum Verify: 33/52: redhat-support-plugin-rhev.noarch 0:4.1.0-1.el7 - e
[ INFO  ] Yum Verify: 34/52: ovirt-engine-dwh.noarch 0:4.1.0-0.0.master.20161221120158.el7ev - e
[ INFO  ] Yum Verify: 35/52: ovirt-engine-websocket-proxy.noarch 0:4.1.0-0.3.beta2.el7 - e
[ INFO  ] Yum Verify: 36/52: rhevm-setup-plugins.noarch 0:4.1.0-0.1.alpha.20161130141652.el7ev - e
[ INFO  ] Yum Verify: 37/52: vdsm-jsonrpc-java.noarch 0:1.3.5-1.el7ev - e
[ INFO  ] Yum Verify: 38/52: ovirt-engine-extension-aaa-jdbc.noarch 0:1.1.2-1.el7ev - e
[ INFO  ] Yum Verify: 39/52: ovirt-engine-vmconsole-proxy-helper.noarch 0:4.1.0-0.3.beta2.el7 - e
[ INFO  ] Yum Verify: 40/52: ovirt-engine-extensions-api-impl.noarch 0:4.1.0-0.3.beta2.el7 - e
[ INFO  ] Yum Verify: 41/52: ovirt-engine-userportal.noarch 0:4.1.0-0.3.beta2.el7 - e
[ INFO  ] Yum Verify: 42/52: rhevm-doc.noarch 0:4.1.0-0.0.master.201611252145.el7ev - e
[ INFO  ] Yum Verify: 43/52: ovirt-engine-restapi.noarch 0:4.1.0-0.3.beta2.el7 - e
[ INFO  ] Yum Verify: 44/52: ovirt-host-deploy-java.noarch 0:1.6.0-0.2.master.gitb76ad50.el7ev - e
[ INFO  ] Yum Verify: 45/52: rhevm-branding-rhev.noarch 0:4.1.0-0.0.master.20161128195345.el7ev - e
[ INFO  ] Yum Verify: 46/52: ovirt-engine-dashboard.x86_64 0:1.1.0-0.20161122git65721f8.el7ev - e
[ INFO  ] Yum Verify: 47/52: ovirt-engine-tools.noarch 0:4.1.0-0.3.beta2.el7 - e
[ INFO  ] Yum Verify: 48/52: rhevm-dependencies.noarch 0:4.1.0-0.1.alpha.gite3bec5a.el7ev - e
[ INFO  ] Yum Verify: 49/52: ovirt-engine-webadmin-portal.noarch 0:4.1.0-0.3.beta2.el7 - e
[ INFO  ] Yum Verify: 50/52: ovirt-engine-hosts-ansible-inventory.noarch 0:4.1.0-0.3.beta2.el7 - e
[ INFO  ] Yum Verify: 51/52: ovirt-iso-uploader.noarch 0:4.1.0-0.0.master.git14502bd.el7ev - e
[ INFO  ] Yum Verify: 52/52: ovirt-engine-tools-backup.noarch 0:4.1.0-0.3.beta2.el7 - e

error in log:
2017-01-02 09:39:55 DEBUG otopi.context context._executeMethod:142 method exception
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/otopi/context.py", line 131, in _executeMethod
    if method['condition']():
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/rhevm-setup-plugins/distro-rhel/config.py", line 156, in <lambda>
    oenginecons.CoreEnv.ENABLE
AttributeError: 'module' object has no attribute 'EngineConst'


If I update rhevm-setup-plugins manually engine-setup upgrades successfully.

# yum update rhevm-setup-plugins
Loaded plugins: product-id, search-disabled-repos, versionlock
Resolving Dependencies
--> Running transaction check
---> Package rhevm-setup-plugins.noarch 0:4.0.0.3-1.el7ev will be updated
---> Package rhevm-setup-plugins.noarch 0:4.1.0-0.1.alpha.20161130141652.el7ev will be an update
--> Finished Dependency Resolution

(Originally by Lucie Leistnerova)

Comment 4 rhev-integ 2017-01-13 10:43:49 UTC
Ido, please update the dependency on rhevm-setup-plugin in engine spec.

(Originally by Sandro Bonazzola)

Comment 6 Sandro Bonazzola 2017-01-13 11:03:10 UTC
Marking this as code change since 4.0 was only potentially affected. The fix avoid to get the regression in case of rhevm-setup-plugins updates in 4.0.

Comment 7 Marina Kalinin 2017-01-23 22:35:35 UTC
HI Sandro,

Can you please clarify how current 4.0 setups are affected with this bug?
Every setup or any specific environments?
Should we notify customers? Update the upgrade helper? Anything else?

Thanks,
Marina.

Comment 8 Sandro Bonazzola 2017-01-24 08:30:29 UTC
(In reply to Marina from comment #7)
> HI Sandro,
> 
> Can you please clarify how current 4.0 setups are affected with this bug?

current 4.0 setups shouldn't be affected. customers could have been affected if we released a new rhevm-setup-plugins build in 4.0. This fix prevent the issue proactively for possible future 4.0 releases including it.

> Every setup or any specific environments?
> Should we notify customers? Update the upgrade helper? Anything else?

As for all errata, upgrade to latest version is always recommended.
Other than that, no special notification I think.


> 
> Thanks,
> Marina.

Comment 10 Lucie Leistnerova 2017-01-31 16:43:45 UTC
upgrade 4.0.5.5 -> 4.0.7 -> 4.1 is OK
upgrade from clean install 4.0.7 -> 4.1 is OK

verified in ovirt-engine-4.0.7-0.1.el7ev.noarch and ovirt-engine-4.1.0.2-0.2.el7.noarch

Comment 12 errata-xmlrpc 2017-03-16 15:31:03 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-2017-0542.html