emc-openstack / unity-cinder-driver

Cinder driver for EMC Unity systems.
11 stars 3 forks source link

ImportError: cannot import name interface #15

Closed jorgefg closed 5 years ago

jorgefg commented 5 years ago

Hi, after installing storops library and Unity Cinder driver, the service failed to start and this error is displayed in cinder-volume.log:

ERROR cinder.cmd.volume [req-ff066247-7aea-4cd0-b7bd-173b5273b334 - - - - -] Volume service node-147@unity failed to start. ERROR cinder.cmd.volume Traceback (most recent call last): ERROR cinder.cmd.volume File "/usr/lib/python2.7/dist-packages/cinder/cmd/volume.py", line 81, in main ERROR cinder.cmd.volume binary='cinder-volume') ERROR cinder.cmd.volume File "/usr/lib/python2.7/dist-packages/cinder/service.py", line 268, in create ERROR cinder.cmd.volume service_name=service_name) ERROR cinder.cmd.volume File "/usr/lib/python2.7/dist-packages/cinder/service.py", line 150, in init ERROR cinder.cmd.volume *args, *kwargs) ERROR cinder.cmd.volume File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 285, in init ERROR cinder.cmd.volume active_backend_id=curr_active_backend_id) ERROR cinder.cmd.volume File "/usr/lib/python2.7/dist-packages/oslo_utils/importutils.py", line 44, in import_object ERROR cinder.cmd.volume return import_class(import_str)(args, **kwargs) ERROR cinder.cmd.volume File "/usr/lib/python2.7/dist-packages/oslo_utils/importutils.py", line 30, in import_class ERROR cinder.cmd.volume import(mod_str) ERROR cinder.cmd.volume File "/usr/lib/python2.7/dist-packages/cinder/volume/drivers/dell_emc/unity/init.py", line 16, in ERROR cinder.cmd.volume from cinder.volume.drivers.dell_emc.unity import driver ERROR cinder.cmd.volume File "/usr/lib/python2.7/dist-packages/cinder/volume/drivers/dell_emc/unity/driver.py", line 21, in ERROR cinder.cmd.volume from cinder import interface ERROR cinder.cmd.volume ImportError: cannot import name interface ERROR cinder.cmd.volume

This is Ubuntu 14.04 and OpenStack release is Mitaka.

Many thanks in advance, Jorge.

yong-huang commented 5 years ago

Hi,

cinder.interface is introduced since Newton release, so there is no cinder.interface in Mitaka. From the log you attached, the driver is trying to import interface from cinder, so the exception raised.

Unity Mitaka driver will not import interface, please check line#21: https://github.com/emc-openstack/unity-cinder-driver/blob/mitaka/cinder/volume/drivers/dell_emc/unity/driver.py

Unity Newton and newer driver will import it: https://github.com/emc-openstack/unity-cinder-driver/blob/newton/cinder/volume/drivers/dell_emc/unity/driver.py

So, seems you are using Mitaka OpenStack and Newton or newer Unity driver, they are not compatible.

jorgefg commented 5 years ago

Hi young-huang, you're right! It was the wrong version.

Many thanks for your help, Jorge.