]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
calamari: Add debugging option 1356/head
authorBoris Ranto <branto@redhat.com>
Mon, 13 Mar 2017 12:46:38 +0000 (13:46 +0100)
committerBoris Ranto <branto@redhat.com>
Tue, 14 Mar 2017 09:53:05 +0000 (10:53 +0100)
This patch introduces calamari_debug option which will turn on debugging
for calamari before initializing and running it.

Signed-off-by: Boris Ranto <branto@redhat.com>
group_vars/mons.yml.sample
roles/ceph-mon/defaults/main.yml
roles/ceph-mon/tasks/calamari.yml

index 4dc8b7c992da98488b6c1ed9a9ea583281600f5b..43341f3aebe4a0b341a645a4826938bf022aa62e 100644 (file)
@@ -42,6 +42,9 @@ dummy:
 # Enable the Calamari-backed REST API on a Monitor
 #calamari: false
 
+# Enable debugging for Calamari
+#calamari_debug: false
+
 #############
 # OPENSTACK #
 #############
index a9a837ec0faebd2f9860b3b2f83a5ceffd7b379d..6013bda4efca016b13af936b5ebdc853dc574369 100644 (file)
@@ -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 #
 #############
index 30cb080156d230eca5114c67ebeb79e9461a1b75..14d9f05426d9953c04fff119072057c268b89b83 100644 (file)
@@ -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