Bug 844482

Summary: rhevm-setup can't find nfsutils.py
Product: Red Hat Enterprise Virtualization Manager Reporter: Stephen Gordon <sgordon>
Component: ovirt-engine-setupAssignee: Moran Goldboim <mgoldboi>
Status: CLOSED NOTABUG QA Contact: Pavel Stehlik <pstehlik>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: bazulay, dyasny, iheim, juan.hernandez, Rhev-m-bugs, sgrinber, ykaul
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-31 21:13:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stephen Gordon 2012-07-30 20:38:09 UTC
Description of problem:

When attempting to run rhevm-setup I receive the following error:

# rhevm-setup 
Traceback (most recent call last):
  File "/usr/bin/rhevm-setup", line 19, in <module>
    import nfsutils
ImportError: No module named nfsutils

It looks like nfsutils.py is provided in /usr/share/ovirt-engine/scripts/ but isn't picked up in the path, possible because unlike the rest of the python scripts the entry in /usr/bin isn't a link but is the actual script itself:

# ls -l /usr/bin/rhevm*
lrwxrwxrwx. 1 root root     28 Jul 30 20:02 /usr/bin/rhevm-check-update -> /usr/bin/engine-check-update
lrwxrwxrwx. 1 root root     49 Jul 30 20:02 /usr/bin/rhevm-cleanup -> /usr/share/ovirt-engine/scripts/engine-cleanup.py
lrwxrwxrwx. 1 root root     51 Jul 30 20:02 /usr/bin/rhevm-config -> /usr/share/ovirt-engine/engine-config/engine-config
lrwxrwxrwx. 1 root root     55 Jul 30 19:52 /usr/bin/rhevm-image-uploader -> /usr/share/rhevm/image-uploader/rhevm-image-uploader.py
lrwxrwxrwx. 1 root root     51 Jul 30 19:52 /usr/bin/rhevm-iso-uploader -> /usr/share/rhevm/iso-uploader/rhevm-iso-uploader.py
lrwxrwxrwx. 1 root root     53 Jul 30 19:52 /usr/bin/rhevm-log-collector -> /usr/share/rhevm/log-collector/rhevm-log-collector.py
lrwxrwxrwx. 1 root root     67 Jul 30 20:02 /usr/bin/rhevm-manage-domains -> /usr/share/ovirt-engine/engine-manage-domains/engine-manage-domains
-rwxr-xr-x. 1 root root 103222 Jul 30 20:23 /usr/bin/rhevm-setup
lrwxrwxrwx. 1 root root     49 Jul 30 20:02 /usr/bin/rhevm-upgrade -> /usr/share/ovirt-engine/scripts/engine-upgrade.py


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

SI12, rhevm-setup-3.1.0-5.el6ev

Comment 1 Stephen Gordon 2012-07-30 20:41:48 UTC
# ls -l /usr/share/ovirt-engine/scripts/nfsutils.py
-rw-r--r--. 1 root root 4496 Jul  4 08:22 /usr/share/ovirt-engine/scripts/nfsutils.py

Comment 2 Stephen Gordon 2012-07-30 20:44:14 UTC
Copying rhevm-setup to /usr/share/ovirt-engine/scripts/ and running it from there results in it picking up the missign scripts as a workaround.

Comment 3 Stephen Gordon 2012-07-30 20:50:37 UTC
(In reply to comment #0)
> It looks like nfsutils.py is provided in /usr/share/ovirt-engine/scripts/
> but isn't picked up in the path, possible because unlike the rest of the
> python scripts the entry in /usr/bin isn't a link but is the actual script
> itself:

Bit of a misnomer here, this would only have made sense if the scripts being linked to existed in /usr/share/ovirt-engine/scripts/. Either way, whatever mechanism was being used previously to expose these libs to Python does not appear to be working correctly in this build - at least for rhevm-setup.