← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1177579] Re: deletion of token for client causes failure

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => havana-2

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1177579

Title:
  deletion of token for client causes failure

Status in OpenStack Neutron (virtual network service):
  Opinion
Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  Used a script to get a token, use that token to delete a server, then
  delete the token (in an effort to cleanup). The server deletion got
  stuck, and the following error was logged:

  unsupported operand type(s) for +: 'NoneType' and 'str'
    File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 231, in decorated_function
      return function(self, context, *args, **kwargs)
    File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1401, in terminate_instance
      do_terminate_instance(instance, bdms)
    File "/usr/lib/python2.6/site-packages/nova/openstack/common/lockutils.py", line 242, in inner
      retval = f(*args, **kwargs)
    File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1393, in do_terminate_instance
      reservations=reservations)
    File "/usr/lib/python2.6/site-packages/nova/hooks.py", line 88, in inner
      rv = f(*args, **kwargs)
    File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1356, in _delete_instance
      project_id=project_id)
    File "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__
      self.gen.next()
    File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1329, in _delete_instance
      self._shutdown_instance(context, instance, bdms)
    File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1254, in _shutdown_instance
      network_info = self._get_instance_nw_info(context, instance)
    File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 691, in _get_instance_nw_info
      instance, conductor_api=self.conductor_api)
    File "/usr/lib/python2.6/site-packages/nova/network/quantumv2/api.py", line 363, in get_instance_nw_info
      result = self._get_instance_nw_info(context, instance, networks)
    File "/usr/lib/python2.6/site-packages/nova/network/quantumv2/api.py", line 371, in _get_instance_nw_info
      nw_info = self._build_network_info_model(context, instance, networks)
    File "/usr/lib/python2.6/site-packages/nova/network/quantumv2/ibmpowervm_api.py", line 27, in _build_network_info_model
      networks)
    File "/usr/lib/python2.6/site-packages/nova/network/quantumv2/api.py", line 794, in _build_network_info_model
      instance['project_id'])
    File "/usr/lib/python2.6/site-packages/nova/network/quantumv2/api.py", line 118, in _get_available_networks
      nets = quantum.list_networks(**search_opts).get('networks', [])
    File "/usr/lib/python2.6/site-packages/quantumclient/v2_0/client.py", line 108, in with_params
      ret = self.function(instance, *args, **kwargs)
    File "/usr/lib/python2.6/site-packages/quantumclient/v2_0/client.py", line 294, in list_networks
      **_params)
    File "/usr/lib/python2.6/site-packages/quantumclient/v2_0/client.py", line 1002, in list
      for r in self._pagination(collection, path, **params):
    File "/usr/lib/python2.6/site-packages/quantumclient/v2_0/client.py", line 1015, in _pagination
      res = self.get(path, params=params)
    File "/usr/lib/python2.6/site-packages/quantumclient/v2_0/client.py", line 988, in get
      headers=headers, params=params)
    File "/usr/lib/python2.6/site-packages/quantumclient/v2_0/client.py", line 973, in retry_request
      headers=headers, params=params)
    File "/usr/lib/python2.6/site-packages/quantumclient/v2_0/client.py", line 907, in do_request
      resp, replybody = self.httpclient.do_request(action, method, body=body)
    File "/usr/lib/python2.6/site-packages/quantumclient/client.py", line 154, in do_request
      self.authenticate()
    File "/usr/lib/python2.6/site-packages/quantumclient/client.py", line 183, in authenticate
      token_url = self.auth_url + "/tokens"

  Deleting the token when the client is done with it should not cause a
  problem. If OpenStack needs a token internally, it should get one
  itself. And indeed we found that the code tried to do just that when
  the token created by the test script stopped working, but the
  reauthentication code is flawed... it does not have the auth_url,
  which led to the error shown in the stacktrace.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1177579/+subscriptions