~louis/+junk/nova-compute

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/contrib/storage/linux/ceph.py

  • Committer: Edward Hope-Morley
  • Date: 2014-03-26 18:08:46 UTC
  • mfrom: (55.1.1 nova-compute.lp1273067)
  • Revision ID: edward.hope-morley@canonical.com-20140326180846-o2mo693uow2urlpj
[hopem] Added support for ceph-client logging to syslog

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 auth supported = {auth}
50
50
 keyring = {keyring}
51
51
 mon host = {mon_hosts}
 
52
 log to syslog = {use_syslog}
 
53
 err to syslog = {use_syslog}
 
54
 clog to syslog = {use_syslog}
52
55
"""
53
56
 
54
57
 
194
197
    return hosts
195
198
 
196
199
 
197
 
def configure(service, key, auth):
 
200
def configure(service, key, auth, use_syslog):
198
201
    ''' Perform basic configuration of Ceph '''
199
202
    create_keyring(service, key)
200
203
    create_key_file(service, key)
202
205
    with open('/etc/ceph/ceph.conf', 'w') as ceph_conf:
203
206
        ceph_conf.write(CEPH_CONF.format(auth=auth,
204
207
                                         keyring=_keyring_path(service),
205
 
                                         mon_hosts=",".join(map(str, hosts))))
 
208
                                         mon_hosts=",".join(map(str, hosts)),
 
209
                                         use_syslog=use_syslog))
206
210
    modprobe('rbd')
207
211
 
208
212