Internal Server Error returned, if delete image tag

Bug #1534052 reported by hgangwx
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
In Progress
Medium
Unassigned

Bug Description

[Summary]
Internal Server Error returned, if delete image tag

[Topo]
devstack all-in-one node

[Description and expect result]
no Internal Server Error returned, if delete image tag

[Reproduceable or not]
reproduceable

[Recreate Steps]
1) create an image, with tag "ABC" and "abc":
root@45-59:/opt/stack/devstack# glance image-show c0805a88-1222-4ca5-a880-3c6aaeecd8e2
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | None |
| container_format | None |
| created_at | 2016-01-14T12:23:06Z |
| disk_format | None |
| id | c0805a88-1222-4ca5-a880-3c6aaeecd8e2 |
| min_disk | 0 |
| min_ram | 0 |
| name | None |
| owner | ebbcdabd911340efa9a3430488c43304 |
| protected | False |
| size | None |
| status | queued |
| tags | ["ABC", "abc"] |
| updated_at | 2016-01-14T12:24:15Z |
| virtual_size | None |
| visibility | private |
+------------------+--------------------------------------+

2)Internal Server Error returned, if delete one of the tag:
root@45-59:/opt/stack/devstack# glance image-tag-delete c0805a88-1222-4ca5-a880-3c6aaeecd8e2 ABC
500 Internal Server Error: The server has either erred or is incapable of performing the requested operation. (HTTP 500)
root@45-59:/opt/stack/devstack#

Note: if there are 2 tags, which are same string if ignore case, the issue exist

[Configration]
reproduceable bug, no need

[logs]
reproduceable bug, no need

[Root cause anlyze or debug inf]
reproduceable bug

[Attachment]
None

linwei,wu (wlwwu)
Changed in python-glanceclient:
assignee: nobody → linwei,wu (wlwwu)
Changed in python-glanceclient:
status: New → Confirmed
Revision history for this message
wangxiyuan (wangxiyuan) wrote :

Niall confirmed the bug, but I can't reproduce.

http://paste.openstack.org/show/483868/

Did I miss something? :(

Revision history for this message
hgangwx (hgangwx) wrote :

Hi wangxiyuan,
Seems nothing missing.
check openstack version or glance version?

Revision history for this message
Kairat Kushaev (kkushaev) wrote :

Confirm that reproducible on master.

Changed in python-glanceclient:
importance: Undecided → Medium
Revision history for this message
Kairat Kushaev (kkushaev) wrote :
Download full text (4.4 KiB)

Here is stacktrace:
2016-01-15 14:10:40.533 ERROR glance.common.wsgi [req-f3df3782-3990-4a9b-aa9b-5e095b396f1f e994214113a74668be2c1290fafa3422 06a11b992e264ba5bf67816edb283e61] Caught error: <class 'glance.common.exception.RPCError'> exception was raised in the last rpc call: Multiple rows were found for one()
2016-01-15 14:10:40.533 TRACE glance.common.wsgi Traceback (most recent call last):
2016-01-15 14:10:40.533 TRACE glance.common.wsgi File "/opt/stack/glance/glance/common/wsgi.py", line 885, in __call__
2016-01-15 14:10:40.533 TRACE glance.common.wsgi request, **action_args)
2016-01-15 14:10:40.533 TRACE glance.common.wsgi File "/opt/stack/glance/glance/common/wsgi.py", line 919, in dispatch
2016-01-15 14:10:40.533 TRACE glance.common.wsgi return method(*args, **kwargs)
2016-01-15 14:10:40.533 TRACE glance.common.wsgi File "/opt/stack/glance/glance/common/utils.py", line 423, in wrapped
2016-01-15 14:10:40.533 TRACE glance.common.wsgi return func(self, req, *args, **kwargs)
2016-01-15 14:10:40.533 TRACE glance.common.wsgi File "/opt/stack/glance/glance/api/v2/image_tags.py", line 78, in delete
2016-01-15 14:10:40.533 TRACE glance.common.wsgi image_repo.save(image)
2016-01-15 14:10:40.533 TRACE glance.common.wsgi File "/opt/stack/glance/glance/domain/proxy.py", line 99, in save
2016-01-15 14:10:40.533 TRACE glance.common.wsgi result = self.base.save(base_item, from_state=from_state)
2016-01-15 14:10:40.533 TRACE glance.common.wsgi File "/opt/stack/glance/glance/notifier.py", line 458, in save
2016-01-15 14:10:40.533 TRACE glance.common.wsgi super(ImageRepoProxy, self).save(image, from_state=from_state)
2016-01-15 14:10:40.533 TRACE glance.common.wsgi File "/opt/stack/glance/glance/domain/proxy.py", line 99, in save
2016-01-15 14:10:40.533 TRACE glance.common.wsgi result = self.base.save(base_item, from_state=from_state)
2016-01-15 14:10:40.533 TRACE glance.common.wsgi File "/opt/stack/glance/glance/api/policy.py", line 125, in save
2016-01-15 14:10:40.533 TRACE glance.common.wsgi return super(ImageRepoProxy, self).save(image, from_state=from_state)
2016-01-15 14:10:40.533 TRACE glance.common.wsgi File "/opt/stack/glance/glance/domain/proxy.py", line 99, in save
2016-01-15 14:10:40.533 TRACE glance.common.wsgi result = self.base.save(base_item, from_state=from_state)
2016-01-15 14:10:40.533 TRACE glance.common.wsgi File "/opt/stack/glance/glance/quota/__init__.py", line 112, in save
2016-01-15 14:10:40.533 TRACE glance.common.wsgi return super(ImageRepoProxy, self).save(image, from_state=from_state)
2016-01-15 14:10:40.533 TRACE glance.common.wsgi File "/opt/stack/glance/glance/domain/proxy.py", line 99, in save
2016-01-15 14:10:40.533 TRACE glance.common.wsgi result = self.base.save(base_item, from_state=from_state)
2016-01-15 14:10:40.533 TRACE glance.common.wsgi File "/opt/stack/glance/glance/location.py", line 65, in save
2016-01-15 14:10:40.533 TRACE glance.common.wsgi result = super(ImageRepoProxy, self).save(image, from_state=from_state)
2016-01-15 14:10:40.533 TRACE glance.common.wsgi File "/opt/stack/glance/glance/domain/proxy.py", line 99, in save
2016-01...

