Subscription patching to duplicate in mongodb should return 409 response
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zaqar |
Fix Released
|
High
|
Eva Balycheva |
Bug Description
What happens:
Now when I try to patch subscription to make it duplicate of other subscription, Zaqar returns 400 response code with body like this:
{
"title": "Unable to update subscription",
"description": "Subscription 56c5fe4292d7024
}
As you can see it's not very informative for the user. And also there is definitely conflict
And Zaqar server is showing log messages of ERROR level during this event, which is wrong: http://
Possible solution:
On such event make Zaqar return response code 409 with body:
{
"title": "Unable to update subscription",
"description": "Such subscription already exists"
}
And make zaqar just log this event on DEBUG level.
Changed in python-zaqarclient: | |
assignee: | nobody → Eva Balycheva (ubershy) |
affects: | python-zaqarclient → zaqar |
summary: |
- Subscription patching to duplicate should return 409 response + Subscription patching to duplicate in mongo should return 409 response |
summary: |
- Subscription patching to duplicate in mongo should return 409 response + Subscription patching to duplicate in mongodb should return 409 response |
Changed in zaqar: | |
milestone: | none → mitaka-rc1 |
status: | New → Confirmed |
importance: | Undecided → High |
tags: | added: release-critical |
Reviewed: https:/ /review. openstack. org/279946 /git.openstack. org/cgit/ openstack/ zaqar/commit/ ?id=f94a9ee4cee 28e79fbb4af1da6 6ab876f2c3079f
Committed: https:/
Submitter: Jenkins
Branch: master
commit f94a9ee4cee28e7 9fbb4af1da66ab8 76f2c3079f
Author: wangxiyuan <email address hidden>
Date: Sun Feb 14 17:30:35 2016 +0800
Forbid update subscription to duplicate
Now if users update a subscription in a queue, it doesn't check the
legality of the new subscriber. We should forbid update subscription to
duplicate and return 409 response in such case.
This patch modifies Redis and MongoDB storage controllers and API v2.
It also adds unit tests for them.
The functional test will be updated in zaqar client.
APIimpact 8c503642417690b f5bfbd99678
Closes-Bug: #1545548
Closes-Bug: #1547131
Co-Authored-By: wangxiyuan <email address hidden>
Co-Authored-By: Eva Balycheva <email address hidden>
Change-Id: I28fe7a11486048