[Yahoo-eng-team] [Bug 1701346] [NEW] Trust mechanism is broken

2017-06-29 Thread Mike Fedosin
Public bug reported:

Because of various changes in keystoneauth1 module current trust
mechanism glance.common.trust_auth cannot create a trust and fails with
a error:

[None req-b7ac5edd-2104-4cab-b85e-ddae7c205261 admin admin] Unable to
create trust: 'NoneType' object has no attribute 'endswith' Use the
existing user token.

** Affects: glance
 Importance: Undecided
 Status: New

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

Title:
  Trust mechanism is broken

Status in Glance:
  New

Bug description:
  Because of various changes in keystoneauth1 module current trust
  mechanism glance.common.trust_auth cannot create a trust and fails
  with a error:

  [None req-b7ac5edd-2104-4cab-b85e-ddae7c205261 admin admin] Unable to
  create trust: 'NoneType' object has no attribute 'endswith' Use the
  existing user token.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1701346/+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


[Yahoo-eng-team] [Bug 1493448] Re: All operations are perfomed with admin priveleges when 'use_user_token' is False

2016-09-21 Thread Mike Fedosin
"use_user_token" and related glance config options were deprecated in
Mitaka: https://review.openstack.org/#/c/237742/

Bug may be closed.

** Changed in: glance
   Status: Triaged => Fix Released

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

Title:
  All operations are perfomed with admin priveleges when
  'use_user_token' is False

Status in Glance:
  Fix Released
Status in OpenStack Security Advisory:
  Won't Fix
Status in OpenStack Security Notes:
  Fix Released

Bug description:
  In glance-api.conf we have a param called 'use_user_token' which is
  enabled by default. It was introduced to allow for reauthentication
  when tokens expire and prevents requests from silently failing.
  https://review.openstack.org/#/c/29967/

  Unfortunately disabling this parameter leads to security issues and
  allows a regular user to perform any operation with admin rights.

  Steps to reproduce on devstack:
  1. Change /etc/glance/glance-api.conf parameters and restart glance-api:
  # Pass the user's token through for API requests to the registry.
  # Default: True
  use_user_token = False

  # If 'use_user_token' is not in effect then admin credentials
  # can be specified. Requests to the registry on behalf of
  # the API will use these credentials.
  # Admin user name
  admin_user = glance
  # Admin password
  admin_password = nova
  # Admin tenant name
  admin_tenant_name = service
  # Keystone endpoint
  auth_url = http://127.0.0.1:5000/v2.0

  (for v2 api it's required to enable registry service, too: data_api =
  glance.db.registry.api)

  2. Create a private image with admin user:
  source openrc admin admin
  glance --os-image-api-version 1 image-create --name private --is-public False 
--disk-format qcow2 --container-format bare --file /etc/fstab
  +--+--+
  | Property | Value|
  +--+--+
  | checksum | e533283e6aac072533d1d091a7d2e413 |
  | container_format | bare |
  | created_at   | 2015-09-01T22:17:25.00   |
  | deleted  | False|
  | deleted_at   | None |
  | disk_format  | qcow2|
  | id   | e0d0bf2f-9f81-4500-ae50-7a1a0994e2f0 |
  | is_public| False|
  | min_disk | 0|
  | min_ram  | 0|
  | name | private  |
  | owner| e1cec705e33b4dfaaece11b623f3c680 |
  | protected| False|
  | size | 616  |
  | status   | active   |
  | updated_at   | 2015-09-01T22:17:27.00   |
  | virtual_size | None |
  +--+--+

  3. Check the image list with admin user:
  glance --os-image-api-version 1 image-list
  
+--+-+-+--+--++
  | ID   | Name| 
Disk Format | Container Format | Size | Status |
  
+--+-+-+--+--++
  | 4a1703e7-72d1-4fce-8b5c-5bb1ef2a5047 | cirros-0.3.4-x86_64-uec | 
ami | ami  | 25165824 | active |
  | c513f951-e1b0-4acd-8980-ae932f073039 | cirros-0.3.4-x86_64-uec-kernel  | 
aki | aki  | 4979632  | active |
  | de99e4b9-0491-4990-8b93-299377bf2c95 | cirros-0.3.4-x86_64-uec-ramdisk | 
ari | ari  | 3740163  | active |
  | e0d0bf2f-9f81-4500-ae50-7a1a0994e2f0 | private | 
qcow2   | bare | 616  | active |
  
+--+-+-+--+--++

  4. Enable demo user and get the image list:
  source openrc demo demo
  glance --os-image-api-version 1 image-list
  
+--+-+-+--+--++
  | ID   | Name| 
Disk Format | Container Format | Size | Status |
  
+--+-+-+--+--++
  | 4a1703e7-72d1-4fce-8b5c-5bb1ef2a5047 | cirros-0.3.4-x86_64-uec | 
ami | ami  | 25165824 | active |
  | 

[Yahoo-eng-team] [Bug 1623567] Re: It is possible to import package twice via plugin with enabled glance artifact repository

2016-09-14 Thread Mike Fedosin
** Changed in: fuel-plugin-murano
 Assignee: Kirill Zaitsev (kzaitsev) => Mike Fedosin (mfedosin)

