Removing cache enabled flag from most confs
This commit is contained in:
parent
35d9da1178
commit
631d707a35
@ -53,9 +53,6 @@ swift_store_create_container_on_put = False
|
|||||||
|
|
||||||
# ============ Image Cache Options ========================
|
# ============ Image Cache Options ========================
|
||||||
|
|
||||||
# Whether to enable the caching of image data
|
|
||||||
image_cache_enabled = False
|
|
||||||
|
|
||||||
# Directory that the Image Cache writes data to
|
# Directory that the Image Cache writes data to
|
||||||
# Make sure this is also set in glance-pruner.conf
|
# Make sure this is also set in glance-pruner.conf
|
||||||
image_cache_datadir = /var/lib/glance/image-cache/
|
image_cache_datadir = /var/lib/glance/image-cache/
|
||||||
|
@ -7,9 +7,6 @@ debug = False
|
|||||||
|
|
||||||
log_file = /var/log/glance/prefetcher.log
|
log_file = /var/log/glance/prefetcher.log
|
||||||
|
|
||||||
# Whether to enable the caching of image data
|
|
||||||
image_cache_enabled = False
|
|
||||||
|
|
||||||
# Directory that the Image Cache writes data to
|
# Directory that the Image Cache writes data to
|
||||||
# Make sure this is also set in glance-api.conf
|
# Make sure this is also set in glance-api.conf
|
||||||
image_cache_datadir = /var/lib/glance/image-cache/
|
image_cache_datadir = /var/lib/glance/image-cache/
|
||||||
|
@ -7,9 +7,6 @@ debug = False
|
|||||||
|
|
||||||
log_file = /var/log/glance/pruner.log
|
log_file = /var/log/glance/pruner.log
|
||||||
|
|
||||||
# Whether to enable the caching of image data
|
|
||||||
image_cache_enabled = False
|
|
||||||
|
|
||||||
image_cache_max_size_bytes = 1073741824
|
image_cache_max_size_bytes = 1073741824
|
||||||
|
|
||||||
# Percentage of the cache that should be freed (in addition to the overage)
|
# Percentage of the cache that should be freed (in addition to the overage)
|
||||||
|
@ -7,9 +7,6 @@ debug = False
|
|||||||
|
|
||||||
log_file = /var/log/glance/reaper.log
|
log_file = /var/log/glance/reaper.log
|
||||||
|
|
||||||
# Whether to enable the caching of image data
|
|
||||||
image_cache_enabled = False
|
|
||||||
|
|
||||||
# Directory that the Image Cache writes data to
|
# Directory that the Image Cache writes data to
|
||||||
# Make sure this is also set in glance-api.conf
|
# Make sure this is also set in glance-api.conf
|
||||||
image_cache_datadir = /var/lib/glance/image-cache/
|
image_cache_datadir = /var/lib/glance/image-cache/
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
import webob.exc
|
import webob.exc
|
||||||
|
|
||||||
from glance import registry
|
from glance import registry
|
||||||
|
from glance.common import exception
|
||||||
|
|
||||||
|
|
||||||
class BaseController(object):
|
class BaseController(object):
|
||||||
|
@ -98,8 +98,7 @@ class ImageCache(object):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def enabled(self):
|
def enabled(self):
|
||||||
return config.get_option(
|
return self.options.get('image_cache_enabled', False)
|
||||||
self.options, 'image_cache_enabled', type='bool', default=False)
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def path(self):
|
def path(self):
|
||||||
|
@ -47,11 +47,6 @@ class Prefetcher(object):
|
|||||||
cache_file.write(chunk)
|
cache_file.write(chunk)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
if not self.cache.enabled:
|
|
||||||
logger.debug(
|
|
||||||
"Image caching is not enabled, going back to sleep...")
|
|
||||||
return
|
|
||||||
|
|
||||||
if self.cache.is_currently_prefetching_any_images():
|
if self.cache.is_currently_prefetching_any_images():
|
||||||
logger.debug("Currently prefetching, going back to sleep...")
|
logger.debug("Currently prefetching, going back to sleep...")
|
||||||
return
|
return
|
||||||
|
@ -48,11 +48,6 @@ class Pruner(object):
|
|||||||
type='float', default=0.05)
|
type='float', default=0.05)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
if not self.cache.enabled:
|
|
||||||
logger.debug(
|
|
||||||
"Image caching is not enabled, going back to sleep...")
|
|
||||||
return
|
|
||||||
|
|
||||||
self.prune_cache()
|
self.prune_cache()
|
||||||
|
|
||||||
def prune_cache(self):
|
def prune_cache(self):
|
||||||
|
@ -32,11 +32,6 @@ class Reaper(object):
|
|||||||
self.cache = ImageCache(options)
|
self.cache = ImageCache(options)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
if not self.cache.enabled:
|
|
||||||
logger.debug(
|
|
||||||
"Image caching is not enabled, going back to sleep...")
|
|
||||||
return
|
|
||||||
|
|
||||||
invalid_grace = int(self.options.get(
|
invalid_grace = int(self.options.get(
|
||||||
'image_cache_invalid_entry_grace_period',
|
'image_cache_invalid_entry_grace_period',
|
||||||
3600))
|
3600))
|
||||||
|
Loading…
Reference in New Issue
Block a user