]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
common: don't enable debug log on ceph-volume calls by default
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 5 Aug 2020 16:02:48 +0000 (18:02 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 12 Aug 2020 20:57:10 +0000 (22:57 +0200)
ceph-volume can generate large logs at some point.

debug logs by definition should be enabled only when debugging.

Let's make it customizable with a variable which is set to `False` by
default.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 448cc280b7919ac7d19d854a92e3ed367b361ccc)

12 files changed:
group_vars/all.yml.sample
group_vars/rhcs.yml.sample
infrastructure-playbooks/filestore-to-bluestore.yml
infrastructure-playbooks/purge-cluster.yml
infrastructure-playbooks/purge-container-cluster.yml
infrastructure-playbooks/rolling_update.yml
infrastructure-playbooks/shrink-osd.yml
infrastructure-playbooks/storage-inventory.yml
roles/ceph-config/tasks/main.yml
roles/ceph-defaults/defaults/main.yml
roles/ceph-osd/tasks/scenarios/lvm-batch.yml
roles/ceph-osd/tasks/scenarios/lvm.yml

index 4cf5f16df41bf4a25cade2c089722fdb683d1233..7a805426d1c6a97b2587aba0e02548cf6aafbd1a 100644 (file)
@@ -324,6 +324,8 @@ dummy:
 #mon_host_v2:
 #  suffix: ':3300'
 
+#enable_ceph_volume_debug: False
+
 ##########
 # CEPHFS #
 ##########
@@ -884,4 +886,4 @@ dummy:
 
 #container_exec_cmd:
 #docker: false
-
+#ceph_volume_debug: "{{ enable_ceph_volume_debug | ternary(1, 0)  }}"
index f2a8f254213a35ff55bd68d6cb4ed8a08c5667a3..969fec35d3e8beb2abd79e56dd9b2da9a3ca118d 100644 (file)
@@ -324,6 +324,8 @@ ceph_iscsi_config_dev: false
 #mon_host_v2:
 #  suffix: ':3300'
 
+#enable_ceph_volume_debug: False
+
 ##########
 # CEPHFS #
 ##########
@@ -884,4 +886,4 @@ alertmanager_container_image: registry.redhat.io/openshift4/ose-prometheus-alert
 
 #container_exec_cmd:
 #docker: false
-
+#ceph_volume_debug: "{{ enable_ceph_volume_debug | ternary(1, 0)  }}"
index cd234b4d3e10856453822ec60b7d1f22fad750d1..1ed6208df9bcdc49dc0f90628ef6b6d455989b6e 100644 (file)
                 osd_fsid: "{{ item.osd_fsid }}"
                 destroy: false
               environment:
-                CEPH_VOLUME_DEBUG: 1
+                CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
                 CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
                 CEPH_CONTAINER_BINARY: "{{ container_binary }}"
               loop: "{{ osd_fsid_list }}"
                 data: "{{ item.device }}"
                 destroy: true
               environment:
-                CEPH_VOLUME_DEBUG: 1
+                CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
                 CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
                 CEPH_CONTAINER_BINARY: "{{ container_binary }}"
               loop: "{{ osd_fsid_list }}"
index 5c32a3a3e2d12527484372ae663866d3017b99c4..755898104608f614674ed1ea076e72debe369c49 100644 (file)
       wal_vg: "{{ item.wal_vg|default(omit) }}"
       action: "zap"
     environment:
-      CEPH_VOLUME_DEBUG: 1
+      CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
     with_items: "{{ lvm_volumes }}"
     when:
       - lvm_volumes | default([]) | length > 0
       data: "{{ item }}"
       action: "zap"
     environment:
-      CEPH_VOLUME_DEBUG: 1
+      CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
     with_items: "{{ devices | default([]) }}"
     when:
       - devices | default([]) | length > 0
index cebad947dc26aa2cfc637fdcae67e044e050018f..db317f99b0adcd553f75d4970c286be575b8767b 100644 (file)
       wal_vg: "{{ item.wal_vg|default(omit) }}"
       action: "zap"
     environment:
-      CEPH_VOLUME_DEBUG: 1
+      CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
       CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
       CEPH_CONTAINER_BINARY: "{{ container_binary }}"
     with_items: "{{ lvm_volumes }}"
       data: "{{ item }}"
       action: "zap"
     environment:
-      CEPH_VOLUME_DEBUG: 1
+      CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
       CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
       CEPH_CONTAINER_BINARY: "{{ container_binary }}"
     with_items: "{{ devices | default([]) }}"
index de9cd637cdf6d684246553044e2e52e85f9dae88..97f4520a80ae041e23512949ab4c02d06f80e71a 100644 (file)
     - name: scan ceph-disk osds with ceph-volume if deploying nautilus
       command: "ceph-volume --cluster={{ cluster }} simple scan --force"
       environment:
-        CEPH_VOLUME_DEBUG: 1
+        CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
       when:
         - ceph_release in ["nautilus", "octopus"]
         - not containerized_deployment | bool
     - name: activate scanned ceph-disk osds and migrate to ceph-volume if deploying nautilus
       command: "ceph-volume --cluster={{ cluster }} simple activate --all"
       environment:
-        CEPH_VOLUME_DEBUG: 1
+        CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
       when:
         - ceph_release in ["nautilus", "octopus"]
         - not containerized_deployment | bool
index 5a46269d6ce4216c8d4dc0c843b7550a71f04574..b4bb69af13387b656e5c02ce9bf156f299e575a5 100644 (file)
         action: "zap"
         osd_fsid: "{{ item.1 }}"
       environment:
-        CEPH_VOLUME_DEBUG: 1
+        CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
         CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
         CEPH_CONTAINER_BINARY: "{{ container_binary }}"
       delegate_to: "{{ item.0 }}"
index 2284587ed55057ae1816fb61654fbca8f7d31446..708262ec63c1f94d64ab014e2b757f6543e1e85e 100644 (file)
@@ -28,6 +28,6 @@
       ceph_volume:
         action: "inventory"
       environment:
-        CEPH_VOLUME_DEBUG: 1
+        CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
         CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
         CEPH_CONTAINER_BINARY: "{{ container_binary }}"
index bb406b477728a1b95884ee8636ddfacb941e2e10..74856b51b38699798d8910f73cadb7396ee250dd 100644 (file)
@@ -26,7 +26,7 @@
           action: "inventory"
         register: rejected_devices
         environment:
-          CEPH_VOLUME_DEBUG: 1
+          CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
           CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
           CEPH_CONTAINER_BINARY: "{{ container_binary }}"
           PYTHONIOENCODING: utf-8
@@ -53,7 +53,7 @@
           action: "batch"
         register: lvm_batch_report
         environment:
-          CEPH_VOLUME_DEBUG: 1
+          CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
           CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
           CEPH_CONTAINER_BINARY: "{{ container_binary }}"
           PYTHONIOENCODING: utf-8
@@ -73,7 +73,7 @@
       action: "list"
     register: lvm_list
     environment:
-      CEPH_VOLUME_DEBUG: 1
+      CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
       CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
       CEPH_CONTAINER_BINARY: "{{ container_binary }}"
       PYTHONIOENCODING: utf-8
index 99e81f69d4e391cee152bdd4fe54622daafe0ff2..39548fe70b3b63f3bdf2f48bd6104c797f843602 100644 (file)
@@ -316,6 +316,8 @@ mon_host_v1:
 mon_host_v2:
   suffix: ':3300'
 
+enable_ceph_volume_debug: False
+
 ##########
 # CEPHFS #
 ##########
@@ -876,3 +878,4 @@ client_connections: {}
 
 container_exec_cmd:
 docker: false
+ceph_volume_debug: "{{ enable_ceph_volume_debug | ternary(1, 0)  }}"
\ No newline at end of file
index a34400e7ac0ea2b250facebefc2cd5a45a157920..0649c654fb6999911ea95a48afa7f1406cc5d5d4 100644 (file)
@@ -15,7 +15,7 @@
     journal_devices: "{{ dedicated_devices | unique if dedicated_devices | length > 0 else omit }}"
     action: "batch"
   environment:
-    CEPH_VOLUME_DEBUG: 1
+    CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
     CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
     CEPH_CONTAINER_BINARY: "{{ container_binary }}"
     PYTHONIOENCODING: utf-8
index ca248d38279e029ea76eed051624a985f1f8ab19..3ef5967f44783cc5efcd332cc4ae8d118a41a926 100644 (file)
@@ -15,7 +15,7 @@
     dmcrypt: "{{ dmcrypt|default(omit) }}"
     action: "{{ 'prepare' if containerized_deployment else 'create' }}"
   environment:
-    CEPH_VOLUME_DEBUG: 1
+    CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
     CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
     CEPH_CONTAINER_BINARY: "{{ container_binary }}"
     PYTHONIOENCODING: utf-8