Read more...

Revision history for this message
wangxiyuan (wangxiyuan) wrote :

Reproduced with mysql. But it's ok with postgresql.

That's the reason why I can't reproduce before. :)

Revision history for this message
wangxiyuan (wangxiyuan) wrote :
Download full text (4.3 KiB)

and glance-api rasie an error:

2016-01-18 09:19:43.529 ERROR glance.common.wsgi [req-42da22da-fc07-4fff-a6b3-e7df2a587e5d 3679e374793d474b9a4938a269896f4b 51d3c5e987d64e1881e176ab607f4445] Caught error: Multiple rows were found for one()
2016-01-18 09:19:43.529 TRACE glance.common.wsgi Traceback (most recent call last):
2016-01-18 09:19:43.529 TRACE glance.common.wsgi File "/opt/stack/glance/glance/common/wsgi.py", line 882, in __call__
2016-01-18 09:19:43.529 TRACE glance.common.wsgi request, **action_args)
2016-01-18 09:19:43.529 TRACE glance.common.wsgi File "/opt/stack/glance/glance/common/wsgi.py", line 911, in dispatch
2016-01-18 09:19:43.529 TRACE glance.common.wsgi return method(*args, **kwargs)
2016-01-18 09:19:43.529 TRACE glance.common.wsgi File "/opt/stack/glance/glance/common/utils.py", line 423, in wrapped
2016-01-18 09:19:43.529 TRACE glance.common.wsgi return func(self, req, *args, **kwargs)
2016-01-18 09:19:43.529 TRACE glance.common.wsgi File "/opt/stack/glance/glance/api/v2/image_tags.py", line 78, in delete
2016-01-18 09:19:43.529 TRACE glance.common.wsgi image_repo.save(image)
2016-01-18 09:19:43.529 TRACE glance.common.wsgi File "/opt/stack/glance/glance/domain/proxy.py", line 99, in save
2016-01-18 09:19:43.529 TRACE glance.common.wsgi result = self.base.save(base_item, from_state=from_state)
2016-01-18 09:19:43.529 TRACE glance.common.wsgi File "/opt/stack/glance/glance/notifier.py", line 458, in save
2016-01-18 09:19:43.529 TRACE glance.common.wsgi super(ImageRepoProxy, self).save(image, from_state=from_state)
2016-01-18 09:19:43.529 TRACE glance.common.wsgi File "/opt/stack/glance/glance/domain/proxy.py", line 99, in save
2016-01-18 09:19:43.529 TRACE glance.common.wsgi result = self.base.save(base_item, from_state=from_state)
2016-01-18 09:19:43.529 TRACE glance.common.wsgi File "/opt/stack/glance/glance/api/policy.py", line 125, in save
2016-01-18 09:19:43.529 TRACE glance.common.wsgi return super(ImageRepoProxy, self).save(image, from_state=from_state)
2016-01-18 09:19:43.529 TRACE glance.common.wsgi File "/opt/stack/glance/glance/domain/proxy.py", line 99, in save
2016-01-18 09:19:43.529 TRACE glance.common.wsgi result = self.base.save(base_item, from_state=from_state)
2016-01-18 09:19:43.529 TRACE glance.common.wsgi File "/opt/stack/glance/glance/quota/__init__.py", line 112, in save
2016-01-18 09:19:43.529 TRACE glance.common.wsgi return super(ImageRepoProxy, self).save(image, from_state=from_state)
2016-01-18 09:19:43.529 TRACE glance.common.wsgi File "/opt/stack/glance/glance/domain/proxy.py", line 99, in save
2016-01-18 09:19:43.529 TRACE glance.common.wsgi result = self.base.save(base_item, from_state=from_state)
2016-01-18 09:19:43.529 TRACE glance.common.wsgi File "/opt/stack/glance/glance/location.py", line 65, in save
2016-01-18 09:19:43.529 TRACE glance.common.wsgi result = super(ImageRepoProxy, self).save(image, from_state=from_state)
2016-01-18 09:19:43.529 TRACE glance.common.wsgi File "/opt/stack/glance/glance/domain/proxy.py", line 99, in save
2016-01-18 09:19:43.529 TRACE glance.common.wsgi result = self.base.save(base...

Read more...

linwei,wu (wlwwu)
Changed in python-glanceclient:
assignee: linwei,wu (wlwwu) → nobody
zhangjialong (zhangjl)
Changed in python-glanceclient:
assignee: nobody → zhangjialong (zhangjl)
affects: python-glanceclient → glance
Changed in glance:
assignee: zhangjialong (zhangjl) → nobody
assignee: nobody → zhangjialong (zhangjl)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/289158

Changed in glance:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on glance (master)

Change abandoned by zhangjl (<email address hidden>) on branch: master
Review: https://review.openstack.org/289158
Reason: Maybe, it`s better to fix it in Newton

Revision history for this message
Anseela M M (anseela-m00) wrote :
Download full text (4.1 KiB)

I have created test cases for verifying the bug. please execute these test cases once the fix is done.

Test case id: OPNST_ glance Bug:1534052_Internal Server Error returned, if delete image tag_1
Metric: 30 minutes
Test purpose: Verify that: Suppose an image is having 2 tags with same string , but different cases ( upper case and lower case “ABC” and “abc”), user should be able to delete just one of them( e.g. “ABC”);while keeping the other one( “abc”)
Configuration: An OpenStack environment with at least one controller (with keystone, glance), one compute node and one network node installed.
Test tool: tempest
References:
Applicability: if there are 2 tags, which are same string if ignore case, the issue exist
Pre-test conditions: OpenStack should be installed and all the services up and running
Step Description:
1. create an image, with 2 tag( same string but different case – e.g. lower case and upper case ) "ABC" and "abc"
2. list the images glance image-show
3. delete tag with upper case “ABC” tag: glance image-tag-delete
4. list the image
Result:
1. User should be able to create the image with tag ABC and abc
2. User should able to list the image
3. User should be delete “ABC” tag without any error
4. User should be able to list the image with only “abc” tag (Lower case). The deleted tag ( Upper case ABC) should not be listed
Test verdict: TC pass only if user can delete the image tag without any error else TC failed
Test case id: OPNST_ glance Bug:1534052_Internal Server Error returned, if delete image tag_2
Metric: 30 minutes
Test purpose: Verify that: Suppose an image is having 2 tags with same string , but different cases ( upper case and lower case “ABC” and “abc”), user should be able to delete just one of them( e.g. “abc”);while keeping the other one( “ABC”).
Configuration: An OpenStack environment with at least one controller (with keystone, glance), one compute node and one network node installed.
Test tool: tempest
References:
Applicability: if there are 2 tags, which are same string if ignore case, the issue exist
Pre-test conditions: OpenStack should be installed and Rally should be installed in the server
Step Description:
1. create an image, with 2 tag( same string but different case – e.g. lower case and upper case ) "ABC" and "abc"
2. list the images glance image-show
3. delete tag with lower case “abc”: glance image-tag-delete
4. list the image
Result:
1. User should be able to create the image with tag ABC and abc
2. User should able to list the image
3. User should be delete “abc” tag without any error
4. User should be able to list the image with only “ABC” tag (Upper case). The deleted tag ( Lower case ABC) should not be listed
Test verdict: TC pass only if user can delete the image tag without any error else TC failed
Test case id: OPNST_ glance Bug:1534052_ Internal Server Error returned, if delete image tag_3
Metric: 30 minutes
Test purpose: Verify that: Suppose an image is having 2 tags with one of the being substring of other and also differ in cases ( upper case and lower case “ABCD” and “abc”), user should be able to delete just one of them( e.g. “ABCD”);while keeping the other one( “abc”).
...

Read more...

zhangjialong (zhangjl)
Changed in glance:
assignee: zhangjialong (zhangjl) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by zhangjl (<email address hidden>) on branch: master
Review: https://review.openstack.org/289158

Revision history for this message
FANG CHIN SHEN (fcsiii) wrote :

But it's ok with postgresql,where is the postgresql version ?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.