From 19a1fbf8f758999262f52ea4113197480a44aba5 Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Wed, 1 Apr 2020 10:16:31 -0500 Subject: [PATCH] Ceph: Dont mount log directories to host This PS updates the bind mounts for ceph logs directorys to be emptydirs. This ensures we do not polute the hosts permanantly with ceph logs, which should be directed to stdout. Change-Id: I6d72c0864b9ecc493cd62564e0e0450d90cfcf00 Signed-off-by: Pete Birley --- ceph-mon/templates/daemonset-mon.yaml | 3 +- ceph-osd/templates/daemonset-osd.yaml | 3 +- tools/deployment/common/fluentd-daemonset.sh | 40 -------------------- 3 files changed, 2 insertions(+), 44 deletions(-) diff --git a/ceph-mon/templates/daemonset-mon.yaml b/ceph-mon/templates/daemonset-mon.yaml index 41fcff999..b9055c6b2 100644 --- a/ceph-mon/templates/daemonset-mon.yaml +++ b/ceph-mon/templates/daemonset-mon.yaml @@ -241,8 +241,7 @@ spec: - name: pod-etc-ceph emptyDir: {} - name: pod-var-log - hostPath: - path: {{ print "/var/log/ceph/" $envAll.Release.Name }} + emptyDir: {} - name: ceph-mon-bin configMap: name: ceph-mon-bin diff --git a/ceph-osd/templates/daemonset-osd.yaml b/ceph-osd/templates/daemonset-osd.yaml index 108df1a79..308f40fe9 100644 --- a/ceph-osd/templates/daemonset-osd.yaml +++ b/ceph-osd/templates/daemonset-osd.yaml @@ -431,8 +431,7 @@ spec: path: /var/lib/openstack-helm/ceph/var-tmp type: DirectoryOrCreate - name: pod-var-log - hostPath: - path: {{ print "/var/log/ceph/" $envAll.Release.Name }} + emptyDir: {} - name: ceph-osd-bin configMap: name: {{ printf "%s-%s" $envAll.Release.Name "bin" | quote }} diff --git a/tools/deployment/common/fluentd-daemonset.sh b/tools/deployment/common/fluentd-daemonset.sh index 9b1e6aeac..e17bbac29 100755 --- a/tools/deployment/common/fluentd-daemonset.sh +++ b/tools/deployment/common/fluentd-daemonset.sh @@ -75,16 +75,6 @@ conf: @type tail - - @type tail - tag ceph.* - path /var/log/ceph/*/*.log - read_from_head true - - @type none - - - @type tail tag libvirt.* @@ -151,14 +141,6 @@ conf: @type kubernetes_metadata - - @type record_transformer - - hostname "#{ENV['NODE_NAME']}" - fluentd_pod "#{ENV['POD_NAME']}" - - - @type record_transformer @@ -193,28 +175,6 @@ conf: user "#{ENV['ELASTICSEARCH_USERNAME']}" - - - chunk_limit_size 512K - flush_interval 5s - flush_thread_count 8 - queue_limit_length 32 - retry_forever false - retry_max_interval 30 - - host "#{ENV['ELASTICSEARCH_HOST']}" - reload_connections false - reconnect_on_error true - reload_on_failure true - include_tag_key true - logstash_format true - logstash_prefix ceph - password "#{ENV['ELASTICSEARCH_PASSWORD']}" - port "#{ENV['ELASTICSEARCH_PORT']}" - @type elasticsearch - user "#{ENV['ELASTICSEARCH_USERNAME']}" - - chunk_limit_size 512K