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/547425 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=30b86eb1693 98ae6aea24439ff a5b233655099de
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit 30b86eb169398ae 6aea24439ffa5b2 33655099de
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