TypeError: 'NoneType' object has no attribute '__getitem__' when volume_type is not set
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-cinderclient |
Fix Released
|
High
|
Eric Harney |
Bug Description
When creating a volume using cinder CLI without explicitly specifying --volume-type, the volume_type attribute is set to None if there is also no 'default_
With the introduction of this patch in Rocky, cinder CLI always assumes volume_type is not None.
https:/
This appears to be incorrect assumption is volume_type is allowed to be null, according to the API schema. When creating an image from volume, cinder CLI will result in "TypeError: 'NoneType' object has no attribute '__getitem__'"
Traceback (most recent call last):
File "/usr/lib/
for item in sys.argv[1:]])
File "/usr/lib/
args.
File "/usr/lib/
args.
File "/usr/lib/
image[
TypeError: 'NoneType' object has no attribute '__getitem__'
ERROR: 'NoneType' object has no attribute '__getitem__'
Changed in python-cinderclient: | |
importance: | Undecided → High |
Reproduces with: volume_ type=None in cinder.conf 76e9-4a58- 8c84-5f04ee6333 44 myimg
1. set default_
2. $ cinder create 1
3. $ cinder upload-to-image 69d43415-
ERROR: 'NoneType' object has no attribute '__getitem__'