843d43355a
Prior to this change, images were being scrubbed serially while the image locations, if multiple, were being scrubbed parallely. For the general case, this may not achieve much performance gain as the number of images is likely to be more than the number of image locations per image. Hence, this change attempts to parallelize image scrubbing while leaving image locations to be scrubbed serially. Also, though eventlet greenpool was being used, greening the world wasn't done. As is, it's unlikely to achieve the intended gains. So, this change also monkey patches essential python modules. Finally, this change also makes the pool size configurable. This offers the flexibility to choose between serial or parallel scrubbing. Also, parallel scrubbing can be regulated to a desired level by altering the pool size. DocImpact Implements: blueprint scrub-images-in-parallel Change-Id: I5f18a70cd427e2c1e19a6bddeff317a46396eecc
140 lines
4.4 KiB
Plaintext
140 lines
4.4 KiB
Plaintext
[DEFAULT]
|
|
# Show more verbose log output (sets INFO log level output)
|
|
#verbose = False
|
|
|
|
# Show debugging output in logs (sets DEBUG log level output)
|
|
#debug = False
|
|
|
|
# Log to this file. Make sure you do not set the same log file for both the API
|
|
# and registry servers!
|
|
#
|
|
# If `log_file` is omitted and `use_syslog` is false, then log messages are
|
|
# sent to stdout as a fallback.
|
|
log_file = /var/log/glance/scrubber.log
|
|
|
|
# Send logs to syslog (/dev/log) instead of to file specified by `log_file`
|
|
#use_syslog = False
|
|
|
|
# Should we run our own loop or rely on cron/scheduler to run us
|
|
daemon = False
|
|
|
|
# Loop time between checking for new items to schedule for delete
|
|
wakeup_time = 300
|
|
|
|
# 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_pool_size = 1
|
|
|
|
# Directory that the scrubber will use to remind itself of what to delete
|
|
# Make sure this is also set in glance-api.conf
|
|
scrubber_datadir = /var/lib/glance/scrubber
|
|
|
|
# DEPRECATED. TO BE REMOVED IN THE LIBERTY RELEASE.
|
|
# Only one server in your deployment should be designated the cleanup host
|
|
cleanup_scrubber = False
|
|
|
|
# DEPRECATED. TO BE REMOVED IN THE LIBERTY RELEASE.
|
|
# pending_delete items older than this time are candidates for cleanup
|
|
cleanup_scrubber_time = 86400
|
|
|
|
# Address to find the registry server for cleanups
|
|
registry_host = 0.0.0.0
|
|
|
|
# Port the registry server is listening on
|
|
registry_port = 9191
|
|
|
|
# Auth settings if using Keystone
|
|
# auth_url = http://127.0.0.1:5000/v2.0/
|
|
# admin_tenant_name = %SERVICE_TENANT_NAME%
|
|
# admin_user = %SERVICE_USER%
|
|
# admin_password = %SERVICE_PASSWORD%
|
|
|
|
# API to use for accessing data. Default value points to sqlalchemy
|
|
# package, it is also possible to use: glance.db.registry.api
|
|
#data_api = glance.db.sqlalchemy.api
|
|
|
|
# ================= Security Options ==========================
|
|
|
|
# AES key for encrypting store 'location' metadata, including
|
|
# -- if used -- Swift or S3 credentials
|
|
# Should be set to a random string of length 16, 24 or 32 bytes
|
|
#metadata_encryption_key = <16, 24 or 32 char registry metadata key>
|
|
|
|
# =============== Policy Options ==============================
|
|
|
|
# The JSON file that defines policies.
|
|
#policy_file = policy.json
|
|
|
|
# Default rule. Enforced when a requested rule is not found.
|
|
#policy_default_rule = default
|
|
|
|
# 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.
|
|
#policy_dirs = policy.d
|
|
|
|
# ================= Database Options ===============+==========
|
|
|
|
[database]
|
|
|
|
# The SQLAlchemy connection string used to connect to the
|
|
# database (string value)
|
|
#connection=sqlite:////glance/openstack/common/db/$sqlite_db
|
|
|
|
# The SQLAlchemy connection string used to connect to the
|
|
# slave database (string value)
|
|
#slave_connection=
|
|
|
|
# timeout before idle sql connections are reaped (integer
|
|
# value)
|
|
#idle_timeout=3600
|
|
|
|
# Minimum number of SQL connections to keep open in a pool
|
|
# (integer value)
|
|
#min_pool_size=1
|
|
|
|
# Maximum number of SQL connections to keep open in a pool
|
|
# (integer value)
|
|
#max_pool_size=<None>
|
|
|
|
# maximum db connection retries during startup. (setting -1
|
|
# implies an infinite retry count) (integer value)
|
|
#max_retries=10
|
|
|
|
# interval between retries of opening a sql connection
|
|
# (integer value)
|
|
#retry_interval=10
|
|
|
|
# If set, use this value for max_overflow with sqlalchemy
|
|
# (integer value)
|
|
#max_overflow=<None>
|
|
|
|
# Verbosity of SQL debugging information. 0=None,
|
|
# 100=Everything (integer value)
|
|
#connection_debug=0
|
|
|
|
# Add python stack traces to SQL as comment strings (boolean
|
|
# value)
|
|
#connection_trace=false
|
|
|
|
# If set, use this value for pool_timeout with sqlalchemy
|
|
# (integer value)
|
|
#pool_timeout=<None>
|
|
|
|
[oslo_concurrency]
|
|
|
|
# Enables or disables inter-process locks. (boolean value)
|
|
# Deprecated group/name - [DEFAULT]/disable_process_locking
|
|
#disable_process_locking = false
|
|
|
|
# Directory to use for lock files. For security, the specified
|
|
# directory should only be writable by the user running the processes
|
|
# that need locking. It could be read from environment variable
|
|
# OSLO_LOCK_PATH. This setting needs to be the same for both
|
|
# glance-scrubber and glance-api service. Default to a temp directory.
|
|
# Deprecated group/name - [DEFAULT]/lock_path (string value)
|
|
#lock_path = /tmp
|