unable to create images using glance api request
I am following the documentation at API-Documentation. I am hitting a post request to upload a new image in the glance. I am getting the 500 error and below error message in my glance-api.log
========
curl -i -H "Content-Type: application/octet-stream" -H "X-Auth-Token:d673cc8cddd24732bd2801cb5b3e00e3" -H "x-image-meta-disk-format:qcow2" -H "x-image-meta-container-format:bare" -H "x-image-meta-name:sigtemplate" --data-binary /opt/sigtemplate.qcow2 http://10.1.10.22:9292/v1/images
This is the error message that it gives HTTP/1.1 500 Internal Server Error Content-Length: 228 Content-Type: text/html; charset=UTF-8 X-Openstack-Request-Id: req-735280e9-7f16-496a-9950-1dfa5dc20dc0 Date: Wed, 12 Oct 2016 10:55:49 GMT
<html> <head> <title>500 Internal Server Error</title> </head> <body>
500 Internal Server Error
The server has either erred or is incapable of performing the requested operation.</body> </html>
[root@localhost opt(keystone_admin)]# ===================== I checked the glance-api logs and found this traceback
2016-10-12 16:25:49.297 9700 ERROR glance.common.wsgi 'exc_name': exc_name})
2016-10-12 16:25:49.297 9700 ERROR glance.common.wsgi File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2016-10-12 16:25:49.297 9700 ERROR glance.common.wsgi self.force_reraise()
2016-10-12 16:25:49.297 9700 ERROR glance.common.wsgi File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2016-10-12 16:25:49.297 9700 ERROR glance.common.wsgi six.reraise(self.type_, self.value, self.tb)
2016-10-12 16:25:49.297 9700 ERROR glance.common.wsgi File "/usr/lib/python2.7/site-packages/glance/registry/client/v1/client.py", line 123, in do_request
2016-10-12 16:25:49.297 9700 ERROR glance.common.wsgi **kwargs)
2016-10-12 16:25:49.297 9700 ERROR glance.common.wsgi File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 70, in wrapped
2016-10-12 16:25:49.297 9700 ERROR glance.common.wsgi return func(self, *args, **kwargs)
2016-10-12 16:25:49.297 9700 ERROR glance.common.wsgi File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 373, in do_request
2016-10-12 16:25:49.297 9700 ERROR glance.common.wsgi headers=copy.deepcopy(headers))
2016-10-12 16:25:49.297 9700 ERROR glance.common.wsgi File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 87, in wrapped
2016-10-12 16:25:49.297 9700 ERROR glance.common.wsgi return func(self, method, url, body, headers)
2016-10-12 16:25:49.297 9700 ERROR glance.common.wsgi File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 528, in _do_request
2016-10-12 16:25:49.297 9700 ERROR glance.common.wsgi elif status_code == http_client.NOT_FOUND:
2016-10-12 16:25:49.297 9700 ERROR glance.common.wsgi NotFound: Image not found
2016-10-12 16:25:49.297 9700 ERROR glance.common.wsgi
2016-10-12 16:25:49.302 9700 INFO eventlet.wsgi.server [req-735280e9-7f16-496a-9950-1dfa5dc20dc0 5febd1e767a84492b138a74ad1ee9af2 - - - -] 10.1.10.22 - - [12/Oct/2016 16:25:49] "POST /v1/images HTTP/1.1" 500 430 0.299338
2016-10-12 16:25:50.343 9715 DEBUG eventlet.wsgi.server [-] (9715) accepted ('10.1.10.22', 45377) server /usr/lib/python2.7/site-packages ...