So in that case, there isn't an existing glance image that we're converting; the "image" is really a volume, so that's why if no image_id is passed, check_image_format will use the string 'internal image' in log/exception messages.
As far as it causing a regression, before this patch, convert_image() did not take an image_id parameter, and the only place it's used here is when it's passed to check_image_format(), so I think we're OK.
@Rajat: thanks for the review. As Arnaud pointed out in comment #41, several drivers are calling convert_image() directly, like here, where the remotenfs driver uses convert_image() to flatten snapshots before uploading the result to glance: /opendev. org/openstack/ cinder/ src/commit/ 12fb54ad6076201 7da4aa02290bc2c 5c7d5b697b/ cinder/ volume/ drivers/ remotefs. py#L1103
https:/
So in that case, there isn't an existing glance image that we're converting; the "image" is really a volume, so that's why if no image_id is passed, check_image_format will use the string 'internal image' in log/exception messages.
As far as it causing a regression, before this patch, convert_image() did not take an image_id parameter, and the only place it's used here is when it's passed to check_image_ format( ), so I think we're OK.