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 {}
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: 'volume_ type'] = None pop('scheduler_ hints', None) pop('volume_ type') 'volume_ type'] = None 'volume_ type'] = objects. VolumeType( ) VolumeType( )._from_ db_object( context, 'volume_ type'], db_vt) RequestSpec( **kwargs)
-> kwargs[
(Pdb) l
747
748 def execute(self, context, **kwargs):
749 scheduler_hints = kwargs.
750 db_vt = kwargs.
751 import pdb; pdb.set_trace()
752 -> kwargs[
753 if db_vt:
754 kwargs[
755 objects.
756 kwargs[
757 request_spec = objects.
(Pdb) db_vt
{}