Make .expiring_objects account name configurable
The account which tracks objects scheduled for deletion had its name hard-coded to 'expiring_objects'. This is made configurable via expiring_objects_account_name option. Backend file-systems integration efforts may want to treat these "special" accounts in a different way. This would still go undocumented, hence 'pseudo-hidden'. UpgradeImpact: None as the default value would continue to be the same which is '.expiring_objects'. Change-Id: I1a093b0d0e2bdd0c3d723090af03fc0adf2ad7e3 Signed-off-by: Prashanth Pai <ppai@redhat.com>
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
[object-expirer]
|
[object-expirer]
|
||||||
# interval = 300
|
# interval = 300
|
||||||
# auto_create_account_prefix = .
|
# auto_create_account_prefix = .
|
||||||
|
# expiring_objects_account_name = expiring_objects
|
||||||
# report_interval = 300
|
# report_interval = 300
|
||||||
# concurrency is the level of concurrency o use to do the work, this value
|
# concurrency is the level of concurrency o use to do the work, this value
|
||||||
# must be set to at least 1
|
# must be set to at least 1
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
# mount_check = true
|
# mount_check = true
|
||||||
# disable_fallocate = false
|
# disable_fallocate = false
|
||||||
# expiring_objects_container_divisor = 86400
|
# expiring_objects_container_divisor = 86400
|
||||||
|
# expiring_objects_account_name = expiring_objects
|
||||||
#
|
#
|
||||||
# Use an integer to override the number of pre-forked processes that will
|
# Use an integer to override the number of pre-forked processes that will
|
||||||
# accept connections.
|
# accept connections.
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
# key_file = /etc/swift/proxy.key
|
# key_file = /etc/swift/proxy.key
|
||||||
#
|
#
|
||||||
# expiring_objects_container_divisor = 86400
|
# expiring_objects_container_divisor = 86400
|
||||||
|
# expiring_objects_account_name = expiring_objects
|
||||||
#
|
#
|
||||||
# You can specify default log routing here if you want:
|
# You can specify default log routing here if you want:
|
||||||
# log_name = swift
|
# log_name = swift
|
||||||
|
@@ -44,7 +44,7 @@ class ObjectExpirer(Daemon):
|
|||||||
self.interval = int(conf.get('interval') or 300)
|
self.interval = int(conf.get('interval') or 300)
|
||||||
self.expiring_objects_account = \
|
self.expiring_objects_account = \
|
||||||
(conf.get('auto_create_account_prefix') or '.') + \
|
(conf.get('auto_create_account_prefix') or '.') + \
|
||||||
'expiring_objects'
|
(conf.get('expiring_objects_account_name') or 'expiring_objects')
|
||||||
conf_path = conf.get('__file__') or '/etc/swift/object-expirer.conf'
|
conf_path = conf.get('__file__') or '/etc/swift/object-expirer.conf'
|
||||||
request_tries = int(conf.get('request_tries') or 3)
|
request_tries = int(conf.get('request_tries') or 3)
|
||||||
self.swift = InternalClient(conf_path,
|
self.swift = InternalClient(conf_path,
|
||||||
|
@@ -92,7 +92,7 @@ class ObjectController(object):
|
|||||||
self.allowed_headers.add(header)
|
self.allowed_headers.add(header)
|
||||||
self.expiring_objects_account = \
|
self.expiring_objects_account = \
|
||||||
(conf.get('auto_create_account_prefix') or '.') + \
|
(conf.get('auto_create_account_prefix') or '.') + \
|
||||||
'expiring_objects'
|
(conf.get('expiring_objects_account_name') or 'expiring_objects')
|
||||||
self.expiring_objects_container_divisor = \
|
self.expiring_objects_container_divisor = \
|
||||||
int(conf.get('expiring_objects_container_divisor') or 86400)
|
int(conf.get('expiring_objects_container_divisor') or 86400)
|
||||||
# Initialization was successful, so now apply the network chunk size
|
# Initialization was successful, so now apply the network chunk size
|
||||||
|
@@ -109,7 +109,7 @@ class Application(object):
|
|||||||
config_true_value(conf.get('account_autocreate', 'no'))
|
config_true_value(conf.get('account_autocreate', 'no'))
|
||||||
self.expiring_objects_account = \
|
self.expiring_objects_account = \
|
||||||
(conf.get('auto_create_account_prefix') or '.') + \
|
(conf.get('auto_create_account_prefix') or '.') + \
|
||||||
'expiring_objects'
|
(conf.get('expiring_objects_account_name') or 'expiring_objects')
|
||||||
self.expiring_objects_container_divisor = \
|
self.expiring_objects_container_divisor = \
|
||||||
int(conf.get('expiring_objects_container_divisor') or 86400)
|
int(conf.get('expiring_objects_container_divisor') or 86400)
|
||||||
self.max_containers_per_account = \
|
self.max_containers_per_account = \
|
||||||
|
Reference in New Issue
Block a user