Patch for Swift Solaris (Illumos) compability.
* Add new configuration option log_address. Change-Id: I636bd4116687629c997b70a0d804b7ed4bc46032
This commit is contained in:
parent
95786e577c
commit
13e4de1899
@ -112,6 +112,8 @@ Syslog log facility. The default is LOG_LOCAL0.
|
|||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
.IP "\fB set log_requests\fR
|
.IP "\fB set log_requests\fR
|
||||||
Enables request logging. The default is True.
|
Enables request logging. The default is True.
|
||||||
|
.IP "\fB set log_address\fR
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.RE
|
.RE
|
||||||
.PD
|
.PD
|
||||||
|
|
||||||
@ -148,7 +150,9 @@ Label used when logging. The default is account-replicator.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP \fBlog_level\fR
|
.IP \fBlog_level\fR
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
.IP \fBvm_test_mode\fR
|
.IP \fBlog_address\fR
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
|
.IP \fBvm_test_mode\fR
|
||||||
Indicates that you are using a VM environment. The default is no.
|
Indicates that you are using a VM environment. The default is no.
|
||||||
.IP \fBper_diff\fR
|
.IP \fBper_diff\fR
|
||||||
The default is 1000.
|
The default is 1000.
|
||||||
@ -187,6 +191,8 @@ Label used when logging. The default is account-auditor.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP \fBlog_level\fR
|
.IP \fBlog_level\fR
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
|
.IP \fBlog_address\fR
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.IP \fBinterval\fR
|
.IP \fBinterval\fR
|
||||||
Will audit, at most, 1 account per device per interval. The default is 1800 seconds.
|
Will audit, at most, 1 account per device per interval. The default is 1800 seconds.
|
||||||
.RE
|
.RE
|
||||||
@ -203,6 +209,8 @@ Label used when logging. The default is account-reaper.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP \fBlog_level\fR
|
.IP \fBlog_level\fR
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
|
.IP \fBlog_address\fR
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.IP \fBconcurrency\fR
|
.IP \fBconcurrency\fR
|
||||||
Number of reaper workers to spawn. The default is 25.
|
Number of reaper workers to spawn. The default is 25.
|
||||||
.IP \fBinterval\fR
|
.IP \fBinterval\fR
|
||||||
@ -216,7 +224,7 @@ Connection timeout to external services. The default is 0.5 seconds.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.SH DOCUMENTATION
|
.SH DOCUMENTATION
|
||||||
.LP
|
.LP
|
||||||
More in depth documentation about the swift-account-server and
|
More in depth documentation about the swift-account-server and
|
||||||
|
@ -76,6 +76,8 @@ Label used when logging. The default is swift.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP \fBlog_level\fR
|
.IP \fBlog_level\fR
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
|
.IP \fBlog_address\fR
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.RE
|
.RE
|
||||||
.PD
|
.PD
|
||||||
|
|
||||||
@ -112,6 +114,8 @@ Syslog log facility. The default is LOG_LOCAL0.
|
|||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
.IP "\fB set log_requests\fR
|
.IP "\fB set log_requests\fR
|
||||||
Enables request logging. The default is True.
|
Enables request logging. The default is True.
|
||||||
|
.IP "\fB set log_address\fR
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.IP \fBnode_timeout\fR
|
.IP \fBnode_timeout\fR
|
||||||
Request timeout to external services. The default is 3 seconds.
|
Request timeout to external services. The default is 3 seconds.
|
||||||
.IP \fBconn_timeout\fR
|
.IP \fBconn_timeout\fR
|
||||||
@ -152,6 +156,8 @@ Label used when logging. The default is container-replicator.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP \fBlog_level\fR
|
.IP \fBlog_level\fR
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
|
.IP \fBlog_address\fR
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.IP \fBvm_test_mode\fR
|
.IP \fBvm_test_mode\fR
|
||||||
Indicates that you are using a VM environment. The default is no.
|
Indicates that you are using a VM environment. The default is no.
|
||||||
.IP \fBer_diff\fR
|
.IP \fBer_diff\fR
|
||||||
@ -184,6 +190,8 @@ Label used when logging. The default is container-updater.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP \fBlog_level\fR
|
.IP \fBlog_level\fR
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
|
.IP \fBlog_address\fR
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.IP \fBinterval\fR
|
.IP \fBinterval\fR
|
||||||
Minimum time for a pass to take. The default is 300 seconds.
|
Minimum time for a pass to take. The default is 300 seconds.
|
||||||
.IP \fBconcurrency\fR
|
.IP \fBconcurrency\fR
|
||||||
@ -210,6 +218,8 @@ Label used when logging. The default is container-auditor.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP \fBlog_level\fR
|
.IP \fBlog_level\fR
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
|
.IP \fBlog_address\fR
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.IP \fBinterval\fR
|
.IP \fBinterval\fR
|
||||||
Will audit, at most, 1 container per device per interval. The default is 1800 seconds.
|
Will audit, at most, 1 container per device per interval. The default is 1800 seconds.
|
||||||
.RE
|
.RE
|
||||||
@ -226,6 +236,8 @@ Label used when logging. The default is container-sync.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP \fBlog_level\fR
|
.IP \fBlog_level\fR
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
|
.IP \fBlog_address\fR
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.IP \fBsync_proxy\fR
|
.IP \fBsync_proxy\fR
|
||||||
If you need to use an HTTP Proxy, set it here; defaults to no proxy.
|
If you need to use an HTTP Proxy, set it here; defaults to no proxy.
|
||||||
.IP \fBinterval\fR
|
.IP \fBinterval\fR
|
||||||
|
@ -63,6 +63,8 @@ Label used when logging. The default is swift.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP \fBlog_level\fR
|
.IP \fBlog_level\fR
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
|
.IP \fBlog_address\fR
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.RE
|
.RE
|
||||||
.PD
|
.PD
|
||||||
|
|
||||||
|
@ -76,6 +76,8 @@ Label used when logging. The default is swift.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP \fBlog_level\fR
|
.IP \fBlog_level\fR
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
|
.IP \fBlog_address\fR
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.RE
|
.RE
|
||||||
.PD
|
.PD
|
||||||
|
|
||||||
@ -112,7 +114,9 @@ Syslog log facility. The default is LOG_LOCAL0.
|
|||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
.IP "\fB set log_requests\fR
|
.IP "\fB set log_requests\fR
|
||||||
Enables request logging. The default is True.
|
Enables request logging. The default is True.
|
||||||
.IP \fBnode_timeout\fR
|
.IP "\fB set log_address\fR
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
|
.IP \fBnode_timeout\fR
|
||||||
Request timeout to external services. The default is 3 seconds.
|
Request timeout to external services. The default is 3 seconds.
|
||||||
.IP \fBconn_timeout\fR
|
.IP \fBconn_timeout\fR
|
||||||
Connection timeout to external services. The default is 0.5 seconds.
|
Connection timeout to external services. The default is 0.5 seconds.
|
||||||
@ -165,6 +169,8 @@ Label used when logging. The default is object-replicator.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP \fBlog_level\fR
|
.IP \fBlog_level\fR
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
|
.IP \fBlog_address\fR
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.IP \fBvm_test_mode\fR
|
.IP \fBvm_test_mode\fR
|
||||||
Indicates that you are using a VM environment. The default is no.
|
Indicates that you are using a VM environment. The default is no.
|
||||||
.IP \fBdaemonize\fR
|
.IP \fBdaemonize\fR
|
||||||
@ -206,6 +212,8 @@ Label used when logging. The default is object-updater.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP \fBlog_level\fR
|
.IP \fBlog_level\fR
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
|
.IP \fBlog_address\fR
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.IP \fBinterval\fR
|
.IP \fBinterval\fR
|
||||||
Minimum time for a pass to take. The default is 300 seconds.
|
Minimum time for a pass to take. The default is 300 seconds.
|
||||||
.IP \fBconcurrency\fR
|
.IP \fBconcurrency\fR
|
||||||
@ -230,6 +238,8 @@ Label used when logging. The default is object-auditor.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP \fBlog_level\fR
|
.IP \fBlog_level\fR
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
|
.IP \fBlog_address\fR
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
|
|
||||||
.IP \fBfiles_per_second\fR
|
.IP \fBfiles_per_second\fR
|
||||||
Maximum files audited per second. Should be tuned according to individual
|
Maximum files audited per second. Should be tuned according to individual
|
||||||
@ -245,7 +255,7 @@ The default is 50.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.SH DOCUMENTATION
|
.SH DOCUMENTATION
|
||||||
.LP
|
.LP
|
||||||
More in depth documentation about the swift-object-server and
|
More in depth documentation about the swift-object-server and
|
||||||
|
@ -76,6 +76,8 @@ Label used when logging. The default is swift.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP \fBlog_level\fR
|
.IP \fBlog_level\fR
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
|
.IP \fBlog_address\fR
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.RE
|
.RE
|
||||||
.PD
|
.PD
|
||||||
|
|
||||||
@ -124,6 +126,8 @@ Label used when logging. The default is tempauth.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP "\fBset log_level\fR "
|
.IP "\fBset log_level\fR "
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
|
.IP "\fBset log_address\fR"
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.IP "\fBset log_headers\fR "
|
.IP "\fBset log_headers\fR "
|
||||||
Enables the ability to log request headers. The default is False.
|
Enables the ability to log request headers. The default is False.
|
||||||
.IP \fBreseller_prefix\fR
|
.IP \fBreseller_prefix\fR
|
||||||
@ -179,6 +183,8 @@ Label used when logging. The default is healthcheck.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP "\fBset log_level\fR "
|
.IP "\fBset log_level\fR "
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
|
.IP "\fBset log_address\fR"
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.IP "\fBset log_headers\fR "
|
.IP "\fBset log_headers\fR "
|
||||||
Enables the ability to log request headers. The default is False.
|
Enables the ability to log request headers. The default is False.
|
||||||
.RE
|
.RE
|
||||||
@ -201,6 +207,8 @@ Label used when logging. The default is memcache.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP "\fBset log_level\fR "
|
.IP "\fBset log_level\fR "
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
|
.IP "\fBset log_address\fR"
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.IP "\fBset log_headers\fR "
|
.IP "\fBset log_headers\fR "
|
||||||
Enables the ability to log request headers. The default is False.
|
Enables the ability to log request headers. The default is False.
|
||||||
.IP \fBmemcache_servers\fR
|
.IP \fBmemcache_servers\fR
|
||||||
@ -225,6 +233,8 @@ Label used when logging. The default is ratelimit.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP "\fBset log_level\fR "
|
.IP "\fBset log_level\fR "
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
|
.IP "\fBset log_address\fR"
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.IP "\fBset log_headers\fR "
|
.IP "\fBset log_headers\fR "
|
||||||
Enables the ability to log request headers. The default is False.
|
Enables the ability to log request headers. The default is False.
|
||||||
.IP \fBclock_accuracy\fR
|
.IP \fBclock_accuracy\fR
|
||||||
@ -267,6 +277,8 @@ Entry point for paste.deploy for the domain_remap middleware. This is the refere
|
|||||||
The default is \fBegg:swift#domain_remap\fR.
|
The default is \fBegg:swift#domain_remap\fR.
|
||||||
.IP "\fBset log_name\fR"
|
.IP "\fBset log_name\fR"
|
||||||
Label used when logging. The default is domain_remap.
|
Label used when logging. The default is domain_remap.
|
||||||
|
.IP "\fBset log_address\fR"
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.IP "\fBset log_headers\fR"
|
.IP "\fBset log_headers\fR"
|
||||||
Enables the ability to log request headers. The default is False.
|
Enables the ability to log request headers. The default is False.
|
||||||
.IP \fBstorage_domain\fR
|
.IP \fBstorage_domain\fR
|
||||||
@ -298,6 +310,8 @@ Label used when logging. The default is catch_errors.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP "\fBset log_level\fR "
|
.IP "\fBset log_level\fR "
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
|
.IP "\fBset log_address\fR "
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.IP "\fBset log_headers\fR"
|
.IP "\fBset log_headers\fR"
|
||||||
Enables the ability to log request headers. The default is False.
|
Enables the ability to log request headers. The default is False.
|
||||||
.RE
|
.RE
|
||||||
@ -320,6 +334,8 @@ Label used when logging. The default is cname_lookup.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP "\fBset log_level\fR "
|
.IP "\fBset log_level\fR "
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
|
.IP "\fBset log_address\fR"
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.IP "\fBset log_headers\fR"
|
.IP "\fBset log_headers\fR"
|
||||||
Enables the ability to log request headers. The default is False.
|
Enables the ability to log request headers. The default is False.
|
||||||
.IP \fBstorage_domain\fR
|
.IP \fBstorage_domain\fR
|
||||||
@ -349,6 +365,8 @@ Label used when logging. The default is staticweb.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP "\fBset log_level\fR "
|
.IP "\fBset log_level\fR "
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
|
.IP "\fBset log_address\fR "
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.IP "\fBset log_headers\fR"
|
.IP "\fBset log_headers\fR"
|
||||||
Enables the ability to log request headers. The default is False.
|
Enables the ability to log request headers. The default is False.
|
||||||
.IP "\fBset access_log_name\fR"
|
.IP "\fBset access_log_name\fR"
|
||||||
@ -431,6 +449,8 @@ Label used when logging. The default is proxy-server.
|
|||||||
Syslog log facility. The default is LOG_LOCAL0.
|
Syslog log facility. The default is LOG_LOCAL0.
|
||||||
.IP "\fB set log_level\fR
|
.IP "\fB set log_level\fR
|
||||||
Logging level. The default is INFO.
|
Logging level. The default is INFO.
|
||||||
|
.IP "\fB set log_address\fR
|
||||||
|
Logging address. The default is /dev/log.
|
||||||
.IP "\fBset access_log_name\fR"
|
.IP "\fBset access_log_name\fR"
|
||||||
Label used when logging. The default is proxy-server.
|
Label used when logging. The default is proxy-server.
|
||||||
.IP "\fBset access_log_facility\fR"
|
.IP "\fBset access_log_facility\fR"
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
# log_name = swift
|
# log_name = swift
|
||||||
# log_facility = LOG_LOCAL0
|
# log_facility = LOG_LOCAL0
|
||||||
# log_level = INFO
|
# log_level = INFO
|
||||||
|
# log_address = /dev/log
|
||||||
# You can enable default statsD logging here and/or override it in sections
|
# You can enable default statsD logging here and/or override it in sections
|
||||||
# below:
|
# below:
|
||||||
# log_statsd_host = localhost
|
# log_statsd_host = localhost
|
||||||
@ -31,6 +32,7 @@ use = egg:swift#account
|
|||||||
# set log_facility = LOG_LOCAL0
|
# set log_facility = LOG_LOCAL0
|
||||||
# set log_level = INFO
|
# set log_level = INFO
|
||||||
# set log_requests = True
|
# set log_requests = True
|
||||||
|
# set log_address = /dev/log
|
||||||
# auto_create_account_prefix = .
|
# auto_create_account_prefix = .
|
||||||
|
|
||||||
[filter:recon]
|
[filter:recon]
|
||||||
@ -42,6 +44,7 @@ use = egg:swift#recon
|
|||||||
# log_name = account-replicator
|
# log_name = account-replicator
|
||||||
# log_facility = LOG_LOCAL0
|
# log_facility = LOG_LOCAL0
|
||||||
# log_level = INFO
|
# log_level = INFO
|
||||||
|
# log_address = /dev/log
|
||||||
# vm_test_mode = no
|
# vm_test_mode = no
|
||||||
# per_diff = 1000
|
# per_diff = 1000
|
||||||
# max_diffs = 100
|
# max_diffs = 100
|
||||||
@ -65,6 +68,7 @@ use = egg:swift#recon
|
|||||||
# log_name = account-auditor
|
# log_name = account-auditor
|
||||||
# log_facility = LOG_LOCAL0
|
# log_facility = LOG_LOCAL0
|
||||||
# log_level = INFO
|
# log_level = INFO
|
||||||
|
# log_address = /dev/log
|
||||||
# Will audit, at most, 1 account per device per interval
|
# Will audit, at most, 1 account per device per interval
|
||||||
# interval = 1800
|
# interval = 1800
|
||||||
# log_facility = LOG_LOCAL0
|
# log_facility = LOG_LOCAL0
|
||||||
@ -76,6 +80,7 @@ use = egg:swift#recon
|
|||||||
# log_name = account-reaper
|
# log_name = account-reaper
|
||||||
# log_facility = LOG_LOCAL0
|
# log_facility = LOG_LOCAL0
|
||||||
# log_level = INFO
|
# log_level = INFO
|
||||||
|
# log_address = /dev/log
|
||||||
# concurrency = 25
|
# concurrency = 25
|
||||||
# interval = 3600
|
# interval = 3600
|
||||||
# node_timeout = 10
|
# node_timeout = 10
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
# log_name = swift
|
# log_name = swift
|
||||||
# log_facility = LOG_LOCAL0
|
# log_facility = LOG_LOCAL0
|
||||||
# log_level = INFO
|
# log_level = INFO
|
||||||
|
# log_address = /dev/log
|
||||||
# You can enable default statsD logging here and/or override it in sections
|
# You can enable default statsD logging here and/or override it in sections
|
||||||
# below:
|
# below:
|
||||||
# log_statsd_host = localhost
|
# log_statsd_host = localhost
|
||||||
@ -34,6 +35,7 @@ use = egg:swift#container
|
|||||||
# set log_facility = LOG_LOCAL0
|
# set log_facility = LOG_LOCAL0
|
||||||
# set log_level = INFO
|
# set log_level = INFO
|
||||||
# set log_requests = True
|
# set log_requests = True
|
||||||
|
# set log_address = /dev/log
|
||||||
# node_timeout = 3
|
# node_timeout = 3
|
||||||
# conn_timeout = 0.5
|
# conn_timeout = 0.5
|
||||||
# allow_versions = False
|
# allow_versions = False
|
||||||
@ -48,6 +50,7 @@ use = egg:swift#recon
|
|||||||
# log_name = container-replicator
|
# log_name = container-replicator
|
||||||
# log_facility = LOG_LOCAL0
|
# log_facility = LOG_LOCAL0
|
||||||
# log_level = INFO
|
# log_level = INFO
|
||||||
|
# log_address = /dev/log
|
||||||
# vm_test_mode = no
|
# vm_test_mode = no
|
||||||
# per_diff = 1000
|
# per_diff = 1000
|
||||||
# max_diffs = 100
|
# max_diffs = 100
|
||||||
@ -66,6 +69,7 @@ use = egg:swift#recon
|
|||||||
# log_name = container-updater
|
# log_name = container-updater
|
||||||
# log_facility = LOG_LOCAL0
|
# log_facility = LOG_LOCAL0
|
||||||
# log_level = INFO
|
# log_level = INFO
|
||||||
|
# log_address = /dev/log
|
||||||
# interval = 300
|
# interval = 300
|
||||||
# concurrency = 4
|
# concurrency = 4
|
||||||
# node_timeout = 3
|
# node_timeout = 3
|
||||||
@ -81,6 +85,7 @@ use = egg:swift#recon
|
|||||||
# log_name = container-auditor
|
# log_name = container-auditor
|
||||||
# log_facility = LOG_LOCAL0
|
# log_facility = LOG_LOCAL0
|
||||||
# log_level = INFO
|
# log_level = INFO
|
||||||
|
# log_address = /dev/log
|
||||||
# Will audit, at most, 1 container per device per interval
|
# Will audit, at most, 1 container per device per interval
|
||||||
# interval = 1800
|
# interval = 1800
|
||||||
# recon_cache_path = /var/cache/swift
|
# recon_cache_path = /var/cache/swift
|
||||||
@ -90,6 +95,7 @@ use = egg:swift#recon
|
|||||||
# log_name = container-sync
|
# log_name = container-sync
|
||||||
# log_facility = LOG_LOCAL0
|
# log_facility = LOG_LOCAL0
|
||||||
# log_level = INFO
|
# log_level = INFO
|
||||||
|
# log_address = /dev/log
|
||||||
# If you need to use an HTTP Proxy, set it here; defaults to no proxy.
|
# If you need to use an HTTP Proxy, set it here; defaults to no proxy.
|
||||||
# sync_proxy = http://127.0.0.1:8888
|
# sync_proxy = http://127.0.0.1:8888
|
||||||
# Will sync, at most, each container once per interval
|
# Will sync, at most, each container once per interval
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
# device_dir = /srv/node
|
# device_dir = /srv/node
|
||||||
# log_facility = LOG_LOCAL0
|
# log_facility = LOG_LOCAL0
|
||||||
# log_level = INFO
|
# log_level = INFO
|
||||||
|
# log_address = /dev/log
|
||||||
# minutes = 60
|
# minutes = 60
|
||||||
# error_limit = 1
|
# error_limit = 1
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
# log_name = swift
|
# log_name = swift
|
||||||
# log_facility = LOG_LOCAL0
|
# log_facility = LOG_LOCAL0
|
||||||
# log_level = INFO
|
# log_level = INFO
|
||||||
|
# log_address = /dev/log
|
||||||
# You can enable default statsD logging here if you want:
|
# You can enable default statsD logging here if you want:
|
||||||
# log_statsd_host = localhost
|
# log_statsd_host = localhost
|
||||||
# log_statsd_port = 8125
|
# log_statsd_port = 8125
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# log_name = swift
|
# log_name = swift
|
||||||
# log_facility = LOG_LOCAL0
|
# log_facility = LOG_LOCAL0
|
||||||
# log_level = INFO
|
# log_level = INFO
|
||||||
|
# log_address = /dev/log
|
||||||
# You can enable default statsD logging here and/or override it in sections
|
# You can enable default statsD logging here and/or override it in sections
|
||||||
# below:
|
# below:
|
||||||
# log_statsd_host = localhost
|
# log_statsd_host = localhost
|
||||||
@ -29,6 +30,7 @@ use = egg:swift#object
|
|||||||
# set log_facility = LOG_LOCAL0
|
# set log_facility = LOG_LOCAL0
|
||||||
# set log_level = INFO
|
# set log_level = INFO
|
||||||
# set log_requests = True
|
# set log_requests = True
|
||||||
|
# set log_address = /dev/log
|
||||||
# node_timeout = 3
|
# node_timeout = 3
|
||||||
# conn_timeout = 0.5
|
# conn_timeout = 0.5
|
||||||
# network_chunk_size = 65536
|
# network_chunk_size = 65536
|
||||||
@ -58,6 +60,7 @@ use = egg:swift#recon
|
|||||||
# log_name = object-replicator
|
# log_name = object-replicator
|
||||||
# log_facility = LOG_LOCAL0
|
# log_facility = LOG_LOCAL0
|
||||||
# log_level = INFO
|
# log_level = INFO
|
||||||
|
# log_address = /dev/log
|
||||||
# vm_test_mode = no
|
# vm_test_mode = no
|
||||||
# daemonize = on
|
# daemonize = on
|
||||||
# run_pause = 30
|
# run_pause = 30
|
||||||
@ -81,6 +84,7 @@ use = egg:swift#recon
|
|||||||
# log_name = object-updater
|
# log_name = object-updater
|
||||||
# log_facility = LOG_LOCAL0
|
# log_facility = LOG_LOCAL0
|
||||||
# log_level = INFO
|
# log_level = INFO
|
||||||
|
# log_address = /dev/log
|
||||||
# interval = 300
|
# interval = 300
|
||||||
# concurrency = 1
|
# concurrency = 1
|
||||||
# node_timeout = 10
|
# node_timeout = 10
|
||||||
@ -94,6 +98,7 @@ use = egg:swift#recon
|
|||||||
# log_name = object-auditor
|
# log_name = object-auditor
|
||||||
# log_facility = LOG_LOCAL0
|
# log_facility = LOG_LOCAL0
|
||||||
# log_level = INFO
|
# log_level = INFO
|
||||||
|
# log_address = /dev/log
|
||||||
# files_per_second = 20
|
# files_per_second = 20
|
||||||
# bytes_per_second = 10000000
|
# bytes_per_second = 10000000
|
||||||
# log_time = 3600
|
# log_time = 3600
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
# log_name = swift
|
# log_name = swift
|
||||||
# log_facility = LOG_LOCAL0
|
# log_facility = LOG_LOCAL0
|
||||||
# log_level = INFO
|
# log_level = INFO
|
||||||
|
# log_address = /dev/log
|
||||||
# You can enable default statsD logging here and/or override it in sections
|
# You can enable default statsD logging here and/or override it in sections
|
||||||
# below:
|
# below:
|
||||||
# log_statsd_host = localhost
|
# log_statsd_host = localhost
|
||||||
@ -29,6 +30,7 @@ use = egg:swift#proxy
|
|||||||
# set log_name = proxy-server
|
# set log_name = proxy-server
|
||||||
# set log_facility = LOG_LOCAL0
|
# set log_facility = LOG_LOCAL0
|
||||||
# set log_level = INFO
|
# set log_level = INFO
|
||||||
|
# set log_address = /dev/log
|
||||||
# set access_log_name = proxy-server
|
# set access_log_name = proxy-server
|
||||||
# set access_log_facility = LOG_LOCAL0
|
# set access_log_facility = LOG_LOCAL0
|
||||||
# set access_log_level = INFO
|
# set access_log_level = INFO
|
||||||
@ -78,6 +80,7 @@ use = egg:swift#tempauth
|
|||||||
# set log_facility = LOG_LOCAL0
|
# set log_facility = LOG_LOCAL0
|
||||||
# set log_level = INFO
|
# set log_level = INFO
|
||||||
# set log_headers = False
|
# set log_headers = False
|
||||||
|
# set log_address = /dev/log
|
||||||
# The reseller prefix will verify a token begins with this prefix before even
|
# The reseller prefix will verify a token begins with this prefix before even
|
||||||
# attempting to validate it. Also, with authorization, only Swift storage
|
# attempting to validate it. Also, with authorization, only Swift storage
|
||||||
# accounts with this prefix will be authorized by this middleware. Useful if
|
# accounts with this prefix will be authorized by this middleware. Useful if
|
||||||
@ -122,6 +125,7 @@ use = egg:swift#healthcheck
|
|||||||
# set log_facility = LOG_LOCAL0
|
# set log_facility = LOG_LOCAL0
|
||||||
# set log_level = INFO
|
# set log_level = INFO
|
||||||
# set log_headers = False
|
# set log_headers = False
|
||||||
|
# set log_address = /dev/log
|
||||||
|
|
||||||
[filter:cache]
|
[filter:cache]
|
||||||
use = egg:swift#memcache
|
use = egg:swift#memcache
|
||||||
@ -130,6 +134,7 @@ use = egg:swift#memcache
|
|||||||
# set log_facility = LOG_LOCAL0
|
# set log_facility = LOG_LOCAL0
|
||||||
# set log_level = INFO
|
# set log_level = INFO
|
||||||
# set log_headers = False
|
# set log_headers = False
|
||||||
|
# set log_address = /dev/log
|
||||||
# Default for memcache_servers is to try to read the property from
|
# Default for memcache_servers is to try to read the property from
|
||||||
# memcache.conf (see memcache.conf-sample) or lacking that file, it will
|
# memcache.conf (see memcache.conf-sample) or lacking that file, it will
|
||||||
# default to the value below. You can specify multiple servers separated with
|
# default to the value below. You can specify multiple servers separated with
|
||||||
@ -143,6 +148,7 @@ use = egg:swift#ratelimit
|
|||||||
# set log_facility = LOG_LOCAL0
|
# set log_facility = LOG_LOCAL0
|
||||||
# set log_level = INFO
|
# set log_level = INFO
|
||||||
# set log_headers = False
|
# set log_headers = False
|
||||||
|
# set log_address = /dev/log
|
||||||
# clock_accuracy should represent how accurate the proxy servers' system clocks
|
# clock_accuracy should represent how accurate the proxy servers' system clocks
|
||||||
# are with each other. 1000 means that all the proxies' clock are accurate to
|
# are with each other. 1000 means that all the proxies' clock are accurate to
|
||||||
# each other within 1 millisecond. No ratelimit should be higher than the
|
# each other within 1 millisecond. No ratelimit should be higher than the
|
||||||
@ -175,6 +181,7 @@ use = egg:swift#domain_remap
|
|||||||
# set log_facility = LOG_LOCAL0
|
# set log_facility = LOG_LOCAL0
|
||||||
# set log_level = INFO
|
# set log_level = INFO
|
||||||
# set log_headers = False
|
# set log_headers = False
|
||||||
|
# set log_address = /dev/log
|
||||||
# storage_domain = example.com
|
# storage_domain = example.com
|
||||||
# path_root = v1
|
# path_root = v1
|
||||||
# reseller_prefixes = AUTH
|
# reseller_prefixes = AUTH
|
||||||
@ -186,6 +193,7 @@ use = egg:swift#catch_errors
|
|||||||
# set log_facility = LOG_LOCAL0
|
# set log_facility = LOG_LOCAL0
|
||||||
# set log_level = INFO
|
# set log_level = INFO
|
||||||
# set log_headers = False
|
# set log_headers = False
|
||||||
|
# set log_address = /dev/log
|
||||||
|
|
||||||
[filter:cname_lookup]
|
[filter:cname_lookup]
|
||||||
# Note: this middleware requires python-dnspython
|
# Note: this middleware requires python-dnspython
|
||||||
@ -195,6 +203,7 @@ use = egg:swift#cname_lookup
|
|||||||
# set log_facility = LOG_LOCAL0
|
# set log_facility = LOG_LOCAL0
|
||||||
# set log_level = INFO
|
# set log_level = INFO
|
||||||
# set log_headers = False
|
# set log_headers = False
|
||||||
|
# set log_address = /dev/log
|
||||||
# storage_domain = example.com
|
# storage_domain = example.com
|
||||||
# lookup_depth = 1
|
# lookup_depth = 1
|
||||||
|
|
||||||
@ -207,6 +216,7 @@ use = egg:swift#staticweb
|
|||||||
# set log_name = staticweb
|
# set log_name = staticweb
|
||||||
# set log_facility = LOG_LOCAL0
|
# set log_facility = LOG_LOCAL0
|
||||||
# set log_level = INFO
|
# set log_level = INFO
|
||||||
|
# set log_address = /dev/log
|
||||||
# set access_log_name = staticweb
|
# set access_log_name = staticweb
|
||||||
# set access_log_facility = LOG_LOCAL0
|
# set access_log_facility = LOG_LOCAL0
|
||||||
# set access_log_level = INFO
|
# set access_log_level = INFO
|
||||||
|
@ -39,6 +39,7 @@ except ImportError:
|
|||||||
import cPickle as pickle
|
import cPickle as pickle
|
||||||
import glob
|
import glob
|
||||||
from urlparse import urlparse as stdlib_urlparse, ParseResult
|
from urlparse import urlparse as stdlib_urlparse, ParseResult
|
||||||
|
import socket
|
||||||
|
|
||||||
import eventlet
|
import eventlet
|
||||||
from eventlet import GreenPool, sleep, Timeout
|
from eventlet import GreenPool, sleep, Timeout
|
||||||
@ -78,6 +79,10 @@ if hash_conf.read('/etc/swift/swift.conf'):
|
|||||||
TRUE_VALUES = set(('true', '1', 'yes', 'on', 't', 'y'))
|
TRUE_VALUES = set(('true', '1', 'yes', 'on', 't', 'y'))
|
||||||
|
|
||||||
|
|
||||||
|
def noop_libc_function(*args):
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
def validate_configuration():
|
def validate_configuration():
|
||||||
if HASH_PATH_SUFFIX == '':
|
if HASH_PATH_SUFFIX == '':
|
||||||
sys.exit("Error: [swift-hash]: swift_hash_path_suffix missing "
|
sys.exit("Error: [swift-hash]: swift_hash_path_suffix missing "
|
||||||
@ -96,9 +101,6 @@ def load_libc_function(func_name):
|
|||||||
except AttributeError:
|
except AttributeError:
|
||||||
logging.warn(_("Unable to locate %s in libc. Leaving as a no-op."),
|
logging.warn(_("Unable to locate %s in libc. Leaving as a no-op."),
|
||||||
func_name)
|
func_name)
|
||||||
|
|
||||||
def noop_libc_function(*args):
|
|
||||||
return 0
|
|
||||||
return noop_libc_function
|
return noop_libc_function
|
||||||
|
|
||||||
|
|
||||||
@ -118,6 +120,23 @@ def get_param(req, name, default=None):
|
|||||||
return value
|
return value
|
||||||
|
|
||||||
|
|
||||||
|
class FallocateWrapper(object):
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
for func in ('fallocate', 'posix_fallocate'):
|
||||||
|
self.func_name = func
|
||||||
|
self.fallocate = load_libc_function(func)
|
||||||
|
if self.fallocate is not noop_libc_function:
|
||||||
|
break
|
||||||
|
|
||||||
|
def __call__(self, fd, mode, offset, len):
|
||||||
|
args = {
|
||||||
|
'fallocate': (fd, mode, offset, len),
|
||||||
|
'posix_fallocate': (fd, offset, len)
|
||||||
|
}
|
||||||
|
return self.fallocate(*args[self.func_name])
|
||||||
|
|
||||||
|
|
||||||
def fallocate(fd, size):
|
def fallocate(fd, size):
|
||||||
"""
|
"""
|
||||||
Pre-allocate disk space for a file file.
|
Pre-allocate disk space for a file file.
|
||||||
@ -127,7 +146,7 @@ def fallocate(fd, size):
|
|||||||
"""
|
"""
|
||||||
global _sys_fallocate
|
global _sys_fallocate
|
||||||
if _sys_fallocate is None:
|
if _sys_fallocate is None:
|
||||||
_sys_fallocate = load_libc_function('fallocate')
|
_sys_fallocate = FallocateWrapper()
|
||||||
if size > 0:
|
if size > 0:
|
||||||
# 1 means "FALLOC_FL_KEEP_SIZE", which means it pre-allocates invisibly
|
# 1 means "FALLOC_FL_KEEP_SIZE", which means it pre-allocates invisibly
|
||||||
ret = _sys_fallocate(fd, 1, 0, ctypes.c_uint64(size))
|
ret = _sys_fallocate(fd, 1, 0, ctypes.c_uint64(size))
|
||||||
@ -193,7 +212,7 @@ def renamer(old, new):
|
|||||||
try:
|
try:
|
||||||
mkdirs(os.path.dirname(new))
|
mkdirs(os.path.dirname(new))
|
||||||
os.rename(old, new)
|
os.rename(old, new)
|
||||||
except OSError:
|
except OSError, err:
|
||||||
mkdirs(os.path.dirname(new))
|
mkdirs(os.path.dirname(new))
|
||||||
os.rename(old, new)
|
os.rename(old, new)
|
||||||
|
|
||||||
@ -523,7 +542,13 @@ def get_logger(conf, name=None, log_to_console=False, log_route=None,
|
|||||||
# facility for this logger will be set by last call wins
|
# facility for this logger will be set by last call wins
|
||||||
facility = getattr(SysLogHandler, conf.get('log_facility', 'LOG_LOCAL0'),
|
facility = getattr(SysLogHandler, conf.get('log_facility', 'LOG_LOCAL0'),
|
||||||
SysLogHandler.LOG_LOCAL0)
|
SysLogHandler.LOG_LOCAL0)
|
||||||
handler = SysLogHandler(address='/dev/log', facility=facility)
|
log_address = conf.get('log_address', '/dev/log')
|
||||||
|
try:
|
||||||
|
handler = SysLogHandler(address=log_address, facility=facility)
|
||||||
|
except socket.error, e:
|
||||||
|
if e.errno != errno.ENOTSOCK: # Socket operation on non-socket
|
||||||
|
raise e
|
||||||
|
handler = SysLogHandler(facility=facility)
|
||||||
handler.setFormatter(formatter)
|
handler.setFormatter(formatter)
|
||||||
logger.addHandler(handler)
|
logger.addHandler(handler)
|
||||||
get_logger.handler4logger[logger] = handler
|
get_logger.handler4logger[logger] = handler
|
||||||
@ -723,13 +748,18 @@ def lock_path(directory, timeout=10):
|
|||||||
the lock can be acquired, or the timeout time has expired (whichever occurs
|
the lock can be acquired, or the timeout time has expired (whichever occurs
|
||||||
first).
|
first).
|
||||||
|
|
||||||
|
For locking exclusively, file or directory has to be opened in Write mode.
|
||||||
|
Python doesn't allow directories to be opened in Write Mode. So we
|
||||||
|
workaround by locking a hidden file in the directory.
|
||||||
|
|
||||||
:param directory: directory to be locked
|
:param directory: directory to be locked
|
||||||
:param timeout: timeout (in seconds)
|
:param timeout: timeout (in seconds)
|
||||||
"""
|
"""
|
||||||
mkdirs(directory)
|
mkdirs(directory)
|
||||||
fd = os.open(directory, os.O_RDONLY)
|
lockpath = '%s/.lock' % directory
|
||||||
|
fd = os.open(lockpath, os.O_WRONLY | os.O_CREAT)
|
||||||
try:
|
try:
|
||||||
with LockTimeout(timeout, directory):
|
with LockTimeout(timeout, lockpath):
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
|
fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user