** Project changed: fuel-plugin-murano => glance

** Changed in: glance
Milestone: 1.0.0 => None

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

Title:
  It is possible to import package twice via plugin with enabled glance
  artifact repository

Status in Glance:
  Confirmed

Bug description:
  Bug description:
  Currently it is possible to import any app several times via murano cli if 
you are using fuel murano plugin with enabled glance artifact repository.

  Steps to reproduce:
  1) deploy fuel 9.0
  2) install fuel murano plugin
  3) add 1 controller and 1 compute
  4) enable fuel murano plugin and enable glance artifact repository
  5) deploy environment
  6) ssh to the controller
  7) use "murano --murano-repo-url=http://storage.apps.openstack.org 
package-import com.example.databases.MySql" to import MySql. Use this command 
second time to import in again.

  Expected results:
  the second time command should tell that MySql is already exist. So it will 
be only one MySql package

  Actual results:
  MySql will be imported twice(see screenshot)

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1623567/+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


[Yahoo-eng-team] [Bug 1592808] [NEW] Snapshot failed during inconsistencies in glance v2 image schema

2016-06-15 Thread Mike Fedosin
Public bug reported:

When trying to create a snapshot with Glance v2 with nodepool the bug
appears: http://paste.openstack.org/show/516238/

It happens because in glance v1 it was possible to set empty string to
kernel_id or ramdisk_id. In v2 it's forbidden.

** Affects: nova
 Importance: Undecided
 Assignee: Mike Fedosin (mfedosin)
 Status: Confirmed

** Changed in: nova
   Status: New => Confirmed

** Changed in: nova
 Assignee: (unassigned) => Mike Fedosin (mfedosin)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1592808

Title:
  Snapshot failed during inconsistencies in glance v2 image schema

Status in OpenStack Compute (nova):
  Confirmed

Bug description:
  When trying to create a snapshot with Glance v2 with nodepool the bug
  appears: http://paste.openstack.org/show/516238/

  It happens because in glance v1 it was possible to set empty string to
  kernel_id or ramdisk_id. In v2 it's forbidden.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1592808/+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


[Yahoo-eng-team] [Bug 1587985] [NEW] Glance v2 allows to set locations if image has saving status

2016-06-01 Thread Mike Fedosin
Public bug reported:

Currently, if 'show_multiple_locations' is activated, user can set
custom location to an image, even if it has 'saving' or 'deactivated'
status.

Example: http://paste.openstack.org/show/506998/

In v1 this request returns 400, but imho 409 is more appropriate
response code.

** Affects: glance
 Importance: Undecided
 Status: New

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

Title:
  Glance v2 allows to set locations if image has saving status

Status in Glance:
  New

Bug description:
  Currently, if 'show_multiple_locations' is activated, user can set
  custom location to an image, even if it has 'saving' or 'deactivated'
  status.

  Example: http://paste.openstack.org/show/506998/

  In v1 this request returns 400, but imho 409 is more appropriate
  response code.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1587985/+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


[Yahoo-eng-team] [Bug 1557495] [NEW] Possible race conditions when changing image status in v2

2016-03-15 Thread Mike Fedosin
Public bug reported:

Currently Glance architecture (domain model) is affected by possible
race conditions during image status transition. To eliminate this there
was introduced a parameter called 'from_state' in 'save' method for
ImageRepo. Unfortunately it only checks if transition happened from
'saving' to 'active':
https://github.com/openstack/glance/blob/master/glance/api/v2/image_data.py#L117

Other cases are still not fixed and it leads to the fact that admin can
reactivate deleted image and it will have status 'active'. Also Glance
rewrites the status even if it didn't change. To fix it it's suggested
to use 'from_state' parameters in other places, where race conditions
may happen.

** Affects: glance
 Importance: Undecided
 Status: New

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

Title:
  Possible race conditions when changing image status in v2

Status in Glance:
  New

Bug description:
  Currently Glance architecture (domain model) is affected by possible
  race conditions during image status transition. To eliminate this
  there was introduced a parameter called 'from_state' in 'save' method
  for ImageRepo. Unfortunately it only checks if transition happened
  from 'saving' to 'active':
  
https://github.com/openstack/glance/blob/master/glance/api/v2/image_data.py#L117

  Other cases are still not fixed and it leads to the fact that admin
  can reactivate deleted image and it will have status 'active'. Also
  Glance rewrites the status even if it didn't change. To fix it it's
  suggested to use 'from_state' parameters in other places, where race
  conditions may happen.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1557495/+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


[Yahoo-eng-team] [Bug 1549869] [NEW] Glance should return 204 when user downloads queued image file

2016-02-25 Thread Mike Fedosin
Public bug reported:

Previously (In Liberty) when user tried to download file while image was
in 'queued' status Glance returned 204. In Mitaka this behavior was
changed  and now Glance returns 403. This is contrary to the Glance
image api v2 http://developer.openstack.org/api-ref-image-v2.html We
have to return it back.

Previously: http://paste.openstack.org/show/487782/

Now:  http://paste.openstack.org/show/488210/

** Affects: glance
 Importance: Undecided
 Status: New

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

Title:
  Glance should return 204 when user downloads queued image file

