Uploaded image for project: 'OpenShift Logging'
  1. OpenShift Logging
  2. LOG-1723

In fluentd config, flush_interval can't be set with flush_mode=immediate

    XMLWordPrintable

Details

    • Logging (Core) - Sprint 206
    • Passed
    • NEW
    • NEW
    • Hide
      Before this update, if the `ClusterLogging` custom resource (CR) definition specified a `flush_interval` but did not set the value of `flush_mode` to `interval`, the fluentd configuration generated an error at runtime. With this update, the Red Hat OpenShift Logging Operator validates the `ClusterLogging` CR and does not generate the fluentd config if this field mismatch is present.
      Show
      Before this update, if the `ClusterLogging` custom resource (CR) definition specified a `flush_interval` but did not set the value of `flush_mode` to `interval`, the fluentd configuration generated an error at runtime. With this update, the Red Hat OpenShift Logging Operator validates the `ClusterLogging` CR and does not generate the fluentd config if this field mismatch is present.

    Description

      Fluentd configuration templates contain the following

        flush_mode {{.FlushMode}}
        flush_interval {{.FlushInterval}}
      

      It turns out, when flush_mode is immediate and flush_interval is specified, fluentd fails to start with the following stack trace:

      2021-05-20 00:28:32 +0000 [error]: fluent/log.rb:362:error: config error file="/etc/fluent/fluent.conf" error_class=Fluent::ConfigError error="'flush_interval' can't be specified when 'flush_mode' is not 'interval' explicitly: 'immediate'"
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/share/gems/gems/fluentd-1.7.4/lib/fluent/plugin/output.rb:359:in `configure'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/share/gems/gems/fluentd-1.7.4/lib/fluent/plugin_helper/server.rb:312:in `configure'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/share/gems/gems/fluentd-1.7.4/lib/fluent/plugin/out_forward.rb:172:in `configure'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/share/gems/gems/fluentd-1.7.4/lib/fluent/plugin.rb:164:in `configure'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/share/gems/gems/fluentd-1.7.4/lib/fluent/agent.rb:130:in `add_match'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/share/gems/gems/fluentd-1.7.4/lib/fluent/agent.rb:72:in `block in configure'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/share/gems/gems/fluentd-1.7.4/lib/fluent/agent.rb:64:in `each'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/share/gems/gems/fluentd-1.7.4/lib/fluent/agent.rb:64:in `configure'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/share/gems/gems/fluentd-1.7.4/lib/fluent/label.rb:31:in `configure'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/share/gems/gems/fluentd-1.7.4/lib/fluent/root_agent.rb:147:in `block in configure'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/share/gems/gems/fluentd-1.7.4/lib/fluent/root_agent.rb:147:in `each'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/share/gems/gems/fluentd-1.7.4/lib/fluent/root_agent.rb:147:in `configure'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/share/gems/gems/fluentd-1.7.4/lib/fluent/engine.rb:131:in `configure'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/share/gems/gems/fluentd-1.7.4/lib/fluent/engine.rb:96:in `run_configure'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/share/gems/gems/fluentd-1.7.4/lib/fluent/supervisor.rb:812:in `run_configure'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/share/gems/gems/fluentd-1.7.4/lib/fluent/supervisor.rb:558:in `block in run_worker'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/share/gems/gems/fluentd-1.7.4/lib/fluent/supervisor.rb:741:in `main_process'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/share/gems/gems/fluentd-1.7.4/lib/fluent/supervisor.rb:554:in `run_worker'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/share/gems/gems/fluentd-1.7.4/lib/fluent/command/fluentd.rb:330:in `<top (required)>'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in `require'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in `require'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/share/gems/gems/fluentd-1.7.4/bin/fluentd:8:in `<top (required)>'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/bin/fluentd:23:in `load'
        2021-05-20 00:28:32 +0000 [debug]: fluent/supervisor.rb:740:main_process: /usr/local/bin/fluentd:23:in `<main>'
      

      Attachments

        Activity

          People

            vimalkum@redhat.com Vimal Kumar
            vimalkum@redhat.com Vimal Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: