From: Boris Ranto Date: Mon, 13 Mar 2017 12:46:38 +0000 (+0100) Subject: calamari: Add debugging option X-Git-Tag: v2.2.0rc1~9^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1356%2Fhead;p=ceph-ansible.git calamari: Add debugging option This patch introduces calamari_debug option which will turn on debugging for calamari before initializing and running it. Signed-off-by: Boris Ranto --- diff --git a/group_vars/mons.yml.sample b/group_vars/mons.yml.sample index 4dc8b7c99..43341f3ae 100644 --- a/group_vars/mons.yml.sample +++ b/group_vars/mons.yml.sample @@ -42,6 +42,9 @@ dummy: # Enable the Calamari-backed REST API on a Monitor #calamari: false +# Enable debugging for Calamari +#calamari_debug: false + ############# # OPENSTACK # ############# diff --git a/roles/ceph-mon/defaults/main.yml b/roles/ceph-mon/defaults/main.yml index a9a837ec0..6013bda4e 100644 --- a/roles/ceph-mon/defaults/main.yml +++ b/roles/ceph-mon/defaults/main.yml @@ -34,6 +34,9 @@ secure_cluster_flags: # Enable the Calamari-backed REST API on a Monitor calamari: false +# Enable debugging for Calamari +calamari_debug: false + ############# # OPENSTACK # ############# diff --git a/roles/ceph-mon/tasks/calamari.yml b/roles/ceph-mon/tasks/calamari.yml index 30cb08015..14d9f0542 100644 --- a/roles/ceph-mon/tasks/calamari.yml +++ b/roles/ceph-mon/tasks/calamari.yml @@ -6,5 +6,16 @@ tags: - package-install +- name: increase calamari logging level when debug is on + ini_file: + dest: /etc/calamari/calamari.conf + section: "{{ item }}" + option: log_level + value: DEBUG + with_items: + - cthulhu + - calamari_web + when: calamari_debug + - name: initialize the calamari server api command: calamari-ctl initialize