Comment 3 for bug 1610073

Revision history for this message
Tina Tang (tina-tang) wrote :

Not sure whether I am using the same version with Karthik. When I saw this issue, the **kwargs does include the volume_type. And the volume_type is an empty list. Thus the check on L752 is false.

https://github.com/openstack/cinder/blob/master/cinder/volume/flows/api/create_volume.py#L752

Please see the debug trace:
-> kwargs['volume_type'] = None
(Pdb) l
747
748 def execute(self, context, **kwargs):
749 scheduler_hints = kwargs.pop('scheduler_hints', None)
750 db_vt = kwargs.pop('volume_type')
751 import pdb; pdb.set_trace()
752 -> kwargs['volume_type'] = None
753 if db_vt:
754 kwargs['volume_type'] = objects.VolumeType()
755 objects.VolumeType()._from_db_object(context,
756 kwargs['volume_type'], db_vt)
757 request_spec = objects.RequestSpec(**kwargs)
(Pdb) db_vt
{}