Description of problem: trying to create an image from an HTTP backend I get the image is created but I don't see it in glance image-list or any other place. I also don't find anything in the logs. after changing Debug from False to True I see the following on api log: 2013-10-24 11:59:25.278 7727 DEBUG qpid.messaging.io.raw [-] READ[2ecb6c8]: '\x0f\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x01\x0c\x00\x00' readable /usr/lib/python2.6/site-packages/qpid/messaging/driver.py:416 2013-10-24 11:59:25.279 7727 DEBUG qpid.messaging.io.ops [-] RCVD[2ecb6c8]: ConnectionCloseOk() write /usr/lib/python2.6/site-packages/qpid/messaging/driver.py:654 2013-10-24 11:59:25.279 7727 DEBUG glance.common.client [f2edb6da-6141-4298-bd09-d12abc9a75a4 f39233dcb1d6437baa822ca0d80027e5 e549c26a26e749328a4245991e2619f1] Constructed URL: http://0.0.0.0:9191/images/559287e4-56c4-44b2-9afd-3b03a7e8ab96/members _construct_url /usr/lib/python2.6/site-packages/glance/common/client.py:408 2013-10-24 11:59:25.297 7727 DEBUG glance.registry.client.v1.client [f2edb6da-6141-4298-bd09-d12abc9a75a4 f39233dcb1d6437baa822ca0d80027e5 e549c26a26e749328a4245991e2619f1] Registry request GET /images/559287e4-56c4-44b2-9afd-3b03a7e8ab96/members HTTP 200 request id req-8c729698-54c3-421e-99c5-52de188b2387 do_request /usr/lib/python2.6/site-packages/glance/registry/client/v1/client.py:115 2013-10-24 11:59:25.298 7727 DEBUG glance.store [f2edb6da-6141-4298-bd09-d12abc9a75a4 f39233dcb1d6437baa822ca0d80027e5 e549c26a26e749328a4245991e2619f1] Skipping store.set_acls... not implemented. set_acls /usr/lib/python2.6/site-packages/glance/store/__init__.py:369 expected results: if something is failing, user must be able to get a valid error or warning either is horizon or CLI, furthermore, we need to make sure to print something valid in the log as well. reproduction (make sure selinux is on): - set a running httpd server - place an ISO image on the HTTP root dir - run glance-image create check logs
Created attachment 815707 [details] logs
There's no error here, the message you're seeing when setting Glance log level to Debug just tells you that the store being used does not implement set_acls method, which is totally fine since that's something store-specific and glance can still operate without that method. `LOG.error` / `LOG.exception` is used when real errors occur and you'll find them in the logs, [0] for example. [0] https://github.com/openstack/glance/blob/master/glance/store/__init__.py#L666
(In reply to Flavio Percoco from comment #2) > There's no error here, the message you're seeing when setting Glance log > level to Debug just tells you that the store being used does not implement > set_acls method, which is totally fine since that's something store-specific > and glance can still operate without that method. > > `LOG.error` / `LOG.exception` is used when real errors occur and you'll find > them in the logs, [0] for example. > > [0] > https://github.com/openstack/glance/blob/master/glance/store/__init__.py#L666 Flavio, I think you miss-understood the bug, I know that there is no ERROR, this is why I opened a bug, the problem is that I would like to see an error or any indication that something is wrong if I commit an action and it fails. please revise expected results again, moving back to assigned as its indeed a bug.
(In reply to Haim from comment #3) > (In reply to Flavio Percoco from comment #2) > > There's no error here, the message you're seeing when setting Glance log > > level to Debug just tells you that the store being used does not implement > > set_acls method, which is totally fine since that's something store-specific > > and glance can still operate without that method. > > > > `LOG.error` / `LOG.exception` is used when real errors occur and you'll find > > them in the logs, [0] for example. > > > > [0] > > https://github.com/openstack/glance/blob/master/glance/store/__init__.py#L666 > > Flavio, I think you miss-understood the bug, I know that there is no ERROR, > this is why I opened a bug, the problem is that I would like to see an error > or any indication that something is wrong if I commit an action and it fails. > > please revise expected results again, moving back to assigned as its indeed > a bug. I understood that. What I meant to say is that the reason of the failure here, if any, is unknown - or hidden somewhere - and that makes it impossible to report an actual error. Errors are being sent back to the client when they occur. We need to find the cause of this failure - which is what #1022911 is for, isn't it? - and report that error back - or a generic one. Again, if no error was reported is because no exception / failure occurred or it was caught and not sent back. I would rather use #1022911 to tackle this issue than having a generic bug that intends to report an error from a failure that we don't know. Am I missing something?
Hey Haim, In the bug report you mentioned you're using httpd. Could you re-test this taking this[0] under consideration? [0] http://www.cberendt.de/2013/11/using-nginx-with-the-glance-api/?utm_source=rss&utm_medium=rss&utm_campaign=using-nginx-with-the-glance-api
The real bug is that glance-api returns an empty iterator when the size of the image is 0. This is an issue when the image is created with `--location` and the size of it is not provided. For example: $ glance image-create --name Fedora17-image --disk-format=iso --container-format=bare --size 5 --is-public=True --location http://$IMAGE_HOST/Fedora-Live-Desktop-x86_64-19-1.iso The above command will succeed and the download of the newly created image will do as well but it won't return any data.
(In reply to Flavio Percoco from comment #6) > The real bug is that glance-api returns an empty iterator when the size of > the image is 0. This is an issue when the image is created with `--location` > and the size of it is not provided. For example: > > $ glance image-create --name Fedora17-image --disk-format=iso > --container-format=bare --size 5 --is-public=True --location > http://$IMAGE_HOST/Fedora-Live-Desktop-x86_64-19-1.iso > I meant: $ glance image-create --name Fedora17-image --disk-format=iso --container-format=bare --is-public=True --location http://$IMAGE_HOST/Fedora-Live-Desktop-x86_64-19-1.iso Without the size!