Image Upload Fails due to Missing Endpoint
Problem
- Image upload is failing via CLI due to missing
admin
endpoint.
x
$ echo $OS_INTERFACE
admin
$ openstack image create --insecure --container-format bare --disk-format qcow2 --file <image> <image-name>
admin endpoint for image service in <region-name> region not found
Environment
- Platform9 Cloud Director
Cause
- PCD image uploads > 1Gi is recommended to be performed via CLI command. Also adding admin endpoint interface is a prerequisite before uploading the image via CLI.
- The
admin
endpoint is missing from glance service catalog; that blocks any Glance administrative tasks.
$ openstack catalog show image
+-----------+----------------------------------------------------------------------------------+
| Field | Value |
+-----------+----------------------------------------------------------------------------------+
| endpoints | region-one |
| | public: https://test-pcd-region-one.app.test.example.com/glance/ |
| | region-one |
| | internal: http://glance-api.test-pcd-region-one.svc.cluster.local:9292/
| id | 1b395685e1804dec82178ef237bafd52 |
| name | glance |
| type | image |
+-----------+----------------------------------------------------------------------------------
- It can also be verified by listing endpoint information for a image service.
$ openstack --insecure endpoint list --service image --region region-one
+----------------------------------+--------+--------------+--------------+---------+-----------+----------------------------------------------------------------------+
| ID | Region | Service Name | Service Type | Enabled | Interface | URL |
+----------------------------------+--------+--------------+--------------+---------+-----------+----------------------------------------------------------------------+
| 3d484a80e70c4283bd28ae5dd690f751 | gk-one | glance | image | True | public | https://test-pcd-region-one.app.test.example.com/glance/ |
| fa8c4bf475904150a8f78c56e8608722 | gk-one | glance | image | True | internal | http://glance-api.test-pcd-region-one.svc.cluster.local:9292/ |
+----------------------------------+--------+--------------+--------------+---------+-----------+----------------------------------------------------------------------+
Resolution
- Manually creating admin endpoint for the image service will allow the images to be uploaded.
$ openstack endpoint create --region region-one image admin https://<glance-host-IP>:9494
- Verfiy the newly created
admin
endpoint.
$ openstack catalog show image
+-----------+----------------------------------------------------------------------------------+
| Field | Value |
+-----------+----------------------------------------------------------------------------------+
| endpoints | region-one |
| | public: https://test-pcd-region-one.app.test.example.com/glance/ |
| | region-one |
| | admin: https://10.9.7.186:9494 |
| | region-one |
| | internal: http://glance-api.test-pcd-region-one.svc.cluster.local:9292/
| id | 1b395685e1804dec82178ef237bafd52 |
| name | glance |
| type | image |
+-----------+----------------------------------------------------------------------------------+
Additional Information
- When the
OS_INTERFACE
is set aspublic
[default configuration], image upload fails with the below error. This is because, nginx placed in front of Glance API, blocks an image upload (or download) as the file size exceeds the configured limit [not more than 1Gi].
HttpException: 413: Client Error for url: https://test-pcd-region-one.app.test.example.com/glance/v2/images/b6d377b4-b299-4b87-8b14-2e5f1064131f/file, 413 Request Entity Too Large: nginx
Was this page helpful?