yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #19813
[Bug 1358362] Re: TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
*** This bug is a duplicate of bug 1241275 ***
https://bugs.launchpad.net/bugs/1241275
So I think this bug is actually in python-neutronclient, however in
looking at the code I can't see any way that such a thing could happen
as that code path should have been protected from this since -
2013-10-23 commit
commit e49819caf95fc6985036231b1e5717f0ff7b6c61
Author: Drew Thorstensen <thorst@xxxxxxxxxx>
Date: Wed Oct 23 16:41:45 2013 -0500
New exception when auth_url is not specified
Certain scenarios into the neutron client will not specify the
auth_url. This is typically when a token is specified. However, when
the token is expired the neutron client will attempt to refresh the
token. Users of this may not have passed in all of the required
information for this reauthentication to properly occur.
This code fixes an error that occurs in this flow where the auth_url
(which is None) is appended to another string. This results in a core
Python error.
The update will provide a more targetted error message specifying to
the user that the auth_url needs to be specified. An associated unit
test is also included to validate this behavior.
Change-Id: I577ce0c009a9a281acdc238d290a22c5e561ff82
Closes-Bug: #1241275
** Changed in: nova
Status: New => Incomplete
** Also affects: python-neutronclient
Importance: Undecided
Status: New
** Changed in: nova
Status: Incomplete => Invalid
** This bug has been marked a duplicate of bug 1241275
Nova / Neutron Client failing upon re-authentication after token expiration
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1358362
Title:
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
Status in OpenStack Compute (Nova):
Invalid
Status in Python client library for Neutron:
New
Bug description:
We had several instances go into error state on bootstack with the
following traceback:
2014-08-17 22:12:37.022 1232 ERROR nova.api.openstack.wsgi [req-068c2700-29a4-46ec-a9f7-9e956c06f3c6 4e68a0dd10e04db5b57c917ca8c521b1 d97d645e7867484b81311b7f9ee2ab15] Exception handling resource: unsupported operand type(s) for +: 'NoneType' and 'str'
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi Traceback (most recent call last):
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 887, in post_process_extensions
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi **action_args)
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/openstack/compute/contrib/security_groups.py", line 590, in show
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi return self._show(req, resp_obj)
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/openstack/compute/contrib/security_groups.py", line 586, in _show
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi self._extend_servers(req, [resp_obj.obj['server']])
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/openstack/compute/contrib/security_groups.py", line 550, in _extend_servers
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi servers))
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/network/security_group/neutron_driver.py", line 345, in get_instances_security_groups_bindings
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi ports = self._get_ports_from_server_list(servers, neutron)
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/network/security_group/neutron_driver.py", line 304, in _get_ports_from_server_list
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi ports.extend(neutron.list_ports(**search_opts).get('ports'))
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 111, in with_params
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi ret = self.function(instance, *args, **kwargs)
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 306, in list_ports
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi **_params)
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1250, in list
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi for r in self._pagination(collection, path, **params):
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1263, in _pagination
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi res = self.get(path, params=params)
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1236, in get
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi headers=headers, params=params)
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1221, in retry_request
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi headers=headers, params=params)
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1156, in do_request
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi resp, replybody = self.httpclient.do_request(action, method, body=body)
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/neutronclient/client.py", line 195, in do_request
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi self.authenticate()
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/neutronclient/client.py", line 231, in authenticate
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi token_url = self.auth_url + "/tokens"
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
2014-08-17 22:12:37.022 1232 TRACE nova.api.openstack.wsgi
2014-08-17 22:12:37.024 1232 INFO nova.osapi_compute.wsgi.server [req-068c2700-29a4-46ec-a9f7-9e956c06f3c6 4e68a0dd10e04db5b57c917ca8c521b1 d97d645e7867484b81311b7f9ee2ab15] 159.8.6.135 "GET /v2/d97d645e7867484b81311b7f9ee2ab15/servers/86b370bd-4ae2-4e54-b305-861cca0bf39b HTTP/1.1" status: 400 len: 338 time: 0.0977190
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1358362/+subscriptions
References