Problem
- Command to download the glance image returns with Error "No Data". Both the below mentioned commands fail with the same error
$ glance image-download --file <FILE> <snapshot UUID>
$ openstack image save --file <FILE> <snapshot UUID> - Error observed on command prompt without --debug option.
Image <UUID> has no data.
Image <UUID> has no data. - Error observed with --debug option.
GET call to image for http://X.X.X.X/v2/images/<Image-UUID> used request id req-xxxxxx
Unable to download image: InvalidResponse
clean_up SaveImage: Unable to download image: InvalidResponse
END return value: 1
Environment
- Platform9 Managed OpenStack - All Versions
- Glance
- Images
Cause
- This issue is observed when the images are not stored on a shared host and the download call is hitting the endpoint of Glance host on which the image is not present.
- You can verify the image status on hosts using the below command. If the image is present on all nodes it will show "OK" for all nodes in properties.
$ openstack image show <snapshot UUID> -c properties
- Run the below command to confirm which endpoint is hit.
$ glance --debug image-download --file <FILE> <snapshot UUID>
OR
$ openstack image save --file <FILE> <snapshot UUID> --debug
Resolution:
- Click on the 'Images' tab in the UI.
- Click on the 'Add New Image' button.
- Manually SCP the Image in the path defined under column "Path to Image Library Watch Folder" on hosts that do not have this image.
Additional Information
When a new image is created, it will only be uploaded to one of the authorized image library hosts, and the image file will be stored in the chosen image repository location on that host. Requests to download the file from another image library host will fail unless the image file is made available on that host. To maximize image availability and fault tolerance, each image library host must have access to all the image files cataloged by the Glance service. Refer to the article Image Catalog High Availability for more details.