]> 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>
Thu, 13 Aug 2020 12:21:44 +0000 (14:21 +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 1fa164d31a14655d9a6b53faa714c4f2dbe05cdc..918dcce256f2185da7c6daf553d07631d7a29e57 100644 (file)
@@ -324,6 +324,8 @@ dummy:
 #mon_host_v2:
 #  suffix: ':3300'
 
+#enable_ceph_volume_debug: False
+
 ##########
 # CEPHFS #
 ##########
@@ -883,4 +885,4 @@ dummy:
 
 #container_exec_cmd:
 #docker: false
-
+#ceph_volume_debug: "{{ enable_ceph_volume_debug | ternary(1, 0)  }}"
index 6c09dda994349bc282b9a1d089b123da1cf3e142..fe42feb9a52ddf3ef3655442a40b9306b3465acc 100644 (file)
@@ -324,6 +324,8 @@ ceph_iscsi_config_dev: false
 #mon_host_v2:
 #  suffix: ':3300'
 
+#enable_ceph_volume_debug: False
+
 ##########
 # CEPHFS #
 ##########
@@ -883,4 +885,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 73be95345acde9fabe9669913e7d65f85fccbf5f..a81ad4fda6351f97bd46afd9b8a9d6766211e431 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 a428361ed8ff976633fc26d0268fcca6ecdd3b24..ce3bf4c34422218cd272c4d4031327300987fa3c 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 0a3a6acda90259109333aeccf2baa4d42e78d2ef..32890a24ef1048960ea4c102b3a5f7ddccc36a48 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 4cdae47cf367810526434676c6aaf64615629476..4fd314f1301d21afe3c27126ca35518d8b9ed1e3 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 d08db5c10d84906d2027616f8c94fc867cea6a1a..6e21c361447a2fc16c455774703cc89a111e3765 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 98ac4813d37b2ff61e2b3e85689ea560037ddae2..9a94a485b3e523c510734511585252c78c494e38 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 ad753300dc09a246c3205186d10e144bb6a0eff0..5d88e79e07ae0db5dbaba8bf37a0b2ec3384d387 100644 (file)
@@ -316,6 +316,8 @@ mon_host_v1:
 mon_host_v2:
   suffix: ':3300'
 
+enable_ceph_volume_debug: False
+
 ##########
 # CEPHFS #
 ##########
@@ -875,3 +877,4 @@ use_fqdn_yes_i_am_sure: false
 
 container_exec_cmd:
 docker: false
+ceph_volume_debug: "{{ enable_ceph_volume_debug | ternary(1, 0)  }}"
\ No newline at end of file
index 5826af0f29de2f0afea5b097c398f553427db4d1..4b4ed4f4ac53dcc2c7fa5665d881957c78f91156 100644 (file)
@@ -14,7 +14,7 @@
     wal_devices: "{{ bluestore_wal_devices | unique if bluestore_wal_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 40dbe8f52b3d4aded719ee340d85bc5e084906e8..a2a5940a91e79e73cbe4c883fcd6f85cda0d90eb 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