Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 68 lines (57 sloc) 2.81 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
ONE:

Looks like the on-behalf-of functionality in python novaclient is borked in association w/ keystone
*There are 2 different calls to keystone to get token info, and they return different hash's
*The service catalog borks out if 'access' is not the main key, but in the 2nd case 'token' is the main key.

Modified Files
* novaclient/service_catalog.py

Until this is fixed you need to mod python-novaclient after it gets downloaded via devstack
###### BEGIN PATCH
@@ -44,12 +44,17 @@ class ServiceCatalog(object):
                 raise novaclient.exceptions.EndpointNotFound()

         # We don't always get a service catalog back ...
- if not 'serviceCatalog' in self.catalog['access']:
+ try:
+ if 'serviceCatalog' in self.catalog['access']:
+ # Full catalog ...
+ catalog = self.catalog['access']['serviceCatalog']
+ except KeyError:
+ if 'serviceCatalog' in self.catalog['token']:
+ # Full catalog ...
+ catalog = self.catalog['token']['serviceCatalog']
+ if catalog is None:
             return None

- # Full catalog ...
- catalog = self.catalog['access']['serviceCatalog']
-
         for service in catalog:
             if service.get("type") != service_type:
                 continue
###### END PATCH

TWO:

funkyness w/ the extensions. the extensions url itself wont load. Seems to have to do with authorization & tenants.
 * mitigated in reddwarf/common/extensions.py, see for more information


keystone haves issues with the get endpoints method and causing NotImplementedError/ClientException HTTP/500:
###### BEGIN PATCH
diff --git a/keystone/service.py b/keystone/service.py
index d0d4470..4feb966 100644
--- a/keystone/service.py
+++ b/keystone/service.py
@@ -408,8 +408,17 @@ class TokenController(wsgi.Application):
         self.token_api.delete_token(context=context, token_id=token_id)

     def endpoints(self, context, token_id):
- """Return a list of endpoints available to the token."""
- raise NotImplementedError()
+ """Return service catalog endpoints."""
+ try:
+ token_ref = self.token_api.get_token(context=context,
+ token_id=token_id)
+ except exception.NotFound:
+ raise exception.Unauthorized()
+
+ catalog_ref = self.catalog_api.get_catalog(context,
+ token_ref['user']['id'],
+ token_ref['tenant']['id'])
+ return {'token': {'serviceCatalog': self._format_catalog(catalog_ref)}}

     def _format_authenticate(self, token_ref, roles_ref, catalog_ref):
         o = self._format_token(token_ref, roles_ref)
###### END PATCH
Something went wrong with that request. Please try again.