Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: ClusterFilter with recordTransformer doesn't handle parameter renewRecord #959

Closed
nkaijala-elisa opened this issue Oct 16, 2023 · 1 comment · Fixed by #960
Closed

Comments

@nkaijala-elisa
Copy link

Describe the issue

renewRecord is set to true in the manifest and the live ClusterFilter resource. It doesn't get applied in the generated fluentd config.

To Reproduce

Create a ClusterFilter with

spec:
  filters:
  - recordTransformer:
      renewRecord: true
      keepKeys: "message"

Expected behavior

A renewed record with one key kept.

Your Environment

- Fluent Operator version: v1.15.3
- Container Runtime: CRI-O, on OpenShift 4.11
- Operating system: RHEL 8.6
- Kernel version: 4.18.0

How did you install fluent operator?

  • Helm install
  • Installed Fluentd CRDs
  • Installed Fluentd in fluentd-only -mode
  • Set up Security Context Constraints (OpenShift requirement)

Additional context

fluentd pod logs:

2023-10-16 08:36:09 +0000 [info]: adding filter in @db681e4cb763ca5b7cdbf9ab76f67bbe pattern="**" type="record_transformer"
2023-10-16 08:36:09 +0000 [error]: #0 config error file="/fluentd/etc/fluent.conf" error_class=Fluent::ConfigError error="`renew_record` must be true to use `keep_keys`"
2023-10-16 08:36:09 +0000 [error]: Worker 0 exited unexpectedly with status 2
2023-10-16 08:36:09 +0000 [info]: Received graceful stop
level=error msg="Fluentd exited" error="exit status 2"
level=info msg=backoff delay=1s
level=info msg="backoff timer done" actual=1.000610697s expected=1s

ClusterFilter yaml:

$ oc get clusterfilters.fluentd.fluent.io fluentd-filter -o yaml

...
spec:
  filters:
  - recordTransformer:
      keepKeys: message
      renewRecord: true
@cw-Guo
Copy link
Collaborator

cw-Guo commented Oct 17, 2023

due to a bug in fluentd recordTransformer plugin, missed insert a parameter, see code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants