Update default values for known_stores config.
Updates the default value for the 'known_stores' config variable to include the full list of storage classes supported in Glance. Also, removes the known_stores config section from the example config file since it is arguably an advanced config that won't get used by most users. Removing this config avoids the overhead of maintaining internal class names in config files. Fixes LP Bug #1008698. Change-Id: I0117376aa4de3103410ecb1a36df6998fcd0d5b5
This commit is contained in:
parent
fc758a46e7
commit
15c204af75
@ -13,11 +13,11 @@ default_store = file
|
||||
|
||||
# List of which store classes and store class locations are
|
||||
# currently known to glance at startup.
|
||||
known_stores = glance.store.filesystem.Store,
|
||||
glance.store.http.Store,
|
||||
glance.store.rbd.Store,
|
||||
glance.store.s3.Store,
|
||||
glance.store.swift.Store,
|
||||
# known_stores = glance.store.filesystem.Store,
|
||||
# glance.store.http.Store,
|
||||
# glance.store.rbd.Store,
|
||||
# glance.store.s3.Store,
|
||||
# glance.store.swift.Store,
|
||||
|
||||
# Address to bind the API server
|
||||
bind_host = 0.0.0.0
|
||||
|
@ -41,3 +41,95 @@ registry_port = 9191
|
||||
# admin_tenant_name = %SERVICE_TENANT_NAME%
|
||||
# admin_user = %SERVICE_USER%
|
||||
# admin_password = %SERVICE_PASSWORD%
|
||||
|
||||
# List of which store classes and store class locations are
|
||||
# currently known to glance at startup.
|
||||
# known_stores = glance.store.filesystem.Store,
|
||||
# glance.store.http.Store,
|
||||
# glance.store.rbd.Store,
|
||||
# glance.store.s3.Store,
|
||||
# glance.store.swift.Store,
|
||||
|
||||
# ============ Filesystem Store Options ========================
|
||||
|
||||
# Directory that the Filesystem backend store
|
||||
# writes image data to
|
||||
filesystem_store_datadir = /var/lib/glance/images/
|
||||
|
||||
# ============ Swift Store Options =============================
|
||||
|
||||
# Version of the authentication service to use
|
||||
# Valid versions are '2' for keystone and '1' for swauth and rackspace
|
||||
swift_store_auth_version = 2
|
||||
|
||||
# Address where the Swift authentication service lives
|
||||
# Valid schemes are 'http://' and 'https://'
|
||||
# If no scheme specified, default to 'https://'
|
||||
# For swauth, use something like '127.0.0.1:8080/v1.0/'
|
||||
swift_store_auth_address = 127.0.0.1:5000/v2.0/
|
||||
|
||||
# User to authenticate against the Swift authentication service
|
||||
# If you use Swift authentication service, set it to 'account':'user'
|
||||
# where 'account' is a Swift storage account and 'user'
|
||||
# is a user in that account
|
||||
swift_store_user = jdoe:jdoe
|
||||
|
||||
# Auth key for the user authenticating against the
|
||||
# Swift authentication service
|
||||
swift_store_key = a86850deb2742ec3cb41518e26aa2d89
|
||||
|
||||
# Container within the account that the account should use
|
||||
# for storing images in Swift
|
||||
swift_store_container = glance
|
||||
|
||||
# Do we create the container if it does not exist?
|
||||
swift_store_create_container_on_put = False
|
||||
|
||||
# What size, in MB, should Glance start chunking image files
|
||||
# and do a large object manifest in Swift? By default, this is
|
||||
# the maximum object size in Swift, which is 5GB
|
||||
swift_store_large_object_size = 5120
|
||||
|
||||
# When doing a large object manifest, what size, in MB, should
|
||||
# Glance write chunks to Swift? This amount of data is written
|
||||
# to a temporary disk buffer during the process of chunking
|
||||
# the image file, and the default is 200MB
|
||||
swift_store_large_object_chunk_size = 200
|
||||
|
||||
# Whether to use ServiceNET to communicate with the Swift storage servers.
|
||||
# (If you aren't RACKSPACE, leave this False!)
|
||||
#
|
||||
# To use ServiceNET for authentication, prefix hostname of
|
||||
# `swift_store_auth_address` with 'snet-'.
|
||||
# Ex. https://example.com/v1.0/ -> https://snet-example.com/v1.0/
|
||||
swift_enable_snet = False
|
||||
|
||||
# ============ S3 Store Options =============================
|
||||
|
||||
# Address where the S3 authentication service lives
|
||||
# Valid schemes are 'http://' and 'https://'
|
||||
# If no scheme specified, default to 'http://'
|
||||
s3_store_host = 127.0.0.1:8080/v1.0/
|
||||
|
||||
# User to authenticate against the S3 authentication service
|
||||
s3_store_access_key = <20-char AWS access key>
|
||||
|
||||
# Auth key for the user authenticating against the
|
||||
# S3 authentication service
|
||||
s3_store_secret_key = <40-char AWS secret key>
|
||||
|
||||
# Container within the account that the account should use
|
||||
# for storing images in S3. Note that S3 has a flat namespace,
|
||||
# so you need a unique bucket name for your glance images. An
|
||||
# easy way to do this is append your AWS access key to "glance".
|
||||
# S3 buckets in AWS *must* be lowercased, so remember to lowercase
|
||||
# your AWS access key if you use it in your bucket name below!
|
||||
s3_store_bucket = <lowercased 20-char aws access key>glance
|
||||
|
||||
# Do we create the bucket if it does not exist?
|
||||
s3_store_create_bucket_on_put = False
|
||||
|
||||
# When sending images to S3, the data will first be written to a
|
||||
# temporary buffer on disk. By default the platform's temporary directory
|
||||
# will be used. If required, an alternative directory can be specified here.
|
||||
# s3_store_object_buffer_dir = /path/to/dir
|
||||
|
@ -31,7 +31,12 @@ logger = logging.getLogger('glance.store')
|
||||
|
||||
store_opts = [
|
||||
cfg.ListOpt('known_stores',
|
||||
default=['glance.store.filesystem.Store', ]),
|
||||
default=['glance.store.filesystem.Store',
|
||||
'glance.store.http.Store',
|
||||
'glance.store.rbd.Store',
|
||||
'glance.store.s3.Store',
|
||||
'glance.store.swift.Store',
|
||||
]),
|
||||
cfg.StrOpt('scrubber_datadir',
|
||||
default='/var/lib/glance/scrubber'),
|
||||
cfg.BoolOpt('delayed_delete', default=False),
|
||||
|
@ -176,7 +176,6 @@ class ApiServer(Server):
|
||||
super(ApiServer, self).__init__(test_dir, port)
|
||||
self.server_name = 'api'
|
||||
self.default_store = 'file'
|
||||
self.known_stores = ", ".join(test_utils.get_default_stores())
|
||||
self.key_file = ""
|
||||
self.cert_file = ""
|
||||
self.metadata_encryption_key = "012345678901234567890123456789ab"
|
||||
@ -222,7 +221,6 @@ verbose = %(verbose)s
|
||||
debug = %(debug)s
|
||||
filesystem_store_datadir=%(image_dir)s
|
||||
default_store = %(default_store)s
|
||||
known_stores = %(known_stores)s
|
||||
bind_host = 0.0.0.0
|
||||
bind_port = %(bind_port)s
|
||||
key_file = %(key_file)s
|
||||
|
@ -59,7 +59,6 @@ class IsolatedUnitTest(StoreClearingUnitTest):
|
||||
verbose=False,
|
||||
debug=False,
|
||||
default_store='filesystem',
|
||||
known_stores=test_utils.get_default_stores(),
|
||||
filesystem_store_datadir=os.path.join(self.test_dir),
|
||||
policy_file=policy_file)
|
||||
super(IsolatedUnitTest, self).setUp()
|
||||
|
@ -39,7 +39,6 @@ FIVE_KB = (5 * 1024)
|
||||
S3_CONF = {'verbose': True,
|
||||
'debug': True,
|
||||
'default_store': 's3',
|
||||
'known_stores': test_utils.get_default_stores(),
|
||||
's3_store_access_key': 'user',
|
||||
's3_store_secret_key': 'key',
|
||||
's3_store_host': 'localhost:8080',
|
||||
|
@ -29,8 +29,7 @@ from glance.tests import utils
|
||||
class TestStoreLocation(base.StoreClearingUnitTest):
|
||||
|
||||
def setUp(self):
|
||||
self.config(known_stores=utils.get_default_stores(),
|
||||
default_store='file')
|
||||
self.config(default_store='file')
|
||||
super(TestStoreLocation, self).setUp()
|
||||
|
||||
def test_get_location_from_uri_back_to_uri(self):
|
||||
|
@ -277,17 +277,6 @@ def find_executable(cmdname):
|
||||
return None
|
||||
|
||||
|
||||
def get_default_stores():
|
||||
# Default test stores
|
||||
return [
|
||||
"glance.store.filesystem.Store",
|
||||
"glance.store.http.Store",
|
||||
"glance.store.rbd.Store",
|
||||
"glance.store.s3.Store",
|
||||
"glance.store.swift.Store",
|
||||
]
|
||||
|
||||
|
||||
def get_unused_port():
|
||||
"""
|
||||
Returns an unused port on localhost.
|
||||
|
Loading…
Reference in New Issue
Block a user