AttributeError: 'module' object has no attribute 'service_type'

Bug #1659909 reported by Mitsuhiro Tanino
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cinderclient
Fix Released
Medium
Mitsuhiro Tanino

Bug Description

After this commit is introduced, brick_cinderclient_ext always hit "no attribute 'service_type'" because service_type decorator is used in the __init__.py.

----
commit 204b15ab13004e3d5ac1ec4d0dbd3fe94bb2a8fd
Removed unnecessary 'service_type' decorator

# cinder --debug list
DEBUG (shell:961) 'module' object has no attribute 'service_type'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cinderclient/shell.py", line 956, in main
    for item in sys.argv[1:]])
  File "/usr/lib/python2.7/site-packages/cinderclient/shell.py", line 587, in main
    self.extensions = client.discover_extensions(major_version_string)
  File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 720, in discover_extensions
    _discover_via_contrib_path(version)):
  File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 735, in _discover_via_python_path
    module = module_loader.load_module(name)
  File "/usr/lib64/python2.7/pkgutil.py", line 246, in load_module
    mod = imp.load_module(fullname, self.file, self.filename, self.etc)
  File "/usr/lib/python2.7/site-packages/brick_cinderclient_ext/__init__.py", line 69, in <module>
    @utils.service_type('volumev2')
AttributeError: 'module' object has no attribute 'service_type'
DEBUG:cinderclient.shell:'module' object has no attribute 'service_type'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cinderclient/shell.py", line 956, in main
    for item in sys.argv[1:]])
  File "/usr/lib/python2.7/site-packages/cinderclient/shell.py", line 587, in main
    self.extensions = client.discover_extensions(major_version_string)
  File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 720, in discover_extensions
    _discover_via_contrib_path(version)):
  File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 735, in _discover_via_python_path
    module = module_loader.load_module(name)
  File "/usr/lib64/python2.7/pkgutil.py", line 246, in load_module
    mod = imp.load_module(fullname, self.file, self.filename, self.etc)
  File "/usr/lib/python2.7/site-packages/brick_cinderclient_ext/__init__.py", line 69, in <module>
    @utils.service_type('volumev2')
AttributeError: 'module' object has no attribute 'service_type'
ERROR: 'module' object has no attribute 'service_type'

Changed in python-cinderclient:
assignee: nobody → Mitsuhiro Tanino (mitsuhiro-tanino)
Changed in python-cinderclient:
importance: Undecided → Medium
Revision history for this message
Mitsuhiro Tanino (mitsuhiro-tanino) wrote :

This fix has been merged already.

Remove unnecessary 'service_type' decorator
https://review.openstack.org/#/c/426332/

Changed in python-cinderclient:
status: New → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-brick-cinderclient-ext 0.4.0

This issue was fixed in the openstack/python-brick-cinderclient-ext 0.4.0 release.

tags: added: brick-cinderclient-ext
Changed in python-cinderclient:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.