added syslog support

This commit is contained in:
yolanda.robla@canonical.com 2014-02-03 12:24:02 +01:00
parent dc02e63d39
commit 7b9573beea
7 changed files with 23 additions and 3 deletions

View File

@ -36,6 +36,12 @@ options:
rbd pool has been created, changing this value will not have any
effect (although it can be changed in ceph by manually configuring
your ceph cluster).
use-syslog:
type: boolean
default: False
description: |
By default, all services will log into their corresponding log files.
Setting this to True will force all services to log to the syslog.
# HA configuration settings
vip:
type: string

View File

@ -2,6 +2,7 @@ from charmhelpers.core.hookenv import (
is_relation_made,
relation_ids,
service_name,
config
)
from charmhelpers.contrib.openstack.context import (
@ -75,3 +76,11 @@ class ApacheSSLContext(SSLContext):
def __call__(self):
return super(ApacheSSLContext, self).__call__()
class GlanceContext(OSContextGenerator):
def __call__(self):
ctxt = {
'use_syslog': config('use-syslog')
}
return ctxt

View File

@ -63,7 +63,8 @@ TEMPLATES = 'templates/'
CONFIG_FILES = OrderedDict([
(GLANCE_REGISTRY_CONF, {
'hook_contexts': [context.SharedDBContext(),
context.IdentityServiceContext()],
context.IdentityServiceContext(),
glance_contexts.GlanceContext()],
'services': ['glance-registry']
}),
(GLANCE_API_CONF, {
@ -72,7 +73,8 @@ CONFIG_FILES = OrderedDict([
context.IdentityServiceContext(),
glance_contexts.CephGlanceContext(),
glance_contexts.ObjectStoreContext(),
glance_contexts.HAProxyContext()],
glance_contexts.HAProxyContext(),
glance_contexts.GlanceContext()],
'services': ['glance-api']
}),
(GLANCE_API_PASTE_INI, {

View File

@ -1 +1 @@
147
148

View File

@ -1,5 +1,6 @@
[DEFAULT]
verbose = True
use_syslog = {{ use_syslog }}
debug = True
{% if rbd_pool %}
default_store = rbd

View File

@ -1,5 +1,6 @@
[DEFAULT]
verbose = True
use_syslog = {{ use_syslog }}
debug = True
{% if rbd_pool %}
default_store = rbd

View File

@ -1,5 +1,6 @@
[DEFAULT]
verbose = True
use_syslog = {{ use_syslog }}
debug = True
bind_host = 0.0.0.0
bind_port = 9191