← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1450414] [NEW] can't get authentication with os-token and os-url

 

Public bug reported:

Hi, I can't get authentication with os-token and os-url on Juno pythone-
neutronclient.

On Icehouse, with os-token and os-url, we can get authentication.
[root@compute01 ~]# neutron --os-token $token --os-url http://controller:9696 net-list
+--------------------------------------+--------------+------------------------------------------------------+
| id                                   | name         | subnets                                              |
+--------------------------------------+--------------+------------------------------------------------------+
| 06c5d426-ec2c-4a19-a5c9-cfd21cfb5a0c | ext-net      | 38d87619-9c76-481f-bfe8-b301e05693d9 193.160.15.0/24 |
+--------------------------------------+--------------+------------------------------------------------------+

But on Juno, it failed. The detail :
[root@compute01 ~]# neutron --os-token $token --os-url http://controller:9696 net-list --debug 
ERROR: neutronclient.shell Unable to determine the Keystone version to authenticate with using the given auth_url. Identity service may not support API version discovery. Please provide a versioned auth_url instead. 
Traceback (most recent call last):
   File "/usr/lib/python2.6/site-packages/neutronclient/shell.py", line 666, in run 
     self.initialize_app(remainder)
   File "/usr/lib/python2.6/site-packages/neutronclient/shell.py", line 808, in initialize_app
     self.authenticate_user()
   File "/usr/lib/python2.6/site-packages/neutronclient/shell.py", line 761, in authenticate_user
     auth_session = self._get_keystone_session()
   File "/usr/lib/python2.6/site-packages/neutronclient/shell.py", line 904, in _get_keystone_session
     auth_url=self.options.os_auth_url)
   File "/usr/lib/python2.6/site-packages/neutronclient/shell.py", line 889, in _discover_auth_versions
     raise exc.CommandError(msg)
 CommandError: Unable to determine the Keystone version to authenticate with using the given auth_url. Identity service may not support API version discovery. Please provide a versioned auth_url instead. 
Unable to determine the Keystone version to authenticate with using the given auth_url. Identity service may not support API version discovery. Please provide a versioned auth_url instead. 


my solution is this:
On /usr/lib/python2.6/site-packages/neutronclient/shell.py, modify the authenticate_user(self) method.

 Origin:
 auth_session = self._get_keystone_session()

Modified: 
        auth_session = None
        auth = None
        if not self.options.os_token:
            auth_session = self._get_keystone_session()
            auth = auth_session.auth

** Affects: neutron
     Importance: Undecided
         Status: New

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

Title:
  can't get authentication with os-token and os-url

Status in OpenStack Neutron (virtual network service):
  New

Bug description:
  Hi, I can't get authentication with os-token and os-url on Juno
  pythone-neutronclient.

  On Icehouse, with os-token and os-url, we can get authentication.
  [root@compute01 ~]# neutron --os-token $token --os-url http://controller:9696 net-list
  +--------------------------------------+--------------+------------------------------------------------------+
  | id                                   | name         | subnets                                              |
  +--------------------------------------+--------------+------------------------------------------------------+
  | 06c5d426-ec2c-4a19-a5c9-cfd21cfb5a0c | ext-net      | 38d87619-9c76-481f-bfe8-b301e05693d9 193.160.15.0/24 |
  +--------------------------------------+--------------+------------------------------------------------------+

  But on Juno, it failed. The detail :
  [root@compute01 ~]# neutron --os-token $token --os-url http://controller:9696 net-list --debug 
  ERROR: neutronclient.shell Unable to determine the Keystone version to authenticate with using the given auth_url. Identity service may not support API version discovery. Please provide a versioned auth_url instead. 
  Traceback (most recent call last):
     File "/usr/lib/python2.6/site-packages/neutronclient/shell.py", line 666, in run 
       self.initialize_app(remainder)
     File "/usr/lib/python2.6/site-packages/neutronclient/shell.py", line 808, in initialize_app
       self.authenticate_user()
     File "/usr/lib/python2.6/site-packages/neutronclient/shell.py", line 761, in authenticate_user
       auth_session = self._get_keystone_session()
     File "/usr/lib/python2.6/site-packages/neutronclient/shell.py", line 904, in _get_keystone_session
       auth_url=self.options.os_auth_url)
     File "/usr/lib/python2.6/site-packages/neutronclient/shell.py", line 889, in _discover_auth_versions
       raise exc.CommandError(msg)
   CommandError: Unable to determine the Keystone version to authenticate with using the given auth_url. Identity service may not support API version discovery. Please provide a versioned auth_url instead. 
  Unable to determine the Keystone version to authenticate with using the given auth_url. Identity service may not support API version discovery. Please provide a versioned auth_url instead. 

  
  my solution is this:
  On /usr/lib/python2.6/site-packages/neutronclient/shell.py, modify the authenticate_user(self) method.

   Origin:
   auth_session = self._get_keystone_session()

  Modified: 
          auth_session = None
          auth = None
          if not self.options.os_token:
              auth_session = self._get_keystone_session()
              auth = auth_session.auth

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


Follow ups

References