failed to run test_qos_plugin.TestQosPlugin independently

Bug #1488868 reported by yong sheng gong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Miguel Angel Ajo

Bug Description

neutron.tests.unit.services.qos.test_qos_plugin.TestQosPlugin.test_delete_policy_rule
-------------------------------------------------------------------------------------

Captured pythonlogging:
~~~~~~~~~~~~~~~~~~~~~~~
    2015-08-26 17:13:10,783 WARNING [oslo_config.cfg] Option "verbose" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future.
    2015-08-26 17:13:10,799 INFO [neutron.manager] Loading core plugin: neutron.db.db_base_plugin_v2.NeutronDbPluginV2
    2015-08-26 17:13:10,800 WARNING [neutron.notifiers.nova] Authenticating to nova using nova_admin_* options is deprecated. This should be done using an auth plugin, like password
    2015-08-26 17:13:10,802 INFO [neutron.manager] Loading Plugin: qos
    2015-08-26 17:13:10,804 INFO [neutron.services.qos.notification_drivers.manager] Loading message_queue (Message queue updates) notification driver for QoS plugin

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "neutron/tests/unit/services/qos/test_qos_plugin.py", line 111, in test_delete_policy_rule
        self.ctxt, self.rule.id, self.policy.id)
      File "neutron/services/qos/qos_plugin.py", line 128, in delete_policy_bandwidth_limit_rule
        policy.reload_rules()
      File "neutron/objects/qos/policy.py", line 63, in reload_rules
        rules = rule_obj_impl.get_rules(self._context, self.id)
      File "neutron/objects/qos/rule.py", line 37, in get_rules
        rules = rule_cls.get_objects(context, qos_policy_id=qos_policy_id)
      File "neutron/objects/base.py", line 122, in get_objects
        db_objs = db_api.get_objects(context, cls.db_model, **kwargs)
      File "neutron/db/api.py", line 87, in get_objects
        .filter_by(**kwargs)
      File "/mnt/data3/opt/stack/neutron/.tox/py27/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2399, in all
        return list(self)
      File "/mnt/data3/opt/stack/neutron/.tox/py27/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2516, in __iter__
        return self._execute_and_instances(context)
      File "/mnt/data3/opt/stack/neutron/.tox/py27/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2531, in _execute_and_instances
        result = conn.execute(querycontext.statement, self._params)
      File "/mnt/data3/opt/stack/neutron/.tox/py27/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute
        return meth(self, multiparams, params)
      File "/mnt/data3/opt/stack/neutron/.tox/py27/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
        return connection._execute_clauseelement(self, multiparams, params)
      File "/mnt/data3/opt/stack/neutron/.tox/py27/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
        compiled_sql, distilled_params
      File "/mnt/data3/opt/stack/neutron/.tox/py27/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
        context)
      File "/mnt/data3/opt/stack/neutron/.tox/py27/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1337, in _handle_dbapi_exception
        util.raise_from_cause(newraise, exc_info)
      File "/mnt/data3/opt/stack/neutron/.tox/py27/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
        reraise(type(exception), exception, tb=exc_tb)
      File "/mnt/data3/opt/stack/neutron/.tox/py27/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
        context)
      File "/mnt/data3/opt/stack/neutron/.tox/py27/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
        cursor.execute(statement, parameters)
    sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: qos_bandwidth_limit_rules [SQL: u'SELECT qos_bandwidth_limit_rules.id AS qos_bandwidth_limit_rules_id, qos_bandwidth_limit_rules.qos_policy_id AS qos_bandwidth_limit_rules_qos_policy_id, qos_bandwidth_limit_rules.max_kbps AS qos_bandwidth_limit_rules_max_kbps, qos_bandwidth_limit_rules.max_burst_kbps AS qos_bandwidth_limit_rules_max_burst_kbps \nFROM qos_bandwidth_limit_rules \nWHERE qos_bandwidth_limit_rules.qos_policy_id = ?'] [parameters: ('7777777',)]

======
Totals
======
Ran: 14 tests in 5.0000 sec.
 - Passed: 10
 - Skipped: 0
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 4
Sum of execute time for each test: 2.2653 sec.

==============
Worker Balance
==============
 - Worker 0 (1 tests) => 0:00:00.388500
 - Worker 1 (1 tests) => 0:00:00.390602
 - Worker 2 (1 tests) => 0:00:00.362367
 - Worker 3 (1 tests) => 0:00:00.396344
 - Worker 4 (1 tests) => 0:00:00.125718
 - Worker 5 (2 tests) => 0:00:00.163376
 - Worker 6 (2 tests) => 0:00:00.164033
 - Worker 7 (5 tests) => 0:00:00.282335

Slowest Tests:

