Bug 1688811

Summary: host-deploy fails if python34 is installed on Centos 7 host
Product: [oVirt] otopi Reporter: Simone Tiraboschi <stirabos>
Component: CoreAssignee: Yedidyah Bar David <didi>
Status: CLOSED WONTFIX QA Contact: Lukas Svaty <lsvaty>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: masterCC: bugs, oourfali, thomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-17 07:02:20 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:

Description Simone Tiraboschi 2019-03-14 13:58:52 UTC
Description of problem:
host-deploy fails if python34 is installed on Centos 7 host

The error is:
2019-03-14 14:33:54,481+01 ERROR [org.ovirt.engine.core.bll.hostdeploy.VdsDeployBase] (EE-ManagedThreadFactory-engine-Thread-1) [636025ac] Error during host c75he20190311h1 install
2019-03-14 14:33:54,494+01 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedThreadFactory-engine-Thread-1) [636025ac] EVENT_ID: VDS_INSTALL_IN_PROGRESS_ERROR(511), An error has occurred during installation of Host c75he20190311h1: Unexpected error during execution: Traceback (most recent call last):
  File "/tmp/ovirt-CYhPU8MZxg/pythonlib/otopi/main.py", line 141, in execute
    self.context.loadPlugins()
  File "/tmp/ovirt-CYhPU8MZxg/pythonlib/otopi/context.py", line 769, in loadPlugins
    self._loadPluginGroups(plugindir, needgroups, loadedgroups)
  File "/tmp/ovirt-CYhPU8MZxg/pythonlib/otopi/context.py", line 112, in _loadPluginGroups
    self._loadPlugins(path, path, groupname)
  File "/tmp/ovirt-CYhPU8MZxg/pythonlib/otopi/context.py", line 69, in _loadPlugins
    self._loadPlugins(base, d, groupname)
  File "/tmp/ovirt-CYhPU8MZxg/pythonlib/otopi/context.py", line 100, in _loadPlugins
    os.path.basename(path),
  File "/tmp/ovirt-CYhPU8MZxg/pythonlib/otopi/util.py", line 107, in loadModule
    module = importlibutil.module_from_spec(spec)
AttributeError: 'module' object has no attribute 'module_from_spec'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/ovirt-CYhPU8MZxg/pythonlib/otopi/__main__.py", line 83, in main
    installer.execute()
  File "/tmp/ovirt-CYhPU8MZxg/pythonlib/otopi/main.py", line 147, in execute
    sys.exc_info()[2],
  File "/tmp/ovirt-CYhPU8MZxg/pythonlib/otopi/util.py", line 84, in raiseExceptionInformation
    raise info[1].with_traceback(info[2])
  File "/tmp/ovirt-CYhPU8MZxg/pythonlib/otopi/main.py", line 141, in execute
    self.context.loadPlugins()
  File "/tmp/ovirt-CYhPU8MZxg/pythonlib/otopi/context.py", line 769, in loadPlugins
    self._loadPluginGroups(plugindir, needgroups, loadedgroups)
  File "/tmp/ovirt-CYhPU8MZxg/pythonlib/otopi/context.py", line 112, in _loadPluginGroups
    self._loadPlugins(path, path, groupname)
  File "/tmp/ovirt-CYhPU8MZxg/pythonlib/otopi/context.py", line 69, in _loadPlugins
    self._loadPlugins(base, d, groupname)
  File "/tmp/ovirt-CYhPU8MZxg/pythonlib/otopi/context.py", line 100, in _loadPlugins
    os.path.basename(path),
  File "/tmp/ovirt-CYhPU8MZxg/pythonlib/otopi/util.py", line 107, in loadModule
    module = importlibutil.module_from_spec(spec)
otopi.main.PluginLoadException: 'module' object has no attribute 'module_from_spec'
.
2019-03-14 14:33:54,494+01 ERROR [org.ovirt.engine.core.bll.hostdeploy.VdsDeployBase] (EE-ManagedThreadFactory-engine-Thread-1) [636025ac] Error during host c75he20190311h1 install, preferring first exception: Unexpected connection termination
2019-03-14 14:33:54,494+01 ERROR [org.ovirt.engine.core.bll.hostdeploy.InstallVdsInternalCommand] (EE-ManagedThreadFactory-engine-Thread-1) [636025ac] Host installation failed for host '3d759c1b-4cac-4da4-bed0-d1cf895ae5ef', 'c75he20190311h1': Unexpected connection termination


Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. install python34
2. try to deploy the host from the engine
3.

Actual results:
otopi.main.PluginLoadException: 'module' object has no attribute 'module_from_spec'

Maybe an otopi issue with python 3

Expected results:
Successful deployment

Additional info:

Comment 1 Yedidyah Bar David 2019-03-17 07:02:20 UTC
This is a known issue, and IIRC we decided to not fix it. Also newer Python 3 (e.g. from SCL), which might not require much work, is not supported nor tested.

We might change this decision if there is a specific reason to have Python 3.4 installed on an oVirt host (or engine). Otherwise, please remove it.

Closing for now, please reopen if needed.

(Also moving to otopi, as IMO that's where this bug is).