Skip to content

Commit

Permalink
common: don't enable debug log on ceph-volume calls by default
Browse files Browse the repository at this point in the history
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 448cc28)
  • Loading branch information
guits committed Aug 12, 2020
1 parent 223254e commit 8a7e419
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 17 deletions.
4 changes: 3 additions & 1 deletion group_vars/all.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ dummy:
#mon_host_v2:
# suffix: ':3300'

#enable_ceph_volume_debug: False

##########
# CEPHFS #
##########
Expand Down Expand Up @@ -884,4 +886,4 @@ dummy:

#container_exec_cmd:
#docker: false

#ceph_volume_debug: "{{ enable_ceph_volume_debug | ternary(1, 0) }}"
4 changes: 3 additions & 1 deletion group_vars/rhcs.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ ceph_iscsi_config_dev: false
#mon_host_v2:
# suffix: ':3300'

#enable_ceph_volume_debug: False

##########
# CEPHFS #
##########
Expand Down Expand Up @@ -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) }}"
4 changes: 2 additions & 2 deletions infrastructure-playbooks/filestore-to-bluestore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand All @@ -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 }}"
Expand Down
4 changes: 2 additions & 2 deletions infrastructure-playbooks/purge-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions infrastructure-playbooks/purge-container-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand All @@ -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([]) }}"
Expand Down
4 changes: 2 additions & 2 deletions infrastructure-playbooks/rolling_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -408,15 +408,15 @@
- 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
Expand Down
2 changes: 1 addition & 1 deletion infrastructure-playbooks/shrink-osd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down
2 changes: 1 addition & 1 deletion infrastructure-playbooks/storage-inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
6 changes: 3 additions & 3 deletions roles/ceph-config/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions roles/ceph-defaults/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ mon_host_v1:
mon_host_v2:
suffix: ':3300'

enable_ceph_volume_debug: False

##########
# CEPHFS #
##########
Expand Down Expand Up @@ -876,3 +878,4 @@ client_connections: {}

container_exec_cmd:
docker: false
ceph_volume_debug: "{{ enable_ceph_volume_debug | ternary(1, 0) }}"
2 changes: 1 addition & 1 deletion roles/ceph-osd/tasks/scenarios/lvm-batch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion roles/ceph-osd/tasks/scenarios/lvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8a7e419

Please sign in to comment.