Status in Glance:
  New

Bug description:
  Previously (In Liberty) when user tried to download file while image
  was in 'queued' status Glance returned 204. In Mitaka this behavior
  was changed  and now Glance returns 403. This is contrary to the
  Glance image api v2 http://developer.openstack.org/api-ref-
  image-v2.html We have to return it back.

  Previously: http://paste.openstack.org/show/487782/

  Now:  http://paste.openstack.org/show/488210/

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1549869/+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


[Yahoo-eng-team] [Bug 1539698] [NEW] Kernel and ramdisk ids cannot have 'None' value in Glance

2016-01-29 Thread Mike Fedosin
Public bug reported:

Currently if user wants to create an instance using a Glance snapshot that has 
no value for ramdisk_id or kernel_id, then Nova copies the image metadata into 
instance system metadata and prefixes the keys with 'image_'. 
Due to [1] the None value of ramdisk_id and kernel_id get written as the string 
'None' in system metadata.

Unfortunately these values are not accepted by glance image schema in v2
api [2].  They can be None, but a not string 'None'.

This issue doesn't allow us to fully adopt glance v2 api in Nova.

Paste from  ~smatzek http://paste.openstack.org/show/485397/

[1] https://github.com/openstack/nova/blob/master/nova/utils.py#L1245
[2] https://github.com/openstack/glance/blob/master/etc/schema-image.json

** Affects: nova
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1539698

Title:
  Kernel and ramdisk ids cannot have 'None' value in Glance

Status in OpenStack Compute (nova):
  New

Bug description:
  Currently if user wants to create an instance using a Glance snapshot that 
has no value for ramdisk_id or kernel_id, then Nova copies the image metadata 
into instance system metadata and prefixes the keys with 'image_'. 
  Due to [1] the None value of ramdisk_id and kernel_id get written as the 
string 'None' in system metadata.

  Unfortunately these values are not accepted by glance image schema in
  v2 api [2].  They can be None, but a not string 'None'.

  This issue doesn't allow us to fully adopt glance v2 api in Nova.

  Paste from  ~smatzek http://paste.openstack.org/show/485397/

  [1] https://github.com/openstack/nova/blob/master/nova/utils.py#L1245
  [2] https://github.com/openstack/glance/blob/master/etc/schema-image.json

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1539698/+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


[Yahoo-eng-team] [Bug 1533150] [NEW] Downloading empty file with enabled cache management leads to 500 error

2016-01-12 Thread Mike Fedosin
Public bug reported:

When I tried to download an empty image file from glance with enabled
cache management I got 500 error:

mfedosin@wdev:~$ glance --debug image-download 
0af7b2e8-8e31-427b-a99f-9117f45418ef --file empty_file
curl -g -i -X GET -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 
'User-Agent: python-glanceclient' -H 'Connection: keep-alive' -H 'X-Auth-Token: 
{SHA1}c91066a8c438769ed454eebd759b4f8b1e488cb6' -H 'Content-Type: 
application/octet-stream' 
http://10.0.2.15:9292/v2/images/0af7b2e8-8e31-427b-a99f-9117f45418ef/file
Request returned failure status 500.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/glanceclient/shell.py", line 
605, in main
args.func(client, args)
  File "/usr/local/lib/python2.7/dist-packages/glanceclient/v2/shell.py", line 
277, in do_image_download
body = gc.images.data(args.id)
  File "/usr/local/lib/python2.7/dist-packages/glanceclient/v2/images.py", line 
194, in data
resp, body = self.http_client.get(url)
  File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", 
