Even this is annoyance for the user, I must agree with Kairat. I don't
think this warrants for API change to v1.

** Changed in: glance
       Status: New => Won't Fix

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1498233

Title:
  No error thrown while importing an image which does not have read
  permission

Status in Glance:
  Won't Fix

Bug description:
  Started devstack from master branch on git.

  I tried to create an image on horizon by  choosing "Image location" option 
for Image source and passed an URL to ova file.
  "Copy data" option was selected. There were no errors thrown after submitting 
the request.
  Also, after refreshing the page, I could not find the new image as well.

  Found the following exception on g-api.log. It turned out to be wrong
  file permission for the ova being imported. It did not have read
  permission (set to 600).

  2015-09-21 17:23:34.191 18326 DEBUG glance.common.client 
[req-6edbf424-2bc9-472c-8cef-e9d12762a55e 86ba66edc4b24e639c37e4ce992d9384 
3d5d5d98dde249f08298210cb2e45866 - - -] Constructed URL: 
http://10.161.71.96:9191/images/detail?sort_key=created_at&is_public=None&limit=21&sort_dir=desc
 _construct_url /opt/stack/glance/glance/common/client.py:402
  2015-09-21 17:23:34.216 18327 DEBUG glance.registry.client.v1.client [-] 
Registry request PUT /images/d13562fb-ffd7-40e9-9910-bb99fe751332 HTTP 200 
request id req-dfa0c604-8cd9-4f3f-9837-4c03192bdb9a do_request 
/opt/stack/glance/glance/registry/client/v1/client.py:128
  2015-09-21 17:23:34.219 18326 DEBUG glance.registry.client.v1.client 
[req-6edbf424-2bc9-472c-8cef-e9d12762a55e 86ba66edc4b24e639c37e4ce992d9384 
3d5d5d98dde249f08298210cb2e45866 - - -] Registry request GET /images/detail 
HTTP 200 request id req-6edbf424-2bc9-472c-8cef-e9d12762a55e do_request 
/opt/stack/glance/glance/registry/client/v1/client.py:128
  2015-09-21 17:23:34.221 18326 INFO eventlet.wsgi.server 
[req-6edbf424-2bc9-472c-8cef-e9d12762a55e 86ba66edc4b24e639c37e4ce992d9384 
3d5d5d98dde249f08298210cb2e45866 - - -] 10.161.71.96 - - [21/Sep/2015 17:23:34] 
"GET 
/v1/images/detail?sort_key=created_at&sort_dir=desc&limit=21&is_public=None 
HTTP/1.1" 200 805 0.035794
  2015-09-21 17:23:34.217 18327 ERROR glance.api.v1.images [-] Copy from 
external source 'vsphere' failed for image: d13562fb-ffd7-40e9-9910-bb99fe751332
  2015-09-21 17:23:34.217 18327 ERROR glance.api.v1.images Traceback (most 
recent call last):
  2015-09-21 17:23:34.217 18327 ERROR glance.api.v1.images   File 
"/opt/stack/glance/glance/api/v1/images.py", line 619, in _upload
  2015-09-21 17:23:34.217 18327 ERROR glance.api.v1.images     dest=store)
  2015-09-21 17:23:34.217 18327 ERROR glance.api.v1.images   File 
"/opt/stack/glance/glance/api/v1/images.py", line 471, in _get_from_store
  2015-09-21 17:23:34.217 18327 ERROR glance.api.v1.images     image_data, 
image_size = src_store.get(loc, context=context)
  2015-09-21 17:23:34.217 18327 ERROR glance.api.v1.images   File 
"/usr/local/lib/python2.7/dist-packages/glance_store/capabilities.py", line 
226, in op_checker
  2015-09-21 17:23:34.217 18327 ERROR glance.api.v1.images     return 
store_op_fun(store, *args, **kwargs)
  2015-09-21 17:23:34.217 18327 ERROR glance.api.v1.images   File 
"/usr/local/lib/python2.7/dist-packages/glance_store/_drivers/http.py", line 
130, in get
  2015-09-21 17:23:34.217 18327 ERROR glance.api.v1.images     conn, resp, 
content_length = self._query(location, 'GET')
  2015-09-21 17:23:34.217 18327 ERROR glance.api.v1.images   File 
"/usr/local/lib/python2.7/dist-packages/glance_store/_drivers/http.py", line 
196, in _query
  2015-09-21 17:23:34.217 18327 ERROR glance.api.v1.images     raise 
exceptions.BadStoreUri(message=reason)
  2015-09-21 17:23:34.217 18327 ERROR glance.api.v1.images BadStoreUri: HTTP 
URL /gjayavelu/ovf/dsl-4-4-10.ova returned a 403 status code.
  2015-09-21 17:23:34.217 18327 ERROR glance.api.v1.images
  2015-09-21 17:23:34.230 18327 INFO glance.api.v1.images [-] Uploaded data of 
image d13562fb-ffd7-40e9-9910-bb99fe751332 from request payload successfully.

  It would be good to catch this exception and throw error.

  Attached g-api.log

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1498233/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to