Public bug reported: neutron net-list command is failed: AttributeError: 'module' object has no attribute '_get_unique_keys'
I found an error by "neutorn net-list command" in stable/newton. following below. 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource return f(*dup_args, **dup_kwargs) 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource File "/opt/neutron/lib/python2.7/site-packages/neutron/plugins/ml2/plugin.py", line 854, in get_networks 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource limit, marker, page_reverse) 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource File "/opt/neutron/lib/python2.7/site-packages/neutron/db/api.py", line 159, in wrapped 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource return method(*args, **kwargs) 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource File "/opt/neutron/lib/python2.7/site-packages/neutron/db/db_base_plugin_v2.py", line 446, in get_networks 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource page_reverse=page_reverse) 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource File "/opt/neutron/lib/python2.7/site-packages/neutron/db/common_db_mixin.py", line 330, in _get_collection 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource page_reverse=page_reverse) 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource File "/opt/neutron/lib/python2.7/site-packages/neutron/db/common_db_mixin.py", line 296, in _get_collection_query 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource for k in self._unique_keys(model, marker_obj): 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource File "/opt/neutron/lib/python2.7/site-packages/neutron/db/common_db_mixin.py", line 310, in _unique_keys 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource uk_sets = sa_utils._get_unique_keys(model) 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource AttributeError: 'module' object has no attribute '_get_unique_keys' 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource This error caused by following code. https://github.com/openstack/neutron/blob/9.4.0/neutron/db/common_db_mixin.py#L310 This call oslo_db.sqalchemy.utils._get_unique_keys function. However, "_get_unique_keys" function is not found. But, I found "get_unique_keys" function. https://github.com/openstack/oslo.db/blob/4.22.0/oslo_db/sqlalchemy/utils.py#L72 So, I think it should call "get_unique_keys" function. < uk_sets = sa_utils._get_unique_keys(model) > uk_sets = sa_utils.get_unique_keys(model) This bug is fixed in pika and ocata. https://github.com/openstack/neutron/blob/11.0.0.0b1/neutron/db/common_db_mixin.py#L222 https://github.com/openstack/neutron/blob/10.0.2/neutron/db/common_db_mixin.py#L255 But, This is not fixed in newton. https://github.com/openstack/neutron/blob/9.4.0/neutron/db/common_db_mixin.py#L310 ** Affects: neutron Importance: Undecided Assignee: shunya kitada (skitada) Status: New ** Changed in: neutron Assignee: (unassigned) => shunya kitada (skitada) -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1695179 Title: neutron net-list command is failed: AttributeError: 'module' object has no attribute '_get_unique_keys' Status in neutron: New Bug description: neutron net-list command is failed: AttributeError: 'module' object has no attribute '_get_unique_keys' I found an error by "neutorn net-list command" in stable/newton. following below. 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource return f(*dup_args, **dup_kwargs) 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource File "/opt/neutron/lib/python2.7/site-packages/neutron/plugins/ml2/plugin.py", line 854, in get_networks 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource limit, marker, page_reverse) 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource File "/opt/neutron/lib/python2.7/site-packages/neutron/db/api.py", line 159, in wrapped 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource return method(*args, **kwargs) 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource File "/opt/neutron/lib/python2.7/site-packages/neutron/db/db_base_plugin_v2.py", line 446, in get_networks 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource page_reverse=page_reverse) 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource File "/opt/neutron/lib/python2.7/site-packages/neutron/db/common_db_mixin.py", line 330, in _get_collection 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource page_reverse=page_reverse) 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource File "/opt/neutron/lib/python2.7/site-packages/neutron/db/common_db_mixin.py", line 296, in _get_collection_query 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource for k in self._unique_keys(model, marker_obj): 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource File "/opt/neutron/lib/python2.7/site-packages/neutron/db/common_db_mixin.py", line 310, in _unique_keys 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource uk_sets = sa_utils._get_unique_keys(model) 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource AttributeError: 'module' object has no attribute '_get_unique_keys' 2017-06-02 14:06:05.676 9070 ERROR neutron.api.v2.resource This error caused by following code. https://github.com/openstack/neutron/blob/9.4.0/neutron/db/common_db_mixin.py#L310 This call oslo_db.sqalchemy.utils._get_unique_keys function. However, "_get_unique_keys" function is not found. But, I found "get_unique_keys" function. https://github.com/openstack/oslo.db/blob/4.22.0/oslo_db/sqlalchemy/utils.py#L72 So, I think it should call "get_unique_keys" function. < uk_sets = sa_utils._get_unique_keys(model) > uk_sets = sa_utils.get_unique_keys(model) This bug is fixed in pika and ocata. https://github.com/openstack/neutron/blob/11.0.0.0b1/neutron/db/common_db_mixin.py#L222 https://github.com/openstack/neutron/blob/10.0.2/neutron/db/common_db_mixin.py#L255 But, This is not fixed in newton. https://github.com/openstack/neutron/blob/9.4.0/neutron/db/common_db_mixin.py#L310 To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1695179/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp