Description of problem: We see the following when we run /usr/share/rhn/virtualization/poller.pyc: Traceback (most recent call last): File "/usr/lib64/python2.6/runpy.py", line 122, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib64/python2.6/runpy.py", line 34, in _run_code exec code in run_globals File "/usr/lib64/python2.6/trace.py", line 823, in <module> main() File "/usr/lib64/python2.6/trace.py", line 811, in main t.runctx(code, globs, globs) File "/usr/lib64/python2.6/trace.py", line 512, in runctx exec cmd in globals, locals File "/usr/share/rhn/virtualization/poller.py", line 290, in <module> domain_list = poll_through_vdsm() File "/usr/share/rhn/virtualization/poller.py", line 140, in poll_through_vdsm import localvdsm File "/usr/share/rhn/virtualization/localvdsm.py", line 35, in <module> raise ImportError('local vdsm not found') ENV: RHE:-H 6.3 vdsm-4.9-113.1.el6.x86_64 rhn-virtualization-common-5.4.14-9.el6sat.noarch Version-Release number of selected component (if applicable): rhn-virtualization-host-5.4.14-9.el6sat.noarch rhn-virtualization-common-5.4.14-9.el6sat.noarch vdsm-4.9-113.1.el6.x86_64 How reproducible: Always Steps to Reproduce: Install on the latest RHEL-H and run # python /usr/share/rhn/virtualization/poller.py Actual results: Traceback (most recent call last): File "/usr/lib64/python2.6/runpy.py", line 122, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib64/python2.6/runpy.py", line 34, in _run_code exec code in run_globals File "/usr/lib64/python2.6/trace.py", line 823, in <module> main() File "/usr/lib64/python2.6/trace.py", line 811, in main t.runctx(code, globs, globs) File "/usr/lib64/python2.6/trace.py", line 512, in runctx exec cmd in globals, locals File "/usr/share/rhn/virtualization/poller.py", line 290, in <module> domain_list = poll_through_vdsm() File "/usr/share/rhn/virtualization/poller.py", line 140, in poll_through_vdsm import localvdsm File "/usr/share/rhn/virtualization/localvdsm.py", line 35, in <module> raise ImportError('local vdsm not found') Expected results: No exception. The script should be able to connect to the local VDSM Additional info: I did some research and I found out the this is issue is most probably located in /usr/share/vdsm/config.py. This is loaded in localvdsm.py that is loaded by poller.py We try to import module "constants" and then use some constants from the module grep -n constants /usr/share/vdsm/config.py 3:import constants 69:config.set('vars', 'trust_store_path', constants.P_TRUSTSTORE) 131:config.set('irs', 'pools_data_dir', constants.P_STORAGEPOOLS) 133:config.set('irs', 'lock_util_path', constants.P_VDSM_LIBEXEC) 140:config.set('irs', 'md_backup_dir', constants.P_VDSM_BACKUP) 166:config.read([constants.P_VDSM_CONF + 'vdsm.conf']) The constants module that we are interested in is located in /usr/share/vdsm/constants.py The problem is that there is also a constants module located in /usr/share/rhn/virtualization/constants.py that is loaded by /usr/share/rhn/virtualization/poller.py So we end up with a wrong module loaded.
Interesting, this is related I think to bug 820862.
*** This bug has been marked as a duplicate of bug 820862 ***