2014cdb906
Preventing access to expired objects ------------------------------------ Re-enabled accepting X-Delete-At and X-Delete-After headers. During a GET on an expired object, DiskFileExpired is raised by DiskFile class. This will result in object-server returning HTTPNotFound (404) to the client. Tracking objects to be deleted ------------------------------ Objects to be deleted are tracked using "tracker objects". These are PUT into a special account(a volume, for now). These zero size "tracker objects" have names that contain: * Expiration timestamp * Path of the actual object to be deleted Deleting actual objects from GlusterFS volume --------------------------------------------- The object-expirer daemon runs a pass once every X seconds. For every pass it makes, it queries the special account for "tracker objects". Based on (timestamp, path) present in name of "tracker objects", object-expirer then deletes the actual object and the corresponding tracker object. To run object-expirer forever: swift-init object-expirer start To run just once: swift-object-expirer -o -v /etc/swift/object-expirer.conf Caveat/Limitation: Object-expirer needs a separate account(volume) that is not used by other services like gswauth. By default, this volume is named "gsexpiring" and is configurable. More info about object expiration: http://docs.openstack.org/developer/swift/overview_expiring_objects.html Change-Id: I876995bf4f16ef4bfdff901561e0558ecf1dc38f Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/6891 Tested-by: Chetan Risbud <crisbud@redhat.com> Reviewed-by: pushpesh sharma <psharma@redhat.com> Tested-by: pushpesh sharma <psharma@redhat.com> Reviewed-by: Chetan Risbud <crisbud@redhat.com>
71 lines
2.7 KiB
Plaintext
71 lines
2.7 KiB
Plaintext
[DEFAULT]
|
|
bind_port = 8080
|
|
user = root
|
|
# Consider using 1 worker per CPU
|
|
workers = 1
|
|
|
|
[pipeline:main]
|
|
pipeline = catch_errors healthcheck proxy-logging cache proxy-logging proxy-server
|
|
|
|
[app:proxy-server]
|
|
use = egg:gluster_swift#proxy
|
|
log_facility = LOG_LOCAL1
|
|
log_level = WARN
|
|
# The API allows for account creation and deletion, but since Gluster/Swift
|
|
# automounts a Gluster volume for a given account, there is no way to create
|
|
# or delete an account. So leave this off.
|
|
allow_account_management = false
|
|
account_autocreate = true
|
|
# The following parameters are used by object-expirer and needs to be same
|
|
# across all conf files!
|
|
auto_create_account_prefix = gs
|
|
expiring_objects_account_name = expiring
|
|
# Ensure the proxy server uses fast-POSTs since we don't need to make a copy
|
|
# of the entire object given that all metadata is stored in the object
|
|
# extended attributes (no .meta file used after creation) and no container
|
|
# sync feature to present.
|
|
object_post_as_copy = false
|
|
# Only need to recheck the account exists once a day
|
|
recheck_account_existence = 86400
|
|
# May want to consider bumping this up if containers are created and destroyed
|
|
# infrequently.
|
|
recheck_container_existence = 60
|
|
# Timeout clients that don't read or write to the proxy server after 5
|
|
# seconds.
|
|
client_timeout = 5
|
|
# Give more time to connect to the object, container or account servers in
|
|
# cases of high load.
|
|
conn_timeout = 5
|
|
# For high load situations, once connected to an object, container or account
|
|
# server, allow for delays communicating with them.
|
|
node_timeout = 60
|
|
# May want to consider bumping up this value to 1 - 4 MB depending on how much
|
|
# traffic is for multi-megabyte or gigabyte requests; perhaps matching the
|
|
# stripe width (not stripe element size) of your storage volume is a good
|
|
# starting point. See below for sizing information.
|
|
object_chunk_size = 65536
|
|
# If you do decide to increase the object_chunk_size, then consider lowering
|
|
# this value to one. Up to "put_queue_length" object_chunk_size'd buffers can
|
|
# be queued to the object server for processing. Given one proxy server worker
|
|
# can handle up to 1,024 connections, by default, it will consume 10 * 65,536
|
|
# * 1,024 bytes of memory in the worse case (default values). Be sure the
|
|
# amount of memory available on the system can accommodate increased values
|
|
# for object_chunk_size.
|
|
put_queue_depth = 10
|
|
|
|
[filter:catch_errors]
|
|
use = egg:swift#catch_errors
|
|
|
|
[filter:proxy-logging]
|
|
use = egg:swift#proxy_logging
|
|
access_log_level = WARN
|
|
|
|
[filter:healthcheck]
|
|
use = egg:swift#healthcheck
|
|
|
|
[filter:cache]
|
|
use = egg:swift#memcache
|
|
# Update this line to contain a comma separated list of memcache servers
|
|
# shared by all nodes running the proxy-server service.
|
|
memcache_servers = localhost:11211
|