Bug 1894298

Summary: ModuleNotFoundError: No module named 'ovirt_engine' raised when starting ovirt-engine-dwhd.py in dev env
Product: Red Hat Enterprise Virtualization Manager Reporter: Hilda Stastna <hstastna>
Component: ovirt-engine-dwhAssignee: Yedidyah Bar David <didi>
Status: CLOSED NEXTRELEASE QA Contact: Lucie Leistnerova <lleistne>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: jhenner, lsurette, mhicks, mperina, sradco, srevivo
Target Milestone: ovirt-4.4.4Keywords: CodeChange
Target Release: 4.4.4   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-engine-dwh-4.4.4.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-27 16:01:15 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:
Attachments:
Description Flags
traceback none

Description Hilda Stastna 2020-11-03 23:13:56 UTC
Created attachment 1726425 [details]
traceback

Description of problem:
When building and installing the oVirt DWH development environment according to the doc https://ovirt.org/develop/dwh-development-environment.html, starting the dwh service failed.

The problem seems to be caused by this line in packaging/services/ovirt-engine-dwhd/config.py:

DEV_PYTHON_DIR = '.../ovirt-engine/usr/lib/python2.7/site-packages'

But the ovirt-engine now doesn't use/install to python2.7 and the .../ovirt-engine/usr/lib/python2.7 doesn't exist. This happens because python3 is used by default. Than the DWH startup script cannot find required packages.

Version-Release number of selected component (if applicable):
DWH: latest version, commit e62bd32f52b063def71ba898f1d9da379d5bac7f 
DHW installed on Fedora 31

How reproducible:
always

Steps to Reproduce:
1. Build and install the ovirt-engine dev environment
2. Follow the doc "oVirt DWH development environment":
https://ovirt.org/develop/dwh-development-environment.html
3. Start the DWH service:
$ $HOME/ovirt-engine/share/ovirt-engine-dwh/services/ovirt-engine-dwhd/ovirt-engine-dwhd.py start

Actual results:
The DWH service didn't start and raised ModuleNotFoundError.

Expected results:
The DWH service starts successfully.

Additional info:
Although this problem is related to the development environment, python 2 is obsolete and the DWH shouldn't use it anymore.

Comment 1 Yedidyah Bar David 2020-11-05 15:04:56 UTC
Can you please check if change 112095 works for you, and mark verified? Thanks!

Comment 2 Hilda Stastna 2020-11-05 17:56:55 UTC
Hello Yedidyah,

yes, the change 112095 works for me, it fixes the problem with starting the DWH service. Also I can see "DEV_PYTHON_DIR = '.../ovirt-engine/usr/lib/python3.7/site-packages'" and not "...python2.7..." in packaging/services/ovirt-engine-dwhd/config.py after the dwh installation. However there are some improvements that can be done as already mentioned in gerrit. Thank you very much!

Comment 5 Casper (RHV QE bot) 2020-11-27 16:01:15 UTC
This bug has low overall severity and passed an automated regression suite, and is not going to be further verified by QE. If you believe special care is required, feel free to re-open to ON_QA status.