Bug 1583045

Summary: Failed to add a second host after a successful deployment due to a name clash on vdsm python module
Product: [oVirt] vdsm Reporter: Ido Rosenzwig <irosenzw>
Component: GeneralAssignee: Ido Rosenzwig <irosenzw>
Status: CLOSED CURRENTRELEASE QA Contact: Nikolai Sednev <nsednev>
Severity: urgent Docs Contact:
Priority: urgent    
Version: ---CC: bugs, lveyde, stirabos
Target Milestone: ovirt-4.2.4Keywords: Triaged
Target Release: ---Flags: rule-engine: ovirt-4.2+
rule-engine: blocker+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: vdsm v4.20.29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-26 08:45:47 UTC Type: Bug
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:    
Bug Blocks: 1583038    

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
    method['method']()
  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:
100%

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

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:
http://jenkins.ovirt.org/job/ovirt-system-tests_he-basic-suite-master/461/artifact/exported-artifacts/

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'>

From:
[root@lynx02 tmp]# rpm -qf /usr/share/yum-plugins/vdsm.pyc
vdsm-4.20.28-1.el7ev.x86_64

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:
vdsm-4.20.30-1.el7ev.x86_64
ovirt-hosted-engine-ha-2.2.13-1.el7ev.noarch
ovirt-hosted-engine-setup-2.2.22-1.el7ev.noarch
rhvm-appliance-4.2-20180601.0.el7.noarch
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.