Image service

Image service

Compute relies on an external image service to store virtual machine images and maintain a catalog of available images. By default, Compute is configured to use the Image service (glance), which is currently the only supported image service.

To customize the Compute service, use the configuration option settings documented in Description of glance configuration options.

You can modify many options in the Image service. The following tables provide a comprehensive list.

Description of authorization token configuration options
Configuration option = Default value Description
[keystone_authtoken]  
admin_password = None (String) Service user password.
admin_tenant_name = admin (String) Service tenant name.
admin_token = None (String) This option is deprecated and may be removed in a future release. Single shared secret with the Keystone configuration used for bootstrapping a Keystone installation, or otherwise bypassing the normal authentication process. This option should not be used, use admin_user and admin_password instead.
admin_user = None (String) Service username.
auth_admin_prefix = (String) Prefix to prepend at the beginning of the path. Deprecated, use identity_uri.
auth_host = 127.0.0.1 (String) Host providing the admin Identity API endpoint. Deprecated, use identity_uri.
auth_port = 35357 (Integer) Port of the admin Identity API endpoint. Deprecated, use identity_uri.
auth_protocol = https (String) Protocol of the admin Identity API endpoint. Deprecated, use identity_uri.
auth_section = None (Unknown) Config Section from which to load plugin specific options
auth_type = None (Unknown) Authentication type to load
auth_uri = None (String) Complete public Identity API endpoint.
auth_version = None (String) API version of the admin Identity API endpoint.
cache = None (String) Env key for the swift cache.
cafile = None (String) A PEM encoded Certificate Authority to use when verifying HTTPs connections. Defaults to system CAs.
certfile = None (String) Required if identity server requires client certificate
check_revocations_for_cached = False (Boolean) If true, the revocation list will be checked for cached tokens. This requires that PKI tokens are configured on the identity server.
delay_auth_decision = False (Boolean) Do not handle authorization requests within the middleware, but delegate the authorization decision to downstream WSGI components.
enforce_token_bind = permissive (String) Used to control the use and type of token binding. Can be set to: “disabled” to not check token binding. “permissive” (default) to validate binding information if the bind type is of a form known to the server and ignore it if not. “strict” like “permissive” but if the bind type is unknown the token will be rejected. “required” any form of token binding is needed to be allowed. Finally the name of a binding method that must be present in tokens.
hash_algorithms = md5 (List) Hash algorithms to use for hashing PKI tokens. This may be a single algorithm or multiple. The algorithms are those supported by Python standard hashlib.new(). The hashes will be tried in the order given, so put the preferred one first for performance. The result of the first hash will be stored in the cache. This will typically be set to multiple values only while migrating from a less secure algorithm to a more secure one. Once all the old tokens are expired this option should be set to a single value for better performance.
http_connect_timeout = None (Integer) Request timeout value for communicating with Identity API server.
http_request_max_retries = 3 (Integer) How many times are we trying to reconnect when communicating with Identity API Server.
identity_uri = None (String) Complete admin Identity API endpoint. This should specify the unversioned root endpoint e.g. https://localhost:35357/
include_service_catalog = True (Boolean) (Optional) Indicate whether to set the X-Service-Catalog header. If False, middleware will not ask for service catalog on token validation and will not set the X-Service-Catalog header.
insecure = False (Boolean) Verify HTTPS connections.
keyfile = None (String) Required if identity server requires client certificate
memcache_pool_conn_get_timeout = 10 (Integer) (Optional) Number of seconds that an operation will wait to get a memcached client connection from the pool.
memcache_pool_dead_retry = 300 (Integer) (Optional) Number of seconds memcached server is considered dead before it is tried again.
memcache_pool_maxsize = 10 (Integer) (Optional) Maximum total number of open connections to every memcached server.
memcache_pool_socket_timeout = 3 (Integer) (Optional) Socket timeout in seconds for communicating with a memcached server.
memcache_pool_unused_timeout = 60 (Integer) (Optional) Number of seconds a connection to memcached is held unused in the pool before it is closed.
memcache_secret_key = None (String) (Optional, mandatory if memcache_security_strategy is defined) This string is used for key derivation.
memcache_security_strategy = None (String) (Optional) If defined, indicate whether token data should be authenticated or authenticated and encrypted. If MAC, token data is authenticated (with HMAC) in the cache. If ENCRYPT, token data is encrypted and authenticated in the cache. If the value is not one of these options or empty, auth_token will raise an exception on initialization.
memcache_use_advanced_pool = False (Boolean) (Optional) Use the advanced (eventlet safe) memcached client pool. The advanced pool will only work under python 2.x.
region_name = None (String) The region in which the identity server can be found.
revocation_cache_time = 10 (Integer) Determines the frequency at which the list of revoked tokens is retrieved from the Identity service (in seconds). A high number of revocation events combined with a low cache duration may significantly reduce performance.
signing_dir = None (String) Directory used to cache files related to PKI tokens.
token_cache_time = 300 (Integer) In order to prevent excessive effort spent validating tokens, the middleware caches previously-seen tokens for a configurable duration (in seconds). Set to -1 to disable caching completely.
Description of common configuration options
Configuration option = Default value Description
[DEFAULT]  
allow_additional_image_properties = True (Boolean) Whether to allow users to specify image properties beyond what the image schema provides
api_limit_max = 1000 (Integer) Maximum permissible number of items that could be returned by a request
backlog = 4096 (Integer) The backlog value that will be used when creating the TCP listener socket.
bind_host = 0.0.0.0 (String) Address to bind the server. Useful when selecting a particular network interface.
bind_port = None (Port number) The port on which the server will listen.
data_api = glance.db.sqlalchemy.api (String) Python module path of data access API
digest_algorithm = sha256 (String) Digest algorithm which will be used for digital signature. Use the command “openssl list-message-digest-algorithms” to get the available algorithms supported by the version of OpenSSL on the platform. Examples are “sha1”, “sha256”, “sha512”, etc.
executor_thread_pool_size = 64 (Integer) Size of executor thread pool.
image_location_quota = 10 (Integer) Maximum number of locations allowed on an image. Negative values evaluate to unlimited.
image_member_quota = 128 (Integer) Maximum number of image members per image. Negative values evaluate to unlimited.
image_property_quota = 128 (Integer) Maximum number of properties allowed on an image. Negative values evaluate to unlimited.
image_tag_quota = 128 (Integer) Maximum number of tags allowed on an image. Negative values evaluate to unlimited.
limit_param_default = 25 (Integer) Default value for the number of items returned by a request if not specified explicitly in the request
memcached_servers = None (List) Memcached servers or None for in process cache.
metadata_encryption_key = None (String) AES key for encrypting store ‘location’ metadata. This includes, if used, Swift or S3 credentials. Should be set to a random string of length 16, 24 or 32 bytes
metadata_source_path = /etc/glance/metadefs/ (String) Path to the directory where json metadata files are stored
property_protection_file = None (String) The location of the property protection file.This file contains the rules for property protections and the roles/policies associated with it. If this config value is not specified, by default, property protections won’t be enforced. If a value is specified and the file is not found, then the glance-api service will not start.
property_protection_rule_format = roles (String) This config value indicates whether “roles” or “policies” are used in the property protection file.
show_image_direct_url = False (Boolean) Whether to include the backend image storage location in image properties. Revealing storage location can be a security risk, so use this setting with caution!
user_storage_quota = 0 (String) Set a system wide quota for every user. This value is the total capacity that a user can use across all storage systems. A value of 0 means unlimited.Optional unit can be specified for the value. Accepted units are B, KB, MB, GB and TB representing Bytes, KiloBytes, MegaBytes, GigaBytes and TeraBytes respectively. If no unit is specified then Bytes is assumed. Note that there should not be any space between value and unit and units are case sensitive.
workers = None (Integer) The number of child process workers that will be created to service requests. The default will be equal to the number of CPUs available.
[glance_store]  
rootwrap_config = /etc/glance/rootwrap.conf (String) Path to the rootwrap configuration file to use for running commands as root.
[image_format]  
container_formats = ami, ari, aki, bare, ovf, ova, docker (List) Supported values for the ‘container_format’ image attribute
disk_formats = ami, ari, aki, vhd, vmdk, raw, qcow2, vdi, iso (List) Supported values for the ‘disk_format’ image attribute
[keystone_authtoken]  
memcached_servers = None (List) Optionally specify a list of memcached server(s) to use for caching. If left undefined, tokens will instead be cached in-process.
[task]  
task_executor = taskflow (String) Specifies which task executor to be used to run the task scripts.
task_time_to_live = 48 (Integer) Time in hours for which a task lives after, either succeeding or failing
work_dir = None (String) Work dir for asynchronous task operations. The directory set here will be used to operate over images - normally before they are imported in the destination store. When providing work dir, make sure enough space is provided for concurrent tasks to run efficiently without running out of space. A rough estimation can be done by multiplying the number of max_workers - or the N of workers running - by an average image size (e.g 500MB). The image size estimation should be done based on the average size in your deployment. Note that depending on the tasks running you may need to multiply this number by some factor depending on what the task does. For example, you may want to double the available size if image conversion is enabled. All this being said, remember these are just estimations and you should do them based on the worst case scenario and be prepared to act in case they were wrong.
Description of CORS configuration options
Configuration option = Default value Description
[cors]  
allow_credentials = True (Boolean) Indicate that the actual request can include user credentials
allow_headers = Content-Type, Cache-Control, Content-Language, Expires, Last-Modified, Pragma (List) Indicate which header field names may be used during the actual request.
allow_methods = GET, POST, PUT, DELETE, OPTIONS (List) Indicate which methods can be used during the actual request.
allowed_origin = None (List) Indicate whether this resource may be shared with the domain received in the requests “origin” header.
expose_headers = Content-Type, Cache-Control, Content-Language, Expires, Last-Modified, Pragma (List) Indicate which headers are safe to expose to the API. Defaults to HTTP Simple Headers.
max_age = 3600 (Integer) Maximum cache age of CORS preflight requests.
[cors.subdomain]  
allow_credentials = True (Boolean) Indicate that the actual request can include user credentials
allow_headers = Content-Type, Cache-Control, Content-Language, Expires, Last-Modified, Pragma (List) Indicate which header field names may be used during the actual request.
allow_methods = GET, POST, PUT, DELETE, OPTIONS (List) Indicate which methods can be used during the actual request.
allowed_origin = None (List) Indicate whether this resource may be shared with the domain received in the requests “origin” header.
expose_headers = Content-Type, Cache-Control, Content-Language, Expires, Last-Modified, Pragma (List) Indicate which headers are safe to expose to the API. Defaults to HTTP Simple Headers.
max_age = 3600 (Integer) Maximum cache age of CORS preflight requests.
Description of database configuration options
Configuration option = Default value Description
[database]  
backend = sqlalchemy (String) The back end to use for the database.
connection = None (String) The SQLAlchemy connection string to use to connect to the database.
connection_debug = 0 (Integer) Verbosity of SQL debugging information: 0=None, 100=Everything.
connection_trace = False (Boolean) Add Python stack traces to SQL as comment strings.
db_inc_retry_interval = True (Boolean) If True, increases the interval between retries of a database operation up to db_max_retry_interval.
db_max_retries = 20 (Integer) Maximum retries in case of connection error or deadlock error before error is raised. Set to -1 to specify an infinite retry count.
db_max_retry_interval = 10 (Integer) If db_inc_retry_interval is set, the maximum seconds between retries of a database operation.
db_retry_interval = 1 (Integer) Seconds between retries of a database transaction.
idle_timeout = 3600 (Integer) Timeout before idle SQL connections are reaped.
max_overflow = 50 (Integer) If set, use this value for max_overflow with SQLAlchemy.
max_pool_size = None (Integer) Maximum number of SQL connections to keep open in a pool.
max_retries = 10 (Integer) Maximum number of database connection retries during startup. Set to -1 to specify an infinite retry count.
min_pool_size = 1 (Integer) Minimum number of SQL connections to keep open in a pool.
mysql_sql_mode = TRADITIONAL (String) The SQL mode to be used for MySQL sessions. This option, including the default, overrides any server-set SQL mode. To use whatever SQL mode is set by the server configuration, set this to no value. Example: mysql_sql_mode=
pool_timeout = None (Integer) If set, use this value for pool_timeout with SQLAlchemy.
retry_interval = 10 (Integer) Interval between retries of opening a SQL connection.
slave_connection = None (String) The SQLAlchemy connection string to use to connect to the slave database.
sqlite_db = oslo.sqlite (String) The file name to use with SQLite.
sqlite_synchronous = True (Boolean) If True, SQLite uses synchronous mode.
use_db_reconnect = False (Boolean) Enable the experimental use of database reconnect on connection lost.
Description of flagmappings configuration options
Configuration option = Default value Description
[DEFAULT]  
delayed_delete = False (Boolean) Turn on/off delayed delete.
image_cache_dir = None (String) Base directory that the image cache uses.
image_cache_driver = sqlite (String) The driver to use for image cache management.
image_cache_max_size = 10737418240 (Integer) The upper limit (the maximum size of accumulated cache in bytes) beyond which the cache pruner, if running, starts cleaning the image cache.
image_cache_sqlite_db = cache.db (String) The path to the sqlite file database that will be used for image cache management.
image_cache_stall_time = 86400 (Integer) The amount of time to let an incomplete image remain in the cache, before the cache cleaner, if running, will remove the incomplete image.
scrub_pool_size = 1 (Integer) The size of thread pool to be used for scrubbing images. The default is one, which signifies serial scrubbing. Any value above one indicates the max number of images that may be scrubbed in parallel.
scrub_time = 0 (Integer) The amount of time in seconds to delay before performing a delete.
Description of logging configuration options
Configuration option = Default value Description
[DEFAULT]  
debug = False (Boolean) If set to true, the logging level will be set to DEBUG instead of the default INFO level.
default_log_levels = amqp=WARN, amqplib=WARN, boto=WARN, qpid=WARN, sqlalchemy=WARN, suds=INFO, oslo.messaging=INFO, iso8601=WARN, requests.packages.urllib3.connectionpool=WARN, urllib3.connectionpool=WARN, websocket=WARN, requests.packages.urllib3.util.retry=WARN, urllib3.util.retry=WARN, keystonemiddleware=WARN, routes.middleware=WARN, stevedore=WARN, taskflow=WARN, keystoneauth=WARN, oslo.cache=INFO, dogpile.core.dogpile=INFO (List) List of package logging levels in logger=LEVEL pairs. This option is ignored if log_config_append is set.
fatal_deprecations = False (Boolean) Enables or disables fatal status of deprecations.
instance_format = "[instance: %(uuid)s] " (String) The format for an instance that is passed with the log message.
instance_uuid_format = "[instance: %(uuid)s] " (String) The format for an instance UUID that is passed with the log message.
log_config_append = None (String) The name of a logging configuration file. This file is appended to any existing logging configuration files. For details about logging configuration files, see the Python logging module documentation. Note that when logging configuration files are used then all logging configuration is set in the configuration file and other logging configuration options are ignored (for example, logging_context_format_string).
log_date_format = %Y-%m-%d %H:%M:%S (String) Defines the format string for %%(asctime)s in log records. Default: %(default)s . This option is ignored if log_config_append is set.
log_dir = None (String) (Optional) The base directory used for relative log_file paths. This option is ignored if log_config_append is set.
log_file = None (String) (Optional) Name of log file to send logging output to. If no default is set, logging will go to stderr as defined by use_stderr. This option is ignored if log_config_append is set.
logging_context_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s (String) Format string to use for log messages with context.
logging_debug_format_suffix = %(funcName)s %(pathname)s:%(lineno)d (String) Additional data to append to log message when logging level for the message is DEBUG.
logging_default_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s (String) Format string to use for log messages when context is undefined.
logging_exception_prefix = %(asctime)s.%(msecs)03d %(process)d ERROR %(name)s %(instance)s (String) Prefix each line of exception output with this format.
logging_user_identity_format = %(user)s %(tenant)s %(domain)s %(user_domain)s %(project_domain)s (String) Defines the format string for %(user_identity)s that is used in logging_context_format_string.
publish_errors = False (Boolean) Enables or disables publication of error events.
syslog_log_facility = LOG_USER (String) Syslog facility to receive log lines. This option is ignored if log_config_append is set.
use_stderr = True (Boolean) Log output to standard error. This option is ignored if log_config_append is set.
use_syslog = False (Boolean) Use syslog for logging. Existing syslog format is DEPRECATED and will be changed later to honor RFC5424. This option is ignored if log_config_append is set.
verbose = True (Boolean) DEPRECATED: If set to false, the logging level will be set to WARNING instead of the default INFO level.
watch_log_file = False (Boolean) Uses logging handler designed to watch file system. When log file is moved or removed this handler will open a new log file with specified path instantaneously. It makes sense only if log_file option is specified and Linux platform is used. This option is ignored if log_config_append is set.
Description of policy configuration options
Configuration option = Default value Description
[oslo_policy]  
policy_default_rule = default (String) Default rule. Enforced when a requested rule is not found.
policy_dirs = ['policy.d'] (Multi-valued) Directories where policy configuration files are stored. They can be relative to any directory in the search path defined by the config_dir option, or absolute paths. The file defined by policy_file must exist for these directories to be searched. Missing or empty directories are ignored.
policy_file = policy.json (String) The JSON file that defines policies.
Description of profiler configuration options
Configuration option = Default value Description
[profiler]  
enabled = False (Boolean) If False fully disable profiling feature.
hmac_keys = SECRET_KEY (String) Secret key to use to sign Glance API and Glance Registry services tracing messages.
trace_sqlalchemy = False (Boolean) If False doesn’t trace SQL requests.
Description of Redis configuration options
Configuration option = Default value Description
[matchmaker_redis]  
check_timeout = 20000 (Integer) Time in ms to wait before the transaction is killed.
host = 127.0.0.1 (String) Host to locate redis.
password = (String) Password for Redis server (optional).
port = 6379 (Port number) Use this port to connect to redis host.
sentinel_group_name = oslo-messaging-zeromq (String) Redis replica set name.
sentinel_hosts = (List) List of Redis Sentinel hosts (fault tolerance mode) e.g. [host:port, host1:port ... ]
socket_timeout = 1000 (Integer) Timeout in ms on blocking socket operations
wait_timeout = 500 (Integer) Time in ms to wait between connection attempts.
Description of registry configuration options
Configuration option = Default value Description
[DEFAULT]  
admin_password = None (String) DEPRECATED: The administrators password. If “use_user_token” is not in effect, then admin credentials can be specified. This option was considered harmful and has been deprecated in M release. It will be removed in O release. For more information read OSSN-0060. Related functionality with uploading big images has been implemented with Keystone trusts support.
admin_tenant_name = None (String) DEPRECATED: The tenant name of the administrative user. If “use_user_token” is not in effect, then admin tenant name can be specified. This option was considered harmful and has been deprecated in M release. It will be removed in O release. For more information read OSSN-0060. Related functionality with uploading big images has been implemented with Keystone trusts support.
admin_user = None (String) DEPRECATED: The administrators user name. If “use_user_token” is not in effect, then admin credentials can be specified. This option was considered harmful and has been deprecated in M release. It will be removed in O release. For more information read OSSN-0060. Related functionality with uploading big images has been implemented with Keystone trusts support.
auth_region = None (String) DEPRECATED: The region for the authentication service. If “use_user_token” is not in effect and using keystone auth, then region name can be specified. This option was considered harmful and has been deprecated in M release. It will be removed in O release. For more information read OSSN-0060. Related functionality with uploading big images has been implemented with Keystone trusts support.
auth_strategy = noauth (String) DEPRECATED: The strategy to use for authentication. If “use_user_token” is not in effect, then auth strategy can be specified. This option was considered harmful and has been deprecated in M release. It will be removed in O release. For more information read OSSN-0060. Related functionality with uploading big images has been implemented with Keystone trusts support.
auth_url = None (String) DEPRECATED: The URL to the keystone service. If “use_user_token” is not in effect and using keystone auth, then URL of keystone can be specified. This option was considered harmful and has been deprecated in M release. It will be removed in O release. For more information read OSSN-0060. Related functionality with uploading big images has been implemented with Keystone trusts support.
registry_client_ca_file = None (String) The path to the certifying authority cert file to use in SSL connections to the registry server, if any. Alternately, you may set the GLANCE_CLIENT_CA_FILE environment variable to a filepath of the CA cert file.
registry_client_cert_file = None (String) The path to the cert file to use in SSL connections to the registry server, if any. Alternately, you may set the GLANCE_CLIENT_CERT_FILE environment variable to a filepath of the CA cert file
registry_client_insecure = False (Boolean) When using SSL in connections to the registry server, do not require validation via a certifying authority. This is the registry’s equivalent of specifying –insecure on the command line using glanceclient for the API.
registry_client_key_file = None (String) The path to the key file to use in SSL connections to the registry server, if any. Alternately, you may set the GLANCE_CLIENT_KEY_FILE environment variable to a filepath of the key file
registry_client_protocol = http (String) The protocol to use for communication with the registry server. Either http or https.
registry_client_timeout = 600 (Integer) The period of time, in seconds, that the API server will wait for a registry request to complete. A value of 0 implies no timeout.
registry_host = 0.0.0.0 (String) Address to find the registry server.
registry_port = 9191 (Port number) Port the registry server is listening on.
Description of replicator configuration options
Configuration option = Default value Description
[DEFAULT]  
args = None (List) Arguments for the command
chunksize = 65536 (Integer) Amount of data to transfer per HTTP write.
command = None (String) Command to be given to replicator
dontreplicate = created_at date deleted_at location updated_at (String) List of fields to not replicate.
mastertoken = (String) Pass in your authentication token if you have one. This is the token used for the master.
metaonly = False (Boolean) Only replicate metadata, not images.
slavetoken = (String) Pass in your authentication token if you have one. This is the token used for the slave.
token = (String) Pass in your authentication token if you have one. If you use this option the same token is used for both the master and the slave.
Description of scrubber configuration options
Configuration option = Default value Description
[DEFAULT]  
wakeup_time = 300 (Integer) Loop time between checking for new items to schedule for delete.
Description of TaskFlow configuration options
Configuration option = Default value Description
[taskflow_executor]  
conversion_format = None (String) The format to which images will be automatically converted. When using the RBD backend, this should be set to ‘raw’
engine_mode = parallel (String) The mode in which the engine will run. Can be ‘serial’ or ‘parallel’.
max_workers = 10 (Integer) The number of parallel activities executed at the same time by the engine. The value can be greater than one when the engine mode is ‘parallel’.
Description of testing configuration options
Configuration option = Default value Description
[DEFAULT]  
pydev_worker_debug_host = None (String) The hostname/IP of the pydev process listening for debug connections
pydev_worker_debug_port = 5678 (Port number) The port on which a pydev process is listening for connections.
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.