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

Logging Operator should check semantics as well #1460

Open
OverOrion opened this issue Sep 5, 2023 · 5 comments
Open

Logging Operator should check semantics as well #1460

OverOrion opened this issue Sep 5, 2023 · 5 comments
Labels
bug Something isn't working pinned

Comments

@OverOrion
Copy link
Contributor

Bugs should be filed for issues encountered whilst operating logging-operator.
You should first attempt to resolve your issues through the community support
channels, e.g. Slack, in order to rule out individual configuration errors. #logging-operator
Please provide as much detail as possible.

Describe the bug:
If there is a syslog-ng configuration change which is syntactically correct, but semantically not (i.e., unknown destination/output) then the logging-operator's configcheck does not catch it.

Expected behaviour:
The configcheck should check for semantics as well during the validation.

Steps to reproduce the bug:
Follow the official quick start guide but the output should refer to something undefined.

Additional context:

Environment details:

  • Kubernetes version (e.g. v1.15.2):
  • Cloud-provider/provisioner (e.g. AKS, GKE, EKS, PKE etc):
  • logging-operator version (e.g. 2.1.1): master
  • Install method (e.g. helm or static manifests):
  • Logs from the misbehaving component (and any other relevant logs):
[2023-09-05T13:56:24.988862] Setting current version as config version; version='4.3'                                                                                                                                   [2023-09-05T13:56:25.063798] Error resolving reference; content='destination', name='output_quickstart_httpUnknown', location='/etc/syslog-ng/config/syslog-ng.conf:30:5'
  • Resource definition (possibly in YAML format) that caused the issue, without sensitive data:
kubectl --namespace quickstart apply -f - <<"EOF"
apiVersion: logging.banzaicloud.io/v1beta1
kind: SyslogNGFlow
metadata:
  name: log-generator
spec:
  match:
    regexp:
      value: "json#kubernetes#labels#app.kubernetes.io/instance"
      pattern: log-generator
      type: string
  localOutputRefs:
    - httpUnknown
---
apiVersion: logging.banzaicloud.io/v1beta1
kind: SyslogNGOutput
metadata:
  name: http
spec:
  http:
    url: http://logging-operator-test-receiver:8080
    headers:
      - "Content-Type: application/json"
    disk_buffer:
      dir: /buffers
      disk_buf_size: 512000000 # 512 MB
      reliable: true
EOF

/kind bug

@OverOrion OverOrion added the bug Something isn't working label Sep 5, 2023
@OverOrion OverOrion changed the title Configcheck should check semantics as well Logging Operator should check semantics as well Sep 5, 2023
@OverOrion
Copy link
Contributor Author

Somewhat related issue: #1432.

@pepov
Copy link
Member

pepov commented Sep 7, 2023

Yes, the intent is the same!

@pepov
Copy link
Member

pepov commented Sep 7, 2023

We could however add validation in the operator itself so that it catches output references that do not exist in the config. The fluentd config builder does this already.

Copy link

stale bot commented Nov 6, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!

@stale stale bot added the wontfix This will not be worked on label Nov 6, 2023
@OverOrion OverOrion added pinned and removed wontfix This will not be worked on labels Nov 6, 2023
@pepov pepov added this to the 4.6 milestone Jan 8, 2024
@pepov
Copy link
Member

pepov commented Mar 6, 2024

this can only be implemented for syslog-ng currently

@pepov pepov modified the milestones: 4.6, 4.x Mar 6, 2024
@pepov pepov removed this from the 4.x milestone Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pinned
Projects
None yet
Development

No branches or pull requests

2 participants