Bug 1583045 - Failed to add a second host after a successful deployment due to a name clash on vdsm python module
Summary: Failed to add a second host after a successful deployment due to a name clash...
Alias: None
Product: vdsm
Classification: oVirt
Component: General
Version: ---
Hardware: Unspecified
OS: Unspecified
Target Milestone: ovirt-4.2.4
: ---
Assignee: Ido Rosenzwig
QA Contact: Nikolai Sednev
Depends On:
Blocks: 1583038
TreeView+ depends on / blocked
Reported: 2018-05-28 07:07 UTC by Ido Rosenzwig
Modified: 2018-06-26 08:45 UTC (History)
3 users (show)

Fixed In Version: vdsm v4.20.29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-06-26 08:45:47 UTC
oVirt Team: Integration
rule-engine: ovirt-4.2+
rule-engine: blocker+

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
oVirt gerrit 91672 0 master MERGED Hosted-engine: log import exception stack trace 2018-05-28 12:14:46 UTC
oVirt gerrit 91673 0 master ABANDONED test, do not merge: Build an appliance with a custom host-deploy 2018-05-28 12:48:59 UTC
oVirt gerrit 91676 0 master MERGED packaging: rename vdsm yum plugin to avoid a name clash 2018-05-28 14:42:26 UTC
oVirt gerrit 91710 0 ovirt-host-deploy-1.7 MERGED Hosted-engine: log import exception stack trace 2018-05-30 14:24:10 UTC
oVirt gerrit 91711 0 ovirt-4.2 MERGED packaging: rename vdsm yum plugin to avoid a name clash 2018-05-29 10:12:18 UTC

Description Ido Rosenzwig 2018-05-28 07:07:11 UTC
Description of problem:
Failed to add a second HA host to after a successful deployment

receiving the following error on ovirt-host-deploy log:

Traceback (most recent call last):
  File "/tmp/ovirt-vORy9K3TBc/pythonlib/otopi/context.py", line 133, in _executeMethod
  File "/tmp/ovirt-vORy9K3TBc/otopi-plugins/ovirt-host-deploy/hosted-engine/configureha.py", line 116, in _set_ha_conf
    _('Cannot resolve ovirt_hosted_engine_ha module')
RuntimeError: Cannot resolve ovirt_hosted_engine_ha module
2018-05-28 02:13:54,541-0400 ERROR otopi.context context._executeMethod:152 Failed to execute stage 'Misc configuration': Cannot resolve ovirt_hosted_engine_ha module

Note: Manual import of ovirt_hosted_engine_ha module 
on the python interpreter in the host succeeds before and after trying to add it

How reproducible:

Steps to Reproduce:
1. deploy hosted-engine with default answers
2. add a second HA host ( I did it via the web UI)

Actual results:
host deploy failed

Expected results:
operation should have succeeded

Comment 1 Ido Rosenzwig 2018-05-28 07:20:43 UTC
This bug cause job failures on u/s Jenkins. 
logs can be found here:

Comment 2 Simone Tiraboschi 2018-05-28 10:16:13 UTC
With http://gerrit.ovirt.org/91672 we got a detailed traceback:

2018-05-28 12:15:26,774+0300 DEBUG otopi.plugins.ovirt_host_deploy.hosted-engine.configureha configureha._set_ha_conf:114 ha client import failed
Traceback (most recent call last):
  File "/tmp/ovirt-cc5rbfYWNj/otopi-plugins/ovirt-host-deploy/hosted-engine/configureha.py", line 112, in _set_ha_conf
    import ovirt_hosted_engine_ha.client.client as ha_client
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/client/client.py", line 22, in <module>
    from ..env import config, config_constants
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/env/config.py", line 22, in <module>
    from ovirt_hosted_engine_ha.env.config_ini import SharedIniFile
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/env/config_ini.py", line 3, in <module>
    from ovirt_hosted_engine_ha.env.config_shared import SharedConfigFile
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/env/config_shared.py", line 5, in <module>
    from ovirt_hosted_engine_ha.lib import heconflib
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/lib/heconflib.py", line 38, in <module>
    from vdsm.client import ServerError
ImportError: No module named client

And client is not is vdsm module since vdsm module at that point comes from:
2018-05-28 12:41:44,764+0300 DEBUG otopi.plugins.ovirt_host_deploy.hosted-engine.configureha configureha._set_ha_conf:117 <module 'vdsm' from '/usr/share/yum-plugins/vdsm.pyc'>

[root@lynx02 tmp]# rpm -qf /usr/share/yum-plugins/vdsm.pyc

introduced with https://gerrit.ovirt.org/#/c/90647/

The issue is not 100% systematic since it depends from what yum modules did according to initial packages status.

Comment 3 Nikolai Sednev 2018-06-12 10:25:11 UTC
Works for me on these components:
Linux 3.10.0-862.6.1.el7.x86_64 #1 SMP Mon Jun 4 15:33:25 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 7.5 (Maipo)

Comment 4 Sandro Bonazzola 2018-06-26 08:45:47 UTC
This bugzilla is included in oVirt 4.2.4 release, published on June 26th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.4 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.

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