Comment 2 for bug 1616797

Revision history for this message
Nikhil Bansal (nikhilb-u) wrote :

There are couple of issues here.
1. in obj_perms function of vnc_api, this code was added:
            finally:
            del self._headers['X-USER-TOKEN']
   however, if request_server gets 401 error then self._headers get overwritten
            if ((status == 401) and (not self._auth_token_input) and (not retry_after_authn)):
                self._headers = self._authenticate(content, self._headers)
   due to this we get following error:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bottle.py", line 856, in _handle
    return route.call(**args)
  File "/usr/lib/python2.7/dist-packages/bottle.py", line 1721, in wrapper
    rv = callback(*a, **ka)
  File "/usr/lib/python2.7/dist-packages/opserver/opserver.py", line 411, in _impl
    self._vnc_api_client.is_role_cloud_admin(user_token):
  File "/usr/lib/python2.7/dist-packages/opserver/vnc_cfg_api_client.py", line 61, in is_role_cloud_admin
    result = self._get_user_token_info(user_token)
  File "/usr/lib/python2.7/dist-packages/opserver/vnc_cfg_api_client.py", line 30, in _get_user_token_info
    return self._vnc_api_client.obj_perms(user_token)
  File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 1208, in obj_perms
    rv = None
KeyError: 'X-USER-TOKEN'

2. There is intermittent authentication issue also which somehow went away after couple of analytics restart that I did to verify first issue.