Uploading disk images in Openstack Horizon fails with: Unable to create the image
Issue
In Openstack Horizon dashboard, when trying to upload images, the operation fails with following error:
Unable to create the image
Image upload fails with Unable to create the image
error, then remains stuck in queued
state.
The following error is logged into /var/log/containers/glance/api.log
file as:
2023-06-26 18:53:39.879 27 ERROR glance.api.v2.image_data [req-11780f82-1713-495d-bd94-1b1f73045faa 335f32ac837bd41d359499c47c37334ba391ea0f0ccc0a41b7cec18a882623fc 518cfa84fea949cf9eea238e575e8279 - cc78f8d935504ef6a770459bd700d0ff default] Failed to upload image data due to internal error: webob.request.DisconnectionError: The client disconnected while sending the body (3097232262 more bytes were expected)
The browser console (which can be accessed with Ctr
+Shift
+J
) is logging:
Access to XMLHttpRequest at 'https://horizon.example.com:13292/v2/images/fcb6fd85-6c29-4186-a926-4968a3e55d7b/file' from origin 'https://horizon-alias.example.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Environment
- OpenStack Platform 16.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.