[xtrusia,r=james-page] Add support for debug and header logging.
This commit is contained in:
commit
aef4ebdc16
12
config.yaml
12
config.yaml
@ -122,6 +122,18 @@ options:
|
||||
Timeouts from these requests can be recovered from so setting this to
|
||||
something lower than node-timeout would provide quicker error recovery
|
||||
while allowing for a longer timeout for non-recoverable requests (PUTs).
|
||||
# Logging configuration
|
||||
debug:
|
||||
default: False
|
||||
type: boolean
|
||||
description: |
|
||||
Set log-name, log-facility, log-level, log-address
|
||||
log-headers:
|
||||
default: False
|
||||
type: boolean
|
||||
description: |
|
||||
Enables the ability to log request headers.
|
||||
The default is False.
|
||||
# Manual Keystone configuration.
|
||||
keystone-auth-host:
|
||||
type: string
|
||||
|
@ -100,8 +100,14 @@ class SwiftIdentityContext(OSContextGenerator):
|
||||
'delay_auth_decision': config('delay-auth-decision'),
|
||||
'node_timeout': config('node-timeout'),
|
||||
'recoverable_node_timeout': config('recoverable-node-timeout'),
|
||||
'log_headers': config('log-headers')
|
||||
}
|
||||
|
||||
if config('debug'):
|
||||
ctxt['log_level'] = 'DEBUG'
|
||||
else:
|
||||
ctxt['log_level'] = 'INFO'
|
||||
|
||||
# Instead of duplicating code lets use charm-helpers to set signing_dir
|
||||
# TODO(hopem): refactor this context handler to use charm-helpers
|
||||
# code.
|
||||
|
@ -3,6 +3,12 @@ bind_port = {{ bind_port }}
|
||||
workers = {{ workers }}
|
||||
user = swift
|
||||
bind_ip = {{ bind_host }}
|
||||
log_name = swift
|
||||
log_facility = LOG_LOCAL0
|
||||
log_level = {{ log_level }}
|
||||
log_address = /dev/log
|
||||
log_headers = {{ log_headers }}
|
||||
|
||||
{% if ssl %}
|
||||
cert_file = {{ ssl_cert }}
|
||||
key_file = {{ ssl_key }}
|
||||
@ -10,10 +16,10 @@ key_file = {{ ssl_key }}
|
||||
|
||||
{% if auth_type == 'keystone' %}
|
||||
[pipeline:main]
|
||||
pipeline = gatekeeper healthcheck cache swift3 s3token container_sync bulk tempurl slo dlo formpost authtoken keystoneauth staticweb container-quotas account-quotas proxy-server
|
||||
pipeline = gatekeeper healthcheck proxy-logging cache swift3 s3token container_sync bulk tempurl slo dlo formpost authtoken keystoneauth staticweb container-quotas account-quotas proxy-logging proxy-server
|
||||
{% else %}
|
||||
[pipeline:main]
|
||||
pipeline = gatekeeper healthcheck cache container_sync bulk tempurl slo dlo formpost tempauth staticweb container-quotas account-quotas proxy-server
|
||||
pipeline = gatekeeper healthcheck proxy-logging cache container_sync bulk tempurl slo dlo formpost tempauth staticweb container-quotas account-quotas proxy-logging proxy-server
|
||||
{% endif %}
|
||||
|
||||
[app:proxy-server]
|
||||
@ -40,6 +46,9 @@ use = egg:swift#account_quotas
|
||||
[filter:container-quotas]
|
||||
use = egg:swift#container_quotas
|
||||
|
||||
[filter:proxy-logging]
|
||||
use = egg:swift#proxy_logging
|
||||
|
||||
[filter:staticweb]
|
||||
use = egg:swift#staticweb
|
||||
|
||||
|
@ -3,6 +3,12 @@ bind_port = {{ bind_port }}
|
||||
workers = {{ workers }}
|
||||
user = swift
|
||||
bind_ip = {{ bind_host }}
|
||||
log_name = swift
|
||||
log_facility = LOG_LOCAL0
|
||||
log_level = {{ log_level }}
|
||||
log_address = /dev/log
|
||||
log_headers = {{ log_headers }}
|
||||
|
||||
{% if ssl %}
|
||||
cert_file = {{ ssl_cert }}
|
||||
key_file = {{ ssl_key }}
|
||||
@ -10,10 +16,10 @@ key_file = {{ ssl_key }}
|
||||
|
||||
{% if auth_type == 'keystone' %}
|
||||
[pipeline:main]
|
||||
pipeline = gatekeeper healthcheck cache swift3 s3token container_sync bulk tempurl slo dlo formpost authtoken keystoneauth staticweb container-quotas account-quotas proxy-server
|
||||
pipeline = gatekeeper healthcheck proxy-logging cache swift3 s3token container_sync bulk tempurl slo dlo formpost authtoken keystoneauth staticweb container-quotas account-quotas proxy-logging proxy-server
|
||||
{% else %}
|
||||
[pipeline:main]
|
||||
pipeline = gatekeeper healthcheck cache container_sync bulk tempurl slo dlo formpost tempauth staticweb container-quotas account-quotas proxy-server
|
||||
pipeline = gatekeeper healthcheck proxy-logging cache container_sync bulk tempurl slo dlo formpost tempauth staticweb container-quotas account-quotas proxy-logging proxy-server
|
||||
{% endif %}
|
||||
|
||||
[app:proxy-server]
|
||||
@ -40,6 +46,9 @@ use = egg:swift#account_quotas
|
||||
[filter:container-quotas]
|
||||
use = egg:swift#container_quotas
|
||||
|
||||
[filter:proxy-logging]
|
||||
use = egg:swift#proxy_logging
|
||||
|
||||
[filter:staticweb]
|
||||
use = egg:swift#staticweb
|
||||
|
||||
|
@ -368,13 +368,19 @@ class SwiftProxyBasicDeployment(OpenStackAmuletDeployment):
|
||||
expected = {
|
||||
'DEFAULT': {
|
||||
'bind_port': '8070',
|
||||
'user': 'swift'
|
||||
'user': 'swift',
|
||||
'log_name': 'swift',
|
||||
'log_facility': 'LOG_LOCAL0',
|
||||
'log_level': 'INFO',
|
||||
'log_headers': 'False',
|
||||
'log_address': '/dev/log'
|
||||
},
|
||||
'pipeline:main': {
|
||||
'pipeline': 'gatekeeper healthcheck cache swift3 s3token '
|
||||
'container_sync bulk tempurl slo dlo formpost '
|
||||
'authtoken keystoneauth staticweb '
|
||||
'container-quotas account-quotas proxy-server'
|
||||
'pipeline': 'gatekeeper healthcheck proxy-logging cache swift3 '
|
||||
's3token container_sync bulk tempurl slo dlo '
|
||||
'formpost authtoken keystoneauth staticweb '
|
||||
'container-quotas account-quotas proxy-logging '
|
||||
'proxy-server'
|
||||
},
|
||||
'app:proxy-server': {
|
||||
'use': 'egg:swift#proxy',
|
||||
@ -395,6 +401,7 @@ class SwiftProxyBasicDeployment(OpenStackAmuletDeployment):
|
||||
},
|
||||
'filter:account-quotas': {'use': 'egg:swift#account_quotas'},
|
||||
'filter:container-quotas': {'use': 'egg:swift#container_quotas'},
|
||||
'filter:proxy-logging': {'use': 'egg:swift#proxy_logging'},
|
||||
'filter:staticweb': {'use': 'egg:swift#staticweb'},
|
||||
'filter:bulk': {'use': 'egg:swift#bulk'},
|
||||
'filter:slo': {'use': 'egg:swift#slo'},
|
||||
|
Loading…
Reference in New Issue
Block a user