openvstorage / openvstorage-health-check

The health check is classified as a monitoring and detection tool for Open vStorage.
3 stars 7 forks source link

ImportError when using the OpenvStorageHealthcheck module in ipython #483

Closed jeroenmaelbrancke closed 6 years ago

jeroenmaelbrancke commented 6 years ago

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
JeffreyDevloo commented 6 years ago

Looks like implicit relative importing is causing the error here.

wimpers commented 6 years ago

@JeffreyDevloo please check if fixed and release if needed.

JeffreyDevloo commented 6 years ago

See https://github.com/openvstorage/openvstorage-health-check/issues/480