line 284, in get
return self._request('GET', url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", 
line 276, in _request
resp, body_iter = self._handle_response(resp)
  File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", 
line 93, in _handle_response
raise exc.from_response(resp, resp.content)
HTTPInternalServerError: HTTPInternalServerError (HTTP 500)
HTTPInternalServerError (HTTP 500)

Without cache management everything works fine.

Steps to reproduce on devstack:

1. Set flavor to 'keystone+cachemanagement' in glance-api.conf (flavor = 
keystone+cachemanagement)
2. Restart glance-api server
3. Create an image with empty file (file size is 0)
4. Try to download the image file from glance.

Expected result: new empty file will be created in local folder.

Actual result: HTTPInternalServerError (HTTP 500)

Logs from glance-api: http://paste.openstack.org/show/483545/

** Affects: glance
 Importance: Undecided
 Status: New

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

Title:
  Downloading empty file with enabled cache management leads to 500
  error

Status in Glance:
  New

Bug description:
  When I tried to download an empty image file from glance with enabled
  cache management I got 500 error:

  mfedosin@wdev:~$ glance --debug image-download 
0af7b2e8-8e31-427b-a99f-9117f45418ef --file empty_file
  curl -g -i -X GET -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 
'User-Agent: python-glanceclient' -H 'Connection: keep-alive' -H 'X-Auth-Token: 
{SHA1}c91066a8c438769ed454eebd759b4f8b1e488cb6' -H 'Content-Type: 
application/octet-stream' 
http://10.0.2.15:9292/v2/images/0af7b2e8-8e31-427b-a99f-9117f45418ef/file
  Request returned failure status 500.
  Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/glanceclient/shell.py", line 
605, in main
  args.func(client, args)
File "/usr/local/lib/python2.7/dist-packages/glanceclient/v2/shell.py", 
line 277, in do_image_download
  body = gc.images.data(args.id)
File "/usr/local/lib/python2.7/dist-packages/glanceclient/v2/images.py", 
line 194, in data
  resp, body = self.http_client.get(url)
File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", 
line 284, in get
  return self._request('GET', url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", 
line 276, in _request
  resp, body_iter = self._handle_response(resp)
File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", 
line 93, in _handle_response
  raise exc.from_response(resp, resp.content)
  HTTPInternalServerError: HTTPInternalServerError (HTTP 500)
  HTTPInternalServerError (HTTP 500)

  Without cache management everything works fine.

  Steps to reproduce on devstack:

  1. Set flavor to 'keystone+cachemanagement' in glance-api.conf (flavor = 
keystone+cachemanagement)
  2. Restart glance-api server
  3. Create an image with empty file (file size is 0)
  4. Try to download the image file from glance.

  Expected result: new empty file will be created in local folder.

  Actual result: HTTPInternalServerError (HTTP 500)

  Logs from glance-api: http://paste.openstack.org/show/483545/

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1533150/+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


[Yahoo-eng-team] [Bug 1533270] [NEW] Adding remote image in v2 when cache is enabled results 500 error

2016-01-12 Thread Mike Fedosin
Public bug reported:

To reproduce the issue:

1) Add an image without specifying the size
2) Enable caching
3) Get image data. This will succeed because the Content-Length is pulled from 
the remote store (i.e. swift). At this point, the image will be properly cached.
4) Get image data again with v2 api. This will fail with 500 error 
http://paste.openstack.org/show/483545/

It happens for the reason cache middleware couldn't assign value to
image_meta['size'] because it expects a dictionary (as it was in v1
api), but in v2 api it's ImageTarget object.

** Affects: glance
 Importance: Undecided
 Assignee: Darja Shakhray (dshakhray)
 Status: New

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

Title:
  Adding remote image in v2 when cache is enabled results 500 error

Status in Glance:
  New

Bug description:
  To reproduce the issue:

  1) Add an image without specifying the size
  2) Enable caching
  3) Get image data. This will succeed because the Content-Length is pulled 
from the remote store (i.e. swift). At this point, the image will be properly 
cached.
  4) Get image data again with v2 api. This will fail with 500 error 
http://paste.openstack.org/show/483545/

  It happens for the reason cache middleware couldn't assign value to
  image_meta['size'] because it expects a dictionary (as it was in v1
  api), but in v2 api it's ImageTarget object.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1533270/+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


[Yahoo-eng-team] [Bug 1526804] [NEW] Model sync is broken for SQLite because of BigInteger type mismatch

2015-12-16 Thread Mike Fedosin
Public bug reported:

Here the output for
glance.tests.unit.test_migrations.ModelsMigrationsSyncSQLite.test_models_sync:

AssertionError: Models and migration scripts aren't in sync:
[ [ ( 'modify_type',
  None,
  'artifact_blobs',
  'size',
  { 'existing_nullable': False,
'existing_server_default': False},
  INTEGER(),
  BigInteger())],
  [ ( 'modify_type',
  None,
  'artifacts',
  'type_version_prefix',
  { 'existing_nullable': False,
'existing_server_default': False},
  INTEGER(),
  BigInteger())],
  [ ( 'modify_type',
  None,
  'artifacts',
  'version_prefix',
  { 'existing_nullable': False,
'existing_server_default': False},
  INTEGER(),
  BigInteger())],
  [ ( 'modify_type',
  None,
  'images',
  'size',
  { 'existing_nullable': True,
'existing_server_default': False},
  INTEGER(),
  BigInteger())],
  [ ( 'modify_type',
  None,
  'images',
  'virtual_size',
  { 'existing_nullable': True,
'existing_server_default': False},
  INTEGER(),
  BigInteger())]]

** Affects: glance
 Importance: Critical
 Assignee: Mike Fedosin (mfedosin)
 Status: In Progress

** Changed in: glance
 Assignee: (unassigned) => Mike Fedosin (mfedosin)

** Changed in: glance
   Importance: Undecided => Critical

** Changed in: glance
   Status: New => Confirmed

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

Title:
  Model sync is broken for SQLite because of BigInteger type mismatch

Status in Glance:
  In Progress

Bug description:
  Here the output for
  glance.tests.unit.test_migrations.ModelsMigrationsSyncSQLite.test_models_sync:

  AssertionError: Models and migration scripts aren't in sync:
  [ [ ( 'modify_type',
None,
'artifact_blobs',
'size',
{ 'existing_nullable': False,
  'existing_server_default': False},
INTEGER(),
BigInteger())],
[ ( 'modify_type',
None,
'artifacts',
'type_version_prefix',
{ 'existing_nullable': False,
  'existing_server_default': False},
INTEGER(),
BigInteger())],
[ ( 'modify_type',
None,
'artifacts',
'version_prefix',
{ 'existing_nullable': False,
  'existing_server_default': False},
INTEGER(),
BigInteger())],
[ ( 'modify_type',
None,
'images',
'size',
{ 'existing_nullable': True,
  'existing_server_default': False},
INTEGER(),
BigInteger())],
[ ( 'modify_type',
None,
'images',
'virtual_size',
{ 'existing_nullable': True,
  'existing_server_default': False},
INTEGER(),
BigInteger())]]

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1526804/+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


[Yahoo-eng-team] [Bug 1489126] Re: Filtering by tags is broken in v3

2015-11-05 Thread Mike Fedosin
** Changed in: glance
   Status: In Progress => Opinion

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

Title:
  Filtering by tags is broken in v3

Status in Glance:
  Opinion

Bug description:
  When I want to filter list of artifacts by tag I get a 500 error:

  http://localhost:9292/v3/artifacts/myartifact/v2.0/drafts?tag=hyhyhy

  
   
500 Internal Server Error
   
   
500 Internal Server Error
The server has either erred or is incapable of performing the requested 
operation.


   
  

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1489126/+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


[Yahoo-eng-team] [Bug 1505710] [NEW] Wrong logging setup in replicator

2015-10-13 Thread Mike Fedosin
Public bug reported:

The logging.setup accepts two parameters, the first one being the current CONF, 
the second parameter is the product name.
Currently in replicator it's not true.

** Affects: glance
 Importance: Undecided
 Status: New

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

Title:
  Wrong logging setup in replicator

Status in Glance:
  New

Bug description:
  The logging.setup accepts two parameters, the first one being the current 
CONF, the second parameter is the product name.
  Currently in replicator it's not true.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1505710/+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


[Yahoo-eng-team] [Bug 1505218] [NEW] Image schema doesn't contain 'deactivated' status

2015-10-12 Thread Mike Fedosin
Public bug reported:

Currently glance image schema doesn't contain 'deactivated' in the list
of statuses, which leads to the fact that client cannot validate it .

1. mfedosin@wdev:~$ glance image-list
+--+-+
| ID   | Name|
+--+-+
| 5cd380ce-a570-4270-b4d1-e328e6f49cb6 | cirros-0.3.4-x86_64-uec |
| 9f430c9d-9649-4bc3-9ec9-1013e9c9da13 | cirros-0.3.4-x86_64-uec-kernel  |
| e36a70f7-db13-4c3a-91a6-1308b74eebde | cirros-0.3.4-x86_64-uec-ramdisk |
+--+-+

2. mfedosin@wdev:~$ curl -H "X-Auth-Token:
2c2e3bc5f0d541418a98deeabb27ac5e" -X POST
http://127.0.0.1:9292/v2/images/5cd380ce-a570-4270-b4d1-e328e6f49cb6/actions/deactivate

3. mfedosin@wdev:~$ glance image-show
5cd380ce-a570-4270-b4d1-e328e6f49cb6

Expected result:
There will be output with the image info

Actual result:
u'deactivated' is not one of [u'queued', u'saving', u'active', u'killed', 
u'deleted', u'pending_delete']

Failed validating u'enum' in schema[u'properties'][u'status']:
{u'description': u'Status of the image (READ-ONLY)',
 u'enum': [u'queued',
   u'saving',
   u'active',
   u'killed',
   u'deleted',
   u'pending_delete'],
 u'type': u'string'}

On instance[u'status']:
u'deactivated'

Related to bug: https://bugs.launchpad.net/glance/+bug/1505134

** Affects: glance
 Importance: Undecided
 Assignee: Mike Fedosin (mfedosin)
 Status: New

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

Title:
  Image schema doesn't contain 'deactivated' status

Status in Glance:
  New

Bug description:
  Currently glance image schema doesn't contain 'deactivated' in the
  list of statuses, which leads to the fact that client cannot validate
  it .

  1. mfedosin@wdev:~$ glance image-list
  +--+-+
  | ID   | Name|
  +--+-+
  | 5cd380ce-a570-4270-b4d1-e328e6f49cb6 | cirros-0.3.4-x86_64-uec |
  | 9f430c9d-9649-4bc3-9ec9-1013e9c9da13 | cirros-0.3.4-x86_64-uec-kernel  |
  | e36a70f7-db13-4c3a-91a6-1308b74eebde | cirros-0.3.4-x86_64-uec-ramdisk |
  +--+-+

  2. mfedosin@wdev:~$ curl -H "X-Auth-Token:
  2c2e3bc5f0d541418a98deeabb27ac5e" -X POST
  
http://127.0.0.1:9292/v2/images/5cd380ce-a570-4270-b4d1-e328e6f49cb6/actions/deactivate

  3. mfedosin@wdev:~$ glance image-show
  5cd380ce-a570-4270-b4d1-e328e6f49cb6

  Expected result:
  There will be output with the image info

  Actual result:
  u'deactivated' is not one of [u'queued', u'saving', u'active', u'killed', 
u'deleted', u'pending_delete']

  Failed validating u'enum' in schema[u'properties'][u'status']:
  {u'description': u'Status of the image (READ-ONLY)',
   u'enum': [u'queued',
 u'saving',
 u'active',
 u'killed',
 u'deleted',
 u'pending_delete'],
   u'type': u'string'}

  On instance[u'status']:
  u'deactivated'

  Related to bug: https://bugs.launchpad.net/glance/+bug/1505134

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1505218/+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


