OpenContrail neutron_plugin_contrail NameError: global name 'time' is not defined

Bug #1644686 reported by ding xiang
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
Trunk
Fix Committed
Undecided
Sahil Sabharwal

Bug Description

Version:
 OpenStack Liberty
 OpenContrail 3.0.2

When I use the command :neutron port-list, it report connection timeout.
The neutron-api log display:

2016-11-24 14:20:11.675 26592 ERROR neutron.api.v2.resource response = requests.post(url, data=data, headers=headers)
2016-11-24 14:20:11.675 26592 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/requests/api.py", line 109, in post
2016-11-24 14:20:11.675 26592 ERROR neutron.api.v2.resource return request('post', url, data=data, json=json, **kwargs)
2016-11-24 14:20:11.675 26592 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/requests/api.py", line 50, in request
2016-11-24 14:20:11.675 26592 ERROR neutron.api.v2.resource response = session.request(method=method, url=url, **kwargs)
2016-11-24 14:20:11.675 26592 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 465, in request
2016-11-24 14:20:11.675 26592 ERROR neutron.api.v2.resource resp = self.send(prep, **send_kwargs)
2016-11-24 14:20:11.675 26592 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 573, in send
2016-11-24 14:20:11.675 26592 ERROR neutron.api.v2.resource r = adapter.send(request, **kwargs)
2016-11-24 14:20:11.675 26592 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 415, in send
2016-11-24 14:20:11.675 26592 ERROR neutron.api.v2.resource raise ConnectionError(err, request=request)
2016-11-24 14:20:11.675 26592 ERROR neutron.api.v2.resource ConnectionError: ('Connection aborted.', error(110, 'ETIMEDOUT'))
2016-11-24 14:20:11.675 26592 ERROR neutron.api.v2.resource
2016-11-24 14:20:13.979 26592 ERROR neutron.api.v2.resource [req-90364d7e-5300-4bee-badb-3a61fcc7f4c2 c4259444b8504e4fa3f45e069cc27ab1 5a0d9189146f4f638abd03fc4ee9936c - - -] show failed
2016-11-24 14:20:13.979 26592 ERROR neutron.api.v2.resource Traceback (most recent call last):
2016-11-24 14:20:13.979 26592 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/api/v2/resource.py", line 83, in resource
2016-11-24 14:20:13.979 26592 ERROR neutron.api.v2.resource result = method(request=request, **args)
2016-11-24 14:20:13.979 26592 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/extensions/quotasv2.py", line 91, in show
2016-11-24 14:20:13.979 26592 ERROR neutron.api.v2.resource return {self._resource_name: self._get_quotas(request, id)}
2016-11-24 14:20:13.979 26592 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/extensions/quotasv2.py", line 66, in _get_quotas
2016-11-24 14:20:13.979 26592 ERROR neutron.api.v2.resource tenant_id)
2016-11-24 14:20:13.979 26592 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/quota/driver.py", line 127, in get_tenant_quotas
2016-11-24 14:20:13.979 26592 ERROR neutron.api.v2.resource default_project = cls._get_vnc_conn().project_read(
2016-11-24 14:20:13.979 26592 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/quota/driver.py", line 83, in _get_vnc_conn
2016-11-24 14:20:13.979 26592 ERROR neutron.api.v2.resource time.sleep(3)
2016-11-24 14:20:13.979 26592 ERROR neutron.api.v2.resource NameError: global name 'time' is not defined

Tags: config
Revision history for this message
ding xiang (dingxiang1014) wrote :

It should be added : import time in this file:
/usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/quota/driver.py

information type: Proprietary → Public
Changed in juniperopenstack:
assignee: nobody → Sachin Bansal (sbansal)
tags: added: config
Sachin Bansal (sbansal)
Changed in juniperopenstack:
assignee: Sachin Bansal (sbansal) → ssabharwal@juniper.net (ssabharwal)
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/26680
Submitter: <email address hidden> (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/26680
Committed: http://github.org/Juniper/contrail-neutron-plugin/commit/d670745b1b90db0e18418223fd60edb28d17fb94
Submitter: Zuul (<email address hidden>)
Branch: master

commit d670745b1b90db0e18418223fd60edb28d17fb94
Author: Sahil Sabharwal <email address hidden>
Date: Thu Dec 1 13:41:52 2016 -0800

imported time in driver.py

Change-Id: Ief68f69d3aed88c2b36e01c6fa62919736b445c1
Closes-Bug: 1644686

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.