Incorrect message appears while creating duplicate qos-bandwidth-limit-rule

Bug #1746526 reported by Puneet Arora
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Slawek Kaplonski

Bug Description

Improper error messages comes if user tries to create duplicate rule under qos-policy.

In error message two things to correct:-
--> attribute_name
--> value

$ neutron qos-bandwidth-limit-rule-create --max-kbps 1026 <qos-policy-id>
E.g.: neutron qos-bandwidth-limit-rule-create --max-kbps 1026 f73cf8ea-92be-472d-aeef-3364319fc51e
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Failed to create a duplicate QosBandwidthLimitRule: for attribute(s) ['qos_bandwidth_rules0qos_policy_id0direction'] with value(s) f73cf8ea-92be-472d-aeef-3364319fc51e-egress
Neutron server returns request_ids: ['req-0447aa9e-acc0-4200-8ea7-5752edcab574']

Steps:-
1) Create qos-policy
   neutron qos-policy-create policy-1
2) Create qos-bandwidth-limit-rule
    neutron qos-bandwidth-limit-rule-create --max-kbps 1026 policy-1
3) Again create qos-bandwidth-limit-rule
   neutron qos-bandwidth-limit-rule-create --max-kbps 1026 policy-1

Can we correct error message?

Puneet Arora (apuneet)
tags: added: qos
Revision history for this message
Slawek Kaplonski (slaweq) wrote :

Thanks for reporting it. It looks that it is not only matter of bad error message. Response time for such "bad" request is also very long as neutron is retrying db calls few times.

Changed in neutron:
assignee: nobody → Slawek Kaplonski (slaweq)
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Slawek Kaplonski (slaweq) wrote :

I will look how to fix it ASAP

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/539922
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=a91d84cfb44a9def517f2990d164b4972023709a
Submitter: Zuul
Branch: master

commit a91d84cfb44a9def517f2990d164b4972023709a
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: I7d55df1eb931583c3dde064e073deb3e5479acc2
    Closes-Bug: #1746526

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/544370

tags: added: pike-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/547425

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/queens)

Reviewed: https://review.openstack.org/544370
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=232d766ed0f3cdbca9863d161dc81f7c0e4e50d7
Submitter: Zuul
Branch: stable/queens

commit 232d766ed0f3cdbca9863d161dc81f7c0e4e50d7
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: I7d55df1eb931583c3dde064e073deb3e5479acc2
    Closes-Bug: #1746526
    (cherry picked from commit a91d84cfb44a9def517f2990d164b4972023709a)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/pike)

Reviewed: https://review.openstack.org/547425
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=30b86eb169398ae6aea24439ffa5b233655099de
Submitter: Zuul
Branch: stable/pike

commit 30b86eb169398ae6aea24439ffa5b233655099de
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: I7d55df1eb931583c3dde064e073deb3e5479acc2
    Closes-Bug: #1746526
    (cherry picked from commit a91d84cfb44a9def517f2990d164b4972023709a)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 11.0.3

This issue was fixed in the openstack/neutron 11.0.3 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 12.0.1

This issue was fixed in the openstack/neutron 12.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 13.0.0.0b1

This issue was fixed in the openstack/neutron 13.0.0.0b1 development milestone.

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.