[Yahoo-eng-team] [Bug 1503501] Re: oslo.db no longer requires testresources and testscenarios packages

2015-10-12 Thread Mike Fedosin
** Also affects: glance
   Importance: Undecided
   Status: New

** Changed in: glance
 Assignee: (unassigned) => Mike Fedosin (mfedosin)

** Changed in: glance
   Status: New => In Progress

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

Title:
  oslo.db no longer requires testresources and testscenarios packages

Status in Cinder:
  Fix Committed
Status in Glance:
  In Progress
Status in heat:
  Fix Committed
Status in Ironic:
  In Progress
Status in neutron:
  Fix Committed
Status in OpenStack Compute (nova):
  Fix Committed

Bug description:
  As of https://review.openstack.org/#/c/217347/ oslo.db no longer has
  testresources or testscenarios in its requirements, So next release of
  oslo.db will break several projects. These project that use fixtures
  from oslo.db should add these to their requirements if they need it.

  Example from Nova:
  ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./nova/tests} 
--list 
  ---Non-zero exit code (2) from test listing.
  error: testr failed (3) 
  import errors ---
  Failed to import test module: nova.tests.unit.db.test_db_api
  Traceback (most recent call last):
File 
"/home/travis/build/dims/nova/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py",
 line 456, in _find_test_path
  module = self._get_module_from_name(name)
File 
"/home/travis/build/dims/nova/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py",
 line 395, in _get_module_from_name
  __import__(name)
File "nova/tests/unit/db/test_db_api.py", line 31, in 
  from oslo_db.sqlalchemy import test_base
File 
"/home/travis/build/dims/nova/.tox/py27/src/oslo.db/oslo_db/sqlalchemy/test_base.py",
 line 17, in 
  import testresources
  ImportError: No module named testresources

  https://travis-ci.org/dims/nova/jobs/83992423

To manage notifications about this bug go to:
https://bugs.launchpad.net/cinder/+bug/1503501/+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


[Yahoo-eng-team] [Bug 1491049] [NEW] Filtering by invalid version string causes 500 error

2015-09-01 Thread Mike Fedosin
Public bug reported:

When I want to filter a list of artifacts by version if I provide
invalid semver string (for example, 'version=') then the server
returns 500 error.

request:
GET /v3/artifacts/some_type/2.0?version=

Stacktrace: http://paste.openstack.org/show/438140/

** Affects: glance
 Importance: Undecided
 Assignee: Mike Fedosin (mfedosin)
 Status: New


** Tags: artifacts

** Changed in: glance
 Assignee: (unassigned) => Mike Fedosin (mfedosin)

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

Title:
  Filtering by invalid version string causes 500 error

Status in Glance:
  New

Bug description:
  When I want to filter a list of artifacts by version if I provide
  invalid semver string (for example, 'version=') then the server
  returns 500 error.

  request:
  GET /v3/artifacts/some_type/2.0?version=

  Stacktrace: http://paste.openstack.org/show/438140/

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1491049/+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


[Yahoo-eng-team] [Bug 1489126] [NEW] Filtering by tags is broken in v3

2015-08-26 Thread Mike Fedosin
Public bug reported:

When I want to filter list of artifacts by tag I get a 500 error:

http://localhost:9292/v3/artifacts/myartifact/v2.0/drafts?tag=hyhyhy

html
 head
  title500 Internal Server Error/title
 /head
 body
  h1500 Internal Server Error/h1
  The server has either erred or is incapable of performing the requested 
operation.br /br /


 /body
/html

** Affects: glance
 Importance: Undecided
 Status: New


** Tags: artifacts

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

Title:
  Filtering by tags is broken in v3

Status in Glance:
  New

Bug description:
  When I want to filter list of artifacts by tag I get a 500 error:

  http://localhost:9292/v3/artifacts/myartifact/v2.0/drafts?tag=hyhyhy

  html
   head
title500 Internal Server Error/title
   /head
   body
h1500 Internal Server Error/h1
The server has either erred or is incapable of performing the requested 
operation.br /br /


   /body
  /html

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1489126/+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


[Yahoo-eng-team] [Bug 1487425] [NEW] Ranged filtering by version is not supported

2015-08-21 Thread Mike Fedosin
Public bug reported:

Currently filtering version by range is not supported, so requests like
?version=gt:5.0version=lt:8.0version=ne:6.0 don't work as expected -
only the last parameter is used in that cases.

** Affects: glance
 Importance: Undecided
 Status: New


** Tags: artifacts

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

Title:
  Ranged filtering by version is not supported

Status in Glance:
  New

Bug description:
  Currently filtering version by range is not supported, so requests
  like ?version=gt:5.0version=lt:8.0version=ne:6.0 don't work as
  expected - only the last parameter is used in that cases.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1487425/+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


[Yahoo-eng-team] [Bug 1473369] Re: new mock release broke a bunch of unit tests

2015-07-10 Thread Mike Fedosin
** Also affects: python-glance-store (Ubuntu)
   Importance: Undecided
   Status: New

** No longer affects: python-glance-store (Ubuntu)

** Also affects: glance-store
   Importance: Undecided
   Status: New

