From 7acd31a61c0b3e145f4c92a31c471ad8935bd4df Mon Sep 17 00:00:00 2001 From: Edward Hope-Morley Date: Wed, 13 Jan 2016 14:45:54 +0200 Subject: [PATCH] [hopem,r=] Add loglevel config option. Closes-Bug: 1520236 --- config.yaml | 4 ++++ hooks/ceph_hooks.py | 1 + templates/ceph.conf | 2 ++ 3 files changed, 7 insertions(+) diff --git a/config.yaml b/config.yaml index 891c740..d47f676 100644 --- a/config.yaml +++ b/config.yaml @@ -1,4 +1,8 @@ options: + loglevel: + default: 1 + type: int + description: Mon and OSD debug level. Max is 20. fsid: type: string default: diff --git a/hooks/ceph_hooks.py b/hooks/ceph_hooks.py index 8a041cb..fd68dde 100755 --- a/hooks/ceph_hooks.py +++ b/hooks/ceph_hooks.py @@ -99,6 +99,7 @@ def emit_cephconf(): 'use_syslog': str(config('use-syslog')).lower(), 'ceph_public_network': config('ceph-public-network'), 'ceph_cluster_network': config('ceph-cluster-network'), + 'loglevel': config('loglevel'), } if config('prefer-ipv6'): diff --git a/templates/ceph.conf b/templates/ceph.conf index e168f54..64f52a6 100644 --- a/templates/ceph.conf +++ b/templates/ceph.conf @@ -14,6 +14,8 @@ log to syslog = {{ use_syslog }} err to syslog = {{ use_syslog }} clog to syslog = {{ use_syslog }} mon cluster log to syslog = {{ use_syslog }} +debug mon = {{ loglevel }}/5 +debug osd = {{ loglevel }}/5 {%- if ceph_public_network is string %} public network = {{ ceph_public_network }}