← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1627838] Re: Context is reset to by ClientRouter in nova/rpc.py

 

https://review.openstack.org/#/c/377093/

** Changed in: nova
     Assignee: (unassigned) => Matt Riedemann (mriedem)

** Changed in: nova
     Assignee: Matt Riedemann (mriedem) => melanie witt (melwitt)

** Changed in: nova
   Importance: Undecided => High

** Changed in: nova
       Status: Confirmed => In Progress

** Also affects: nova/newton
   Importance: Undecided
       Status: New

-- 
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/1627838

Title:
  Context is reset to by ClientRouter in nova/rpc.py

Status in OpenStack Compute (nova):
  In Progress
Status in OpenStack Compute (nova) newton series:
  New

Bug description:
  The following line in the constructor of ClientRouter in nova/rpc.py
  is resetting the context on the threading.local to an invalid context.

  self.run_periodic_tasks(nova.context.RequestContext())

  Rather than creating a new context here, I believe it should either
  be:

  self.run_periodic_tasks(nova.context.RequestContext(overwrite=False))
  or
  from oslo_context import context
  curr_context = context.get_current()
  self.run_periodic_tasks(curr_context)

  
  Before the call

  <Context {'domain': None, 'project_name': u'default',
  'project_domain': None, 'timestamp': '2016-09-26T19:00:37.292388',
  'auth_token': u'gAAAAABX6XAxNbPfOJvmNZqCGd3kws4l92qrbvL_JTCpTVv-
  6Sk8fVE8F4VklDunreU', 'remote_address': u'127.0.0.1', 'quota_class':
  None, 'resource_uuid': None, 'is_admin': True, 'user':
  u'0688b01e6439ca32d698d20789d52169126fb41fb1a4ddafcebb97d854e836c9',
  'service_catalog': [{u'endpoints': [{u'adminURL':
  u'https://ip9-114-192-147.pok.stglabs.ibm.com:9000/v2/cd65f1b0d9f6410c92101ed1211b74ea',
  u'region': u'RegionOne', u'internalURL':
  u'http://127.0.0.1:9000/v2/cd65f1b0d9f6410c92101ed1211b74ea',
  u'publicURL':
  u'https://XXXXX:9000/v2/cd65f1b0d9f6410c92101ed1211b74ea'}], u'type':
  u'volume', u'name': u'cinder'}], 'tenant':
  u'cd65f1b0d9f6410c92101ed1211b74ea', 'read_only': False, 'project_id':
  u'cd65f1b0d9f6410c92101ed1211b74ea', 'user_id':
  u'0688b01e6439ca32d698d20789d52169126fb41fb1a4ddafcebb97d854e836c9',
  'show_deleted': False, 'roles': [u'admin'], 'user_identity':
  u'0688b01e6439ca32d698d20789d52169126fb41fb1a4ddafcebb97d854e836c9
  cd65f1b0d9f6410c92101ed1211b74ea - - -', 'is_admin_project': True,
  'read_deleted': u'no', 'request_id': u'req-
  f5b85c48-a3b5-4fc0-bf36-3cf7c66182ed', 'instance_lock_checked': False,
  'user_domain': None, 'user_name': u'root'}>

  After the call (auth_token, user props, etc. are gone )

  <Context {'domain': None, 'project_name': None, 'project_domain':
  None, 'timestamp': '2016-09-26T19:00:44.442372', 'auth_token': None,
  'remote_address': None, 'quota_class': None, 'resource_uuid': None,
  'is_admin': False, 'user': None, 'service_catalog': [], 'tenant':
  None, 'read_only': False, 'project_id': None, 'user_id': None,
  'show_deleted': False, 'roles': [], 'user_identity': u'- - - - -',
  'is_admin_project': True, 'read_deleted': 'no', 'request_id': 'req-
  44d322cd-2e0c-4dba-bb65-c9962b8ac713', 'instance_lock_checked': False,
  'user_domain': None, 'user_name': None}>

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


References