openvstorage/openvstorage-health-check

ImportError when using the OpenvStorageHealthcheck module in ipython

jeroenmaelbrancke opened this issue · 3 comments

Problem description

When importing the OpenvStorageHealthcheck class on ipython/ovs-shell, the volumedriver import doesn't exists...
Manually importing the failed module is not a problem.

Version: 3.4.14-1

Logs

In [2]: from ovs.extensions.healthcheck.suites.generic import OpenvStorageHealthCheck
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-bcc888b07a59> in <module>()
----> 1 from ovs.extensions.healthcheck.suites.generic import OpenvStorageHealthCheck

/opt/OpenvStorage/ovs/extensions/healthcheck/suites/generic.py in <module>()
     39 from timeout_decorator import timeout
     40 from timeout_decorator.timeout_decorator import TimeoutError
---> 41 from volumedriver.storagerouter.storagerouterclient import ClusterNotReachableException
     42 from ovs.extensions.healthcheck.helpers.future.generic.system import System as _FutureSystem
     43 from ovs.extensions.healthcheck.helpers.future.packages.packagefactory import PackageFactory as _FuturePackageFactory

/opt/OpenvStorage/ovs/extensions/healthcheck/suites/volumedriver.py in <module>()
     29 from ovs.lib.vdisk import VDiskController
     30 from timeout_decorator.timeout_decorator import TimeoutError
---> 31 from volumedriver.storagerouter.storagerouterclient import ClusterNotReachableException, FileExistsException, LocalStorageRouterClient,\
     32     MaxRedirectsExceededException, ObjectNotFoundException
     33 

ImportError: No module named storagerouter.storagerouterclient

Looks like implicit relative importing is causing the error here.

@JeffreyDevloo please check if fixed and release if needed.