From 3c6a7a60ebbdbdd93b2ab0298e3cf215a4be2931 Mon Sep 17 00:00:00 2001 From: Boris Ranto Date: Mon, 13 Mar 2017 13:46:38 +0100 Subject: [PATCH] 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 --- group_vars/mons.yml.sample | 3 +++ roles/ceph-mon/defaults/main.yml | 3 +++ roles/ceph-mon/tasks/calamari.yml | 11 +++++++++++ 3 files changed, 17 insertions(+) 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 -- 2.39.5