added syslog support

This commit is contained in:
yolanda.robla@canonical.com 2014-02-03 11:44:24 +01:00
parent 98fdb0a682
commit 728b0df292
5 changed files with 12 additions and 2 deletions

View File

@ -80,6 +80,12 @@ options:
actions e.g. the RBD driver requires requires this to support COW actions e.g. the RBD driver requires requires this to support COW
cloning of images. This option will default to v1 for backwards cloning of images. This option will default to v1 for backwards
compatibility older glance services. compatibility older glance services.
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 # HA configuration settings
vip: vip:
type: string type: string

View File

@ -42,6 +42,7 @@ class CephContext(OSContextGenerator):
'rbd_pool': service, 'rbd_pool': service,
'rbd_user': service, 'rbd_user': service,
'host': service, 'host': service,
'use_syslog': config('use-syslog')
} }

View File

@ -1 +1 @@
133 134

View File

@ -10,6 +10,7 @@ iscsi_helper = tgtadm
volume_name_template = volume-%s volume_name_template = volume-%s
volume_group = cinder-volumes volume_group = cinder-volumes
verbose = True verbose = True
use_syslog = {{ use_syslog }}
auth_strategy = keystone auth_strategy = keystone
state_path = /var/lib/cinder state_path = /var/lib/cinder
lock_path = /var/lock/cinder lock_path = /var/lock/cinder

View File

@ -43,12 +43,14 @@ class TestCinderContext(CharmTestCase):
self.relation_ids.return_value = ['ceph:0'] self.relation_ids.return_value = ['ceph:0']
service = 'mycinder' service = 'mycinder'
self.service_name.return_value = service self.service_name.return_value = service
self.config.return_value = False
self.assertEquals( self.assertEquals(
contexts.CephContext()(), contexts.CephContext()(),
{'volume_driver': 'cinder.volume.driver.RBDDriver', {'volume_driver': 'cinder.volume.driver.RBDDriver',
'rbd_pool': service, 'rbd_pool': service,
'rbd_user': service, 'rbd_user': service,
'host': service}) 'host': service,
'use_syslog': False})
def test_haproxy_configuration(self): def test_haproxy_configuration(self):
self.determine_haproxy_port.return_value = 8080 self.determine_haproxy_port.return_value = 8080