From 1bbac1e2e1b3ecc0b5ff4a43cfcdd770c3060a51 Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Mon, 5 Jun 2017 13:46:33 -0700 Subject: Reverted most of this pr 4356 except: adding openshift_logging_fluentd_buffer_queue_limit: 1024 openshift_logging_fluentd_buffer_size_limit: 1m openshift_logging_mux_buffer_queue_limit: 1024 openshift_logging_mux_buffer_size_limit: 1m and setting the matched environment variables. --- roles/openshift_hosted_logging/README.md | 2 -- roles/openshift_logging/README.md | 5 +++++ roles/openshift_logging/defaults/main.yml | 8 ++++---- roles/openshift_logging_fluentd/defaults/main.yml | 4 ++-- roles/openshift_logging_mux/defaults/main.yml | 8 ++++---- 5 files changed, 15 insertions(+), 12 deletions(-) (limited to 'roles') diff --git a/roles/openshift_hosted_logging/README.md b/roles/openshift_hosted_logging/README.md index ad1e9d92b..12ffe777d 100644 --- a/roles/openshift_hosted_logging/README.md +++ b/roles/openshift_hosted_logging/README.md @@ -25,8 +25,6 @@ - openshift_hosted_logging_use_journal: If this is unset or empty, logging will try to figure out from docker which log driver it is using (json-file or journald). You can set this param to "true" or "false" to force logging to use journal or not (but make sure you are sure which one docker is using). - openshift_hosted_logging_journal_source: By default, if this param is unset or empty, logging will use `/var/log/journal` if it exists, or `/run/log/journal` if not. You can use this param to force logging to use a different location. - openshift_hosted_logging_journal_read_from_head: Set to `true` to have fluentd read from the beginning of the journal, to get historical log data. Default is `false`. *WARNING* Using `true` may take several minutes or even hours, depending on the size of the journal, until any new records show up in Elasticsearch, and will cause fluentd to consume a lot of CPU and RAM resources. -- openshift_hosted_logging_fluentd_cpu_limit: The CPU limit for Fluentd pods. Defaults to "100m". -- openshift_hosted_logging_fluentd_memory_limit: The memory limit for Fluentd pods. Defaults to '512Mi'. When `openshift_hosted_logging_enable_ops_cluster` is `True`, there are some additional vars. These work the same as above for their non-ops counterparts, diff --git a/roles/openshift_logging/README.md b/roles/openshift_logging/README.md index 0c60ef6fd..dd0f22d4b 100644 --- a/roles/openshift_logging/README.md +++ b/roles/openshift_logging/README.md @@ -55,6 +55,9 @@ When both `openshift_logging_install_logging` and `openshift_logging_upgrade_log - `openshift_logging_fluentd_use_journal`: NOTE: Fluentd will attempt to detect whether or not Docker is using the journald log driver when using the default of empty. - `openshift_logging_fluentd_journal_read_from_head`: If empty, Fluentd will use its internal default, which is false. - `openshift_logging_fluentd_hosts`: List of nodes that should be labeled for Fluentd to be deployed to. Defaults to ['--all']. +- `openshift_logging_fluentd_buffer_queue_limit`: Buffer queue limit for Fluentd. Defaults to 1024. +- `openshift_logging_fluentd_buffer_size_limit`: Buffer chunk limit for Fluentd. Defaults to 1m. + - `openshift_logging_es_host`: The name of the ES service Fluentd should send logs to. Defaults to 'logging-es'. - `openshift_logging_es_port`: The port for the ES service Fluentd should sent its logs to. Defaults to '9200'. @@ -155,3 +158,5 @@ Elasticsearch OPS too, if using an OPS cluster: - `openshift_logging_mux_namespaces`: Default `[]` - additional namespaces to create for _external_ mux clients to associate with their logs - users will need to set this +- `openshift_logging_mux_buffer_queue_limit`: Default `[1024]` - Buffer queue limit for Mux. +- `openshift_logging_mux_buffer_size_limit`: Default `[1m]` - Buffer chunk limit for Mux. diff --git a/roles/openshift_logging/defaults/main.yml b/roles/openshift_logging/defaults/main.yml index d7c83d8e8..95a86354e 100644 --- a/roles/openshift_logging/defaults/main.yml +++ b/roles/openshift_logging/defaults/main.yml @@ -69,15 +69,15 @@ openshift_logging_kibana_ops_key: "" openshift_logging_kibana_ops_ca: "" openshift_logging_fluentd_nodeselector: "{{ openshift_hosted_logging_fluentd_nodeselector_label | default('logging-infra-fluentd=true') | map_from_pairs }}" -openshift_logging_fluentd_cpu_limit: "{{ openshift_hosted_logging_fluentd_cpu_limit | default('100m') }}" -openshift_logging_fluentd_memory_limit: "{{ openshift_hosted_logging_fluentd_memory_limit | default('512Mi') }}" +openshift_logging_fluentd_cpu_limit: 100m +openshift_logging_fluentd_memory_limit: 512Mi openshift_logging_fluentd_es_copy: false openshift_logging_fluentd_use_journal: "{{ openshift_hosted_logging_use_journal if openshift_hosted_logging_use_journal is defined else (docker_log_driver == 'journald') | ternary(True, False) if docker_log_driver is defined else (openshift.docker.log_driver == 'journald') | ternary(True, False) if openshift.docker.log_driver is defined else openshift.docker.options | search('--log-driver=journald') if openshift.docker.options is defined else default(omit) }}" openshift_logging_fluentd_journal_source: "{{ openshift_hosted_logging_journal_source | default('') }}" openshift_logging_fluentd_journal_read_from_head: "{{ openshift_hosted_logging_journal_read_from_head | default('') }}" openshift_logging_fluentd_hosts: ['--all'] -openshift_logging_fluentd_buffer_queue_limit: "{{ openshift_hosted_logging_fluentd_buffer_queue_limit | default('1024') }}" -openshift_logging_fluentd_buffer_size_limit: "{{ openshift_hosted_logging_fluentd_buffer_size_limit | default('1m') }}" +openshift_logging_fluentd_buffer_queue_limit: 1024 +openshift_logging_fluentd_buffer_size_limit: 1m openshift_logging_es_host: logging-es openshift_logging_es_port: 9200 diff --git a/roles/openshift_logging_fluentd/defaults/main.yml b/roles/openshift_logging_fluentd/defaults/main.yml index 41481f87e..228196d74 100644 --- a/roles/openshift_logging_fluentd/defaults/main.yml +++ b/roles/openshift_logging_fluentd/defaults/main.yml @@ -8,8 +8,8 @@ openshift_logging_fluentd_namespace: logging ### Common settings openshift_logging_fluentd_nodeselector: "{{ openshift_hosted_logging_fluentd_nodeselector_label | default('logging-infra-fluentd=true') | map_from_pairs }}" -openshift_logging_fluentd_cpu_limit: "{{ openshift_hosted_logging_fluentd_cpu_limit | default('100m') }}" -openshift_logging_fluentd_memory_limit: "{{ openshift_hosted_logging_fluentd_memory_limit | default('512Mi') }}" +openshift_logging_fluentd_cpu_limit: 100m +openshift_logging_fluentd_memory_limit: 512Mi openshift_logging_fluentd_hosts: ['--all'] # float time in seconds to wait between node labelling diff --git a/roles/openshift_logging_mux/defaults/main.yml b/roles/openshift_logging_mux/defaults/main.yml index 52d1c5320..77e47d38c 100644 --- a/roles/openshift_logging_mux/defaults/main.yml +++ b/roles/openshift_logging_mux/defaults/main.yml @@ -9,10 +9,10 @@ openshift_logging_mux_namespace: logging ### Common settings openshift_logging_mux_nodeselector: "{{ openshift_hosted_logging_mux_nodeselector_label | default('') | map_from_pairs }}" -openshift_logging_mux_cpu_limit: "{{ openshift_logging_mux_cpu_limit | default('500m') }}" -openshift_logging_mux_memory_limit: "{{ openshift_logging_mux_memory_limit | default('1Gi') }}" -openshift_logging_mux_buffer_queue_limit: "{{ openshift_logging_mux_buffer_queue_limit | default('1024') }}" -openshift_logging_mux_buffer_size_limit: "{{ openshift_logging_mux_buffer_size_limit | default('1m') }}" +openshift_logging_mux_cpu_limit: 500m +openshift_logging_mux_memory_limit: 2Gi +openshift_logging_mux_buffer_queue_limit: 1024 +openshift_logging_mux_buffer_size_limit: 1m openshift_logging_mux_replicas: 1 -- cgit v1.2.1