Test id Runtime (s)
--------------------------------------------------------------------------------------------------------------------------- -----------
neutron.tests.unit.services.qos.test_qos_plugin.TestQosPlugin.test_create_policy_rule 0.396
neutron.tests.unit.services.qos.test_qos_plugin.TestQosPlugin.test_add_policy 0.391
neutron.tests.unit.services.qos.test_qos_plugin.TestQosPlugin.test_update_policy_rule 0.389
neutron.tests.unit.services.qos.test_qos_plugin.TestQosPlugin.test_delete_policy_rule 0.362
neutron.tests.unit.services.qos.test_qos_plugin.TestQosPlugin.test_get_policy_bandwidth_limit_rules_for_nonexistent_policy 0.145
neutron.tests.unit.services.qos.test_qos_plugin.TestQosPlugin.test_create_policy_rule_for_nonexistent_policy 0.133
neutron.tests.unit.services.qos.test_qos_plugin.TestQosPlugin.test_delete_policy 0.133
neutron.tests.unit.services.qos.test_qos_plugin.TestQosPlugin.test_delete_policy_rule_for_nonexistent_policy 0.126
neutron.tests.unit.services.qos.test_qos_plugin.TestQosPlugin.test_get_policy_bandwidth_limit_rules_for_policy_with_filters 0.044
neutron.tests.unit.services.qos.test_qos_plugin.TestQosPlugin.test_get_policy_for_nonexistent_policy 0.031
ERROR: InvocationError: '/mnt/data3/opt/stack/neutron/.tox/py27/bin/ostestr --regex neutron.tests.unit.services.qos.test_qos_plugin.TestQosPlugin'
_____________________________________________________________________________________________________ summary _____________________________________________________________________________________________________
ERROR: py27: commands failed

Revision history for this message
yong sheng gong (gongysh) wrote :

This is caused because wrong base class is used for TestQosPlugin. We should subclass SqlTestCase since it has db operation

Changed in neutron:
assignee: nobody → yong sheng gong (gongysh)
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/217048

Changed in neutron:
status: New → In Progress
Changed in neutron:
assignee: yong sheng gong (gongysh) → Miguel Angel Ajo (mangelajo)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit c1599337ab8b3ae77ee431f8282673cb0720717d
Author: gong yong sheng <gong.yongsheng@99cloud.net>
Date: Wed Aug 26 17:20:25 2015 +0800

    Base on SqlTestCase to init db tables correctly

    Change-Id: I6c6503d4b8b0677cb31fa54185b1aacda68f7b53
    Closes-bug: #1488868

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

Fix proposed to branch: feature/pecan
Review: https://review.openstack.org/218710

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (feature/pecan)
Download full text (155.6 KiB)

Reviewed: https://review.openstack.org/218710
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=2c5f44e1b3bd4ed8a0b7232fd293b576cc8c1c87
Submitter: Jenkins
Branch: feature/pecan

commit f35d1c5c50dccbef1a2e079f967b82f0df0e22e9
Author: Adelina Tuvenie <email address hidden>
Date: Thu Aug 27 02:27:28 2015 -0700

    Fixes wrong neutron Hyper-V Agent name in constants

    Change Id03fb147e11541be309c1cd22ce27e70fadc28b5 moved the
    AGENT_TYPE_HYPERV constant from common.constants to
    plugins.ml2.drivers.hyperv.constants but change the value of the
    constant from 'HyperV agent' to 'hyperv'. This patch changes
    the name back to 'HyperV agent'

    Change-Id: If74b4b2a84811e266c8b12e70bf6bfe74ed4ea21
    Partial-Bug: #1487598

commit de604de334854e2eb6b4312ff57920564cbd4459
Author: OpenStack Proposal Bot <email address hidden>
Date: Sun Aug 30 01:39:06 2015 +0000

    Updated from global requirements

    Change-Id: Ie52aa3b59784722806726e4046bd07f4a4d97328

commit f0415ac20eaf5ab4abb9bd4839bf6d04ceee85d0
Author: armando-migliaccio <email address hidden>
Date: Fri Aug 28 13:53:04 2015 -0700

    Revert "Add support for unaddressed port"

    This implementation may expose a vulnerability where a malicious
    user can sieze the opportunity of a time window where a port
    may land unaddressed on a shared network, thus allowing him/her
    to suck up all the tenant traffic he/she wants....oh the shivers.

    This reverts commit d4c52b7f5a36a103a92bf9dcda7f371959112292.

    Change-Id: I7ebdaa8d3defa80eab90e460fde541a5bdd8864c

commit 013fdcd2a6d45dbe4de5d6e7077e5e9b60985ef9
Author: Assaf Muller <email address hidden>
Date: Fri Aug 28 16:41:07 2015 -0400

    Improve logging upon failure in iptables functional tests

    This will help us nail down a more accurate and efficient logstash
    query.

    Change-Id: Iee4238e358f7b056e373c7be8d6aa3202117a680
    Related-Bug: #1478847

commit 622dea818d851224a43d5276a81d5ce8a6eebb76
Author: Ivar Lazzaro <email address hidden>
Date: Mon Aug 17 17:17:42 2015 -0700

    handle gw_info outside of the db transaction on router creation

    Move the gateway interface creation outside the DB transaction
    to avoid lock timeout.

    Change-Id: I5a78d7f32e8ca912016978105221d5f34618af19
    Closes-bug: 1485809

commit 5b27d290a0a95f6247fc5a0fe6da1e7d905e6b2d
Author: Assaf Muller <email address hidden>
Date: Wed Aug 26 10:07:03 2015 -0400

    Remove ml2 resource extension success logging

    This is the cause of a tremendous amount of logs, for no
    perceivable gain. A normal dvr run in the gate shows this debug
    message around 120K times, which is way too much.

    Closes-Bug: #1489952

    Change-Id: I26fca8515d866a7cc1638d07fa33bc04479ae221

commit 8d3faf549cba2f58c872ef4121b2481e73464010
Author: huangpengtao <email address hidden>
Date: Fri Aug 28 23:20:46 2015 +0800

    Replace "prt" variable by "port"

    the local variable prt is meaningless,
    and port is used popular.

    Change-Id: I20849102cf5b4d84433c46791b4b1e2a22dc4739

commit ee374e7a5f4dea538fcd942f5...

tags: added: in-feature-pecan
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → liberty-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: liberty-3 → 7.0.0
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.