glance requests: 404 Not Found
I am following this guide, and have trouble doing anything with glance. I first stumpled across this when I tried to add an image like this:
[root@cloud ~]# glance -d image-create --is-public true --disk-format qcow2 --container-format bare --name "Ubuntu" <precise-server-cloudimg-amd64.img
HTTP/1.1 404 Not Found
date: Fri, 05 Jul 2013 15:27:46 GMT
content-length: 52
content-type: text/plain; charset=UTF-8
x-openstack-request-id: req-ba4ea9c8-ccab-486c-ada2-5a8ac00d8d5c
404 Not Found
The resource could not be found.
Request returned failure status.
404 Not Found
The resource could not be found.
(HTTP 404)
Doing an glance image-list
gives the same error. In /var/log/glance/api.log
, I find
2013-07-05 17:27:46.613 1653 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: POST //v1/images Accept: process_request /usr/lib/python2.7/site-packages/glance/api/middleware/version_negotiation.py:46
2013-07-05 17:27:46.618 1653 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/site-packages/glance/api/middleware/version_negotiation.py:59
2013-07-05 17:27:46.619 1653 DEBUG glance.api.middleware.version_negotiation [-] Matched version: v1 process_request /usr/lib/python2.7/site-packages/glance/api/middleware/version_negotiation.py:71
2013-07-05 17:27:46.620 1653 DEBUG glance.api.middleware.version_negotiation [-] new uri /v1/images process_request /usr/lib/python2.7/site-packages/glance/api/middleware/version_negotiation.py:72
While doing the image-create command, I can see in top that glance is working for a while, being at the top of the process list. So it seems that glance is connecting and working, but then somehow fails.
On a sidenote, not sure if thats related: when stopping the glance daemons, I get
2013-07-05 16:05:39.703 3624 CRITICAL glance [-] [Errno 13] Permission denied
2013-07-05 16:05:39.703 3624 TRACE glance Traceback (most recent call last):
2013-07-05 16:05:39.703 3624 TRACE glance File "/usr/bin/glance-api", line 65, in <modu
le>
2013-07-05 16:05:39.703 3624 TRACE glance server.wait()
2013-07-05 16:05:39.703 3624 TRACE glance File "/usr/lib/python2.7/site-packages/glance
/common/wsgi.py", line 271, in wait
2013-07-05 16:05:39.703 3624 TRACE glance self.wait_on_children()
2013-07-05 16:05:39.703 3624 TRACE glance File "/usr/lib/python2.7/site-packages/glance
/common/wsgi.py", line 244, in wait_on_children
2013-07-05 16:05:39.703 3624 TRACE glance pid, status = os.wait()
2013-07-05 16:05:39.703 3624 TRACE glance File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 210, in kill_children
2013-07-05 16:05:39.703 3624 TRACE glance os.killpg(pgid, signal.SIGTERM)
2013-07-05 16:05:39.703 3624 TRACE glance OSError: [Errno 13] Permission denied
2013-07-05 16:05:39.703 3624 TRACE glance
I had a look at the code, and its the os.killpg(pgid, signal.SIGTERM
that causes this, but nonetheless, the daemon is stopped.