-
Notifications
You must be signed in to change notification settings - Fork 26
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
syslog configuration doesn't work with provided docker_image #812
Comments
HI @mcousens thanks for opening this issue! If I understand you correctly, you've found two issues. Please correct me if I've misunderstood.
Thanks for all the details and research you've included in the issue. Really appreciate it! I was able to reproduce both issues you found. For the first issue, I can open up a PR to fix this bug. For the second issue, it looks like we might be able to use the Thank you for your time! |
Context: syslog should be automatically enabled if other fields (e.g. facility or name) values are provided. This is documented in CTS Issue: syslog enabled field has to be specifically set to true. Otherwise it is false even though other config fields are provided. This was caused by the default was set to enabled=false. When CTS builds the config, the user-provided config is merged with the default config. If the user left enabled unconfigured, it would merge with the default enabled=false. This results in enabled being set to false in a way that looks as though the user set enabled to false. Related: #812
Context: syslog should be automatically enabled if other fields (e.g. facility or name) values are provided. This is documented in CTS Issue: syslog enabled field has to be specifically set to true. Otherwise it is false even though other config fields are provided. This was caused by the default was set to enabled=false. When CTS builds the config, the user-provided config is merged with the default config. If the user left enabled unconfigured, it would merge with the default enabled=false. This results in enabled being set to false in a way that looks as though the user set enabled to false. Related: #812
Hi @lornasong, thanks so much for looking into this. Your understanding is spot on, and that’s great that it was reproducible. For the second issue, adding network and address parameters sounds like a good approach to us. As long as we can pass the network protocol and host:port to reach the syslog server outside the docker container we are happy campers. |
Hi @mcousens thanks so much for the reply and confirmation! That's helpful to know. For the first issue, I've put up a fix #815 that will go out with the next CTS release. Please let me know if you see any issues. For the second issue, I checked in with our team and wanted to see if we could get input on a few questions:
CC-ing our Product Manager @devarshishah3 Thank you |
Hi @lornasong Thanks for fix #815. I'm not a Go developer, but logically it looks sane to me :) See responses below:
|
@mcousens. Thanks for raising the issue and using CTS in your production environment. We would love to understand your environment, and CTS use case in more detail and gather feedback from you to shape CTS roadmap. Would you or someone from you team be open to a 45 min chat with us? |
Hi @devarshishah3, we'd be happy to chat. Feel free to reach out over email - Eventbrite has a hashicorp rep that should have my contact info (not sure if I should place it in this public forum :) ) |
Describe the bug
Enabling the advertised
syslog
integration in the global config options https://www.consul.io/docs/nia/configuration#global-config-options while running CTS via the provided docker image results in the below error:Of note, this error only occurs when explicitly enabling the integration (when you don't pass
enabled = true
the daemon will start but the syslog integration fails silently and doesn't do anything - despite "Specifying other option also enables syslog logging")Versions
Consul Terraform Sync
Consul Version
Terraform Version
Other Details
hashicorp/consul-terraform-sync-enterprise:0.5.2-ent
Configuration File(s)
Click to toggle contents of config file
Terraform Configuration Files Generated by Consul-Terraform-Sync
Click to toggle contents of main.tf
Click to toggle contents of terraform.tfvars
Terraform Module
If using a private or local Terraform module, share relevant parts of your module here.
Task Variable Files
If passing in task variable file(s), share relevant parts of your variable file(s) here.
Expected Behavior
Ability to pass host/port of syslog to CTS so that it can reach syslog running outside of container.
Actual Behavior
Daemon can't start, errors with
consul-terraform-sync/logging/logging.go
Lines 61 to 64 in 3030b23
It looks like the syslog golang wrapper library used defaults to localhost
https://github.com/hashicorp/go-syslog/blob/master/builtin.go#L56-L58
https://pkg.go.dev/log/syslog#Dial
and doesn't allow this to be overwritten. Thus, CTS tries to connect to syslog locally and the container is not running syslog so it throws an error.
Steps to Reproduce
Additional Context
The text was updated successfully, but these errors were encountered: