Default qos policy doesn't work when creating network

Bug #1712278 reported by Hirofumi Ichihara
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Hirofumi Ichihara

Bug Description

Default qos policy doesn't work fine when creating network. Neutron server returns 500.

2017-08-22 05:12:27.820 ERROR oslo_db.sqlalchemy.exc_filters [req-6e5e754a-2af6-41ce-8f9f-284b291c3b4d demo demo] DB exception wrapped.: AttributeError: 'QosPolicyDefault' object has no attribute 'translate'
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters Traceback (most recent call last):
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters context)
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 470, in do_execute
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters cursor.execute(statement, parameters)
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/pymysql/cursors.py", line 164, in execute
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters query = self.mogrify(query, args)
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/pymysql/cursors.py", line 143, in mogrify
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters query = query % self._escape_args(args, conn)
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/pymysql/cursors.py", line 123, in _escape_args
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters return dict((key, conn.literal(val)) for (key, val) in args.items())
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/pymysql/cursors.py", line 123, in <genexpr>
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters return dict((key, conn.literal(val)) for (key, val) in args.items())
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 821, in literal
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters return self.escape(obj, self.encoders)
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 814, in escape
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters return escape_item(obj, self.charset, mapping=mapping)
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/pymysql/converters.py", line 27, in escape_item
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters val = encoder(val, mapping)
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/pymysql/converters.py", line 110, in escape_unicode
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters return u"'%s'" % _escape_unicode(value)
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/pymysql/converters.py", line 73, in _escape_unicode
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters return value.translate(_escape_table)
2017-08-22 05:12:27.820 TRACE oslo_db.sqlalchemy.exc_filters AttributeError: 'QosPolicyDefault' object has no attribute 'translate'

Changed in neutron:
assignee: nobody → Hirofumi Ichihara (ichihara-hirofumi)
tags: added: qos
Changed in neutron:
importance: Undecided → High
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/496139

Changed in neutron:
status: New → In Progress
Akihiro Motoki (amotoki)
tags: added: gate-failure
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/496139
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=95bbb7385bbd538de99a94b20e2f58718cce16d7
Submitter: Jenkins
Branch: master

commit 95bbb7385bbd538de99a94b20e2f58718cce16d7
Author: Hirofumi Ichihara <email address hidden>
Date: Wed Aug 23 13:55:12 2017 +0900

    Fix default qos policy when creating network

    In _create_network_policy(), policy object is passed into _get_policy_obj()
    although it expects to be passed policy id. This patch passes policy id
    instead of policy object and adds a unit test and API tests.

    Change-Id: Ic4c755c54d93d7ca3312b432b7c1e6770f25c359
    Closes-bug: #1712278

Changed in neutron:
status: In Progress → Fix Released
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/497415

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

Reviewed: https://review.openstack.org/497415
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=008e0657420250a80665eebab5f194af189845c8
Submitter: Jenkins
Branch: stable/pike

commit 008e0657420250a80665eebab5f194af189845c8
Author: Hirofumi Ichihara <email address hidden>
Date: Wed Aug 23 13:55:12 2017 +0900

    Fix default qos policy when creating network

    In _create_network_policy(), policy object is passed into _get_policy_obj()
    although it expects to be passed policy id. This patch passes policy id
    instead of policy object and adds a unit test and API tests.

    Change-Id: Ic4c755c54d93d7ca3312b432b7c1e6770f25c359
    Closes-bug: #1712278
    (cherry picked from commit 95bbb7385bbd538de99a94b20e2f58718cce16d7)

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

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

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

This issue was fixed in the openstack/neutron 12.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.