** Changed in: glance-store
 Assignee: (unassigned) = Mike Fedosin (mfedosin)

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

Title:
  new mock release broke a bunch of unit tests

Status in Glance:
  In Progress
Status in glance_store:
  New
Status in murano:
  Fix Committed
Status in murano kilo series:
  Fix Committed
Status in neutron:
  Fix Committed
Status in python-muranoclient:
  In Progress
Status in python-muranoclient kilo series:
  New
Status in OpenStack Object Storage (swift):
  In Progress

Bug description:
  http://lists.openstack.org/pipermail/openstack-
  dev/2015-July/069156.html

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1473369/+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


[Yahoo-eng-team] [Bug 1468698] Re: Image-update api returns 500 while passing --min-ram and --min-disk greater than 2^(31) max value

2015-06-29 Thread Mike Fedosin
** This bug is no longer a duplicate of bug 1460060
   Glance v1 and v2 api returns 500 while passing --min-ram and --min-disk 
greater than 2^(31) max value

** Changed in: glance
   Status: New = Confirmed

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

Title:
  Image-update api returns 500 while passing --min-ram and --min-disk
  greater than 2^(31) max value

Status in OpenStack Image Registry and Delivery Service (Glance):
  Confirmed

Bug description:
  $ glance image-update b3886698-04c3-4621-9a04-4a587d3288d1 --min-ram 
234578
  HTTPInternalServerError (HTTP 500)

  $ glance image-update b3886698-04c3-4621-9a04-4a587d3288d1 --min-disk 
234578
  HTTPInternalServerError (HTTP 500)

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1468698/+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


[Yahoo-eng-team] [Bug 1469817] [NEW] Glance doesn't handle exceptions from glance_store

2015-06-29 Thread Mike Fedosin
Public bug reported:

Server API expects to catch exception declared at
glance/common/exception.py, but actually risen exceptions have the same
names but are declared at different module, glance_store/exceptions.py
and thus are never caught.

For example, If exception is raised here:
https://github.com/openstack/glance_store/blob/stable/kilo/glance_store/_drivers/rbd.py#L316
, it will never be caught here
https://github.com/openstack/glance/blob/stable/kilo/glance/api/v1/images.py#L1107
, because first one is instance of
https://github.com/openstack/glance_store/blob/stable/kilo/glance_store/exceptions.py#L198
, but Glance waits for
https://github.com/openstack/glance/blob/stable/kilo/glance/common/exception.py#L293

There are many cases of that issue. The investigation continues.

** Affects: glance
 Importance: Undecided
 Status: New

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

Title:
  Glance doesn't handle exceptions from glance_store

Status in OpenStack Image Registry and Delivery Service (Glance):
  New

Bug description:
  Server API expects to catch exception declared at
  glance/common/exception.py, but actually risen exceptions have the
  same names but are declared at different module,
  glance_store/exceptions.py and thus are never caught.

  For example, If exception is raised here:
  
https://github.com/openstack/glance_store/blob/stable/kilo/glance_store/_drivers/rbd.py#L316
  , it will never be caught here
  
https://github.com/openstack/glance/blob/stable/kilo/glance/api/v1/images.py#L1107
  , because first one is instance of
  
https://github.com/openstack/glance_store/blob/stable/kilo/glance_store/exceptions.py#L198
  , but Glance waits for
  
https://github.com/openstack/glance/blob/stable/kilo/glance/common/exception.py#L293

  There are many cases of that issue. The investigation continues.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1469817/+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


[Yahoo-eng-team] [Bug 1463466] [NEW] Option use_user_token is created twice

2015-06-09 Thread Mike Fedosin
Public bug reported:

In glance we have two places where we register use_user_token option:
https://github.com/openstack/glance/blob/stable/kilo/glance/common/store_utils.py#L33
https://github.com/openstack/glance/blob/stable/kilo/glance/registry/client/__init__.py#L55

oslo.config considers them as one, because they have the same name and
help string, but changing help string in one of them leads to an
exception DuplicateOptError: duplicate option: use_user_token

It seems that we should remove the option creation in store_utils and
left only one declaration in registry client.

** Affects: glance
 Importance: Undecided
 Assignee: Mike Fedosin (mfedosin)
 Status: New

** Changed in: glance
 Assignee: (unassigned) = Mike Fedosin (mfedosin)

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

Title:
  Option use_user_token is created twice

Status in OpenStack Image Registry and Delivery Service (Glance):
  New

Bug description:
  In glance we have two places where we register use_user_token option:
  
https://github.com/openstack/glance/blob/stable/kilo/glance/common/store_utils.py#L33
  
https://github.com/openstack/glance/blob/stable/kilo/glance/registry/client/__init__.py#L55

  oslo.config considers them as one, because they have the same name and
  help string, but changing help string in one of them leads to an
  exception DuplicateOptError: duplicate option: use_user_token

  It seems that we should remove the option creation in store_utils and
  left only one declaration in registry client.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1463466/+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


[Yahoo-eng-team] [Bug 1268680] Re: Creating an image without container format queues image and fails with 400

2015-05-07 Thread Mike Fedosin
** Changed in: glance
 Assignee: (unassigned) = Mike Fedosin (mfedosin)

** Changed in: glance
   Status: Invalid = Confirmed

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

Title:
  Creating an image without container format queues image and fails with
  400

Status in OpenStack Image Registry and Delivery Service (Glance):
  Confirmed

Bug description:
  Description of problem:

  Creating an image from CLI without --container format queued the image
  and fails with 400.

  Request returned failure status.
  400 Bad Request
  Invalid container format 'None' for image.
  (HTTP 400)

  
  How reproducible:
  # glance --debug image-create --name cirros --disk-format qcow2 --file 
/tmp/cirros-image.qcow2 --progress
  snip
  [=] 100%

  HTTP/1.1 400 Bad Request
  date: Tue, 07 Jan 2014 14:13:54 GMT
  content-length: 64
  content-type: text/plain; charset=UTF-8
  x-openstack-request-id: req-11b4ecad-3a8d-4e44-9c37-a4d843805889

  400 Bad Request

  Invalid container format 'None' for image.


  # glance image-list
  
+---+---+-+++---+
  | ID  
  | Name| Disk Format | Container Format | Size  | Status|
  
+---+---+-+++---+
  | b2490dd2-b535-4b98-8647-cca428a63e01 | cirros | qcow2   |   
  | 307962880 | queued |
  
+---+---+-+++---+

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1268680/+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


[Yahoo-eng-team] [Bug 1371118] [NEW] Image file stays in store if image has been deleted during upload

2014-09-18 Thread Mike Fedosin
Public bug reported:

When I create a new task in v2 to upload an image, it creates the image
record in db, sets status to saving and then begins the uploading.

If the image is deleted by appropriate API call while its content is
still being uploaded, an exception is raised and it is not handled in
the API code. This leads to the fact that the uploaded image file stays
in a storage and clogs it.

File /opt/stack/glance/glance/common/scripts/image_import/main.py, line 62, 
in _execute 
uri)
File /opt/stack/glance/glance/common/scripts/image_import/main.py, line 95, 
in import_image
new_image = image_repo.get(image_id)
File /opt/stack/glance/glance/api/authorization.py, line 106, in get
image = self.image_repo.get(image_id)
File /opt/stack/glance/glance/domain/proxy.py, line 86, in get
return self.helper.proxy(self.base.get(item_id))
File /opt/stack/glance/glance/api/policy.py, line 179, in get
return super(ImageRepoProxy, self).get(image_id)
File /opt/stack/glance/glance/domain/proxy.py, line 86, in get
return self.helper.proxy(self.base.get(item_id))
File /opt/stack/glance/glance/domain/proxy.py, line 86, in get
return self.helper.proxy(self.base.get(item_id))
File /opt/stack/glance/glance/domain/proxy.py, line 86, in get 
return self.helper.proxy(self.base.get(item_id))
File /opt/stack/glance/glance/db/__init__.py, line 72, in get raise 
exception.NotFound(msg)
NotFound: No image found with ID e2285448-a56f-45b1-9e6e-216d2b304967

This bug is very similar to
https://bugs.launchpad.net/glance/+bug/1188532, but it relates to task
mechanism in v2.

** Affects: glance
 Importance: Undecided
 Assignee: Mike Fedosin (mfedosin)
 Status: New

** Changed in: glance
 Assignee: (unassigned) = Mike Fedosin (mfedosin)

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

Title:
  Image file stays in store if image has been deleted during upload

Status in OpenStack Image Registry and Delivery Service (Glance):
  New

Bug description:
  When I create a new task in v2 to upload an image, it creates the
  image record in db, sets status to saving and then begins the
  uploading.

  If the image is deleted by appropriate API call while its content is
  still being uploaded, an exception is raised and it is not handled in
  the API code. This leads to the fact that the uploaded image file
  stays in a storage and clogs it.

  File /opt/stack/glance/glance/common/scripts/image_import/main.py, line 62, 
in _execute 
  uri)
  File /opt/stack/glance/glance/common/scripts/image_import/main.py, line 95, 
in import_image
  new_image = image_repo.get(image_id)
  File /opt/stack/glance/glance/api/authorization.py, line 106, in get
  image = self.image_repo.get(image_id)
  File /opt/stack/glance/glance/domain/proxy.py, line 86, in get
  return self.helper.proxy(self.base.get(item_id))
  File /opt/stack/glance/glance/api/policy.py, line 179, in get
  return super(ImageRepoProxy, self).get(image_id)
  File /opt/stack/glance/glance/domain/proxy.py, line 86, in get
  return self.helper.proxy(self.base.get(item_id))
  File /opt/stack/glance/glance/domain/proxy.py, line 86, in get
  return self.helper.proxy(self.base.get(item_id))
  File /opt/stack/glance/glance/domain/proxy.py, line 86, in get 
  return self.helper.proxy(self.base.get(item_id))
  File /opt/stack/glance/glance/db/__init__.py, line 72, in get raise 
exception.NotFound(msg)
  NotFound: No image found with ID e2285448-a56f-45b1-9e6e-216d2b304967

  This bug is very similar to
  https://bugs.launchpad.net/glance/+bug/1188532, but it relates to task
  mechanism in v2.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1371118/+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