common: don't enable debug log on ceph-volume calls by default

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>
pull/5652/head
Guillaume Abrioux 2020-08-05 18:02:48 +02:00
parent 110eaf5f9f
commit 448cc280b7
12 changed files with 24 additions and 17 deletions

View File

@ -324,6 +324,8 @@ dummy:
#mon_host_v2:
# suffix: ':3300'
#enable_ceph_volume_debug: False
##########
# CEPHFS #
##########
@ -889,4 +891,4 @@ dummy:
#container_exec_cmd:
#docker: false
#ceph_volume_debug: "{{ enable_ceph_volume_debug | ternary(1, 0) }}"

View File

@ -324,6 +324,8 @@ ceph_iscsi_config_dev: false
#mon_host_v2:
# suffix: ':3300'
#enable_ceph_volume_debug: False
##########
# CEPHFS #
##########
@ -889,4 +891,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) }}"

View File

@ -217,7 +217,7 @@
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 }}"
@ -229,7 +229,7 @@
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 }}"

View File

@ -499,7 +499,7 @@
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
@ -510,7 +510,7 @@
data: "{{ item }}"
action: "zap"
environment:
CEPH_VOLUME_DEBUG: 1
CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
with_items: "{{ devices | default([]) }}"
when:
- devices | default([]) | length > 0

View File

@ -300,7 +300,7 @@
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 }}"
@ -311,7 +311,7 @@
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([]) }}"

View File

@ -408,7 +408,7 @@
- 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
@ -416,7 +416,7 @@
- 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

View File

@ -211,7 +211,7 @@
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 }}"

View 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 }}"

View 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

View File

@ -316,6 +316,8 @@ mon_host_v1:
mon_host_v2:
suffix: ':3300'
enable_ceph_volume_debug: False
##########
# CEPHFS #
##########
@ -881,3 +883,4 @@ client_connections: {}
container_exec_cmd:
docker: false
ceph_volume_debug: "{{ enable_ceph_volume_debug | ternary(1, 0) }}"

View 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

View 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