Fix error message when duplicate QoS rule is created
When user tries to create QoS rule which already exists in same
QoS policy, only check if rule is duplicated was done on DB layer.
Because of that, there was many retries of DB operations so user
waits to response from Neutron server long time.
Also error message returned from this DB related exception was not
user friendly.
This patch adds additional check of such duplicated rules before
there is attempt to save new/updated rule in database so in case
of error, response is send to user faster and it has proper
message.
Change-Id: I7d55df1eb931583c3dde064e073deb3e5479acc2
Closes-Bug: #1746526
(cherry picked from commit a91d84cfb44a9def517f2990d164b4972023709a)
Reviewed: https:/ /review. openstack. org/544370 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=232d766ed0f 3cdbca9863d161d c81f7c0e4e50d7
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 232d766ed0f3cdb ca9863d161dc81f 7c0e4e50d7
Author: Sławek Kapłoński <email address hidden>
Date: Thu Feb 1 12:59:02 2018 +0100
Fix error message when duplicate QoS rule is created
When user tries to create QoS rule which already exists in same
QoS policy, only check if rule is duplicated was done on DB layer.
Because of that, there was many retries of DB operations so user
waits to response from Neutron server long time.
Also error message returned from this DB related exception was not
user friendly.
This patch adds additional check of such duplicated rules before
there is attempt to save new/updated rule in database so in case
of error, response is send to user faster and it has proper
message.
Change-Id: I7d55df1eb93158 3c3dde064e073de b3e5479acc2 f517f2990d164b4 972023709a)
Closes-Bug: #1746526
(cherry picked from commit a91d84cfb44a9de