Adding admin_token to image-cache config.
Fixes bug 888802 Change-Id: If1fa7c4a6ba09b86ddba0ceff9a922aa6a9d27af
This commit is contained in:
parent
5885b619ad
commit
0a394707be
@ -36,6 +36,9 @@ registry_host = 0.0.0.0
|
||||
# Port the registry server is listening on
|
||||
registry_port = 9191
|
||||
|
||||
# Admin token to use if using Keystone
|
||||
# admin_token = 123
|
||||
|
||||
[app:glance-pruner]
|
||||
paste.app_factory = glance.image_cache.pruner:app_factory
|
||||
|
||||
|
@ -42,7 +42,9 @@ class Prefetcher(object):
|
||||
registry.configure_registry_client(options)
|
||||
|
||||
def fetch_image_into_cache(self, image_id):
|
||||
ctx = context.RequestContext(is_admin=True, show_deleted=True)
|
||||
auth_tok = self.options.get('admin_token')
|
||||
ctx = context.RequestContext(is_admin=True, show_deleted=True,
|
||||
auth_tok=auth_tok)
|
||||
try:
|
||||
image_meta = registry.get_image_metadata(ctx, image_id)
|
||||
if image_meta['status'] != 'active':
|
||||
|
@ -41,7 +41,9 @@ class Queuer(object):
|
||||
registry.configure_registry_client(options)
|
||||
|
||||
def queue_image(self, image_id):
|
||||
ctx = context.RequestContext(is_admin=True, show_deleted=True)
|
||||
auth_tok = self.options.get('admin_token')
|
||||
ctx = context.RequestContext(is_admin=True, show_deleted=True,
|
||||
auth_tok=auth_tok)
|
||||
try:
|
||||
image_meta = registry.get_image_metadata(ctx, image_id)
|
||||
if image_meta['status'] != 'active':
|
||||
|
Loading…
x
Reference in New Issue
Block a user