T6539: add logging options to load-balancer reverse-proxy (backport #3753) #4080
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Summary
Add logging configuration options to
load-balancer reverse-proxy
Types of changes
Related Task(s)
Related PR(s)
Component(s) name
Proposed changes
The current configuration of haproxy (load-balancing reverse-proxy) includes two statically configured global options in
haproxy.cfg
:This does not provide flexibility to the user. Additionally, the current configuration logs all connection attempts across all services. This can be problematic for busy systems by producing large logs of unnecessary information.
This task aims to provide configuration options to allow the user to configure the syslog facility and severity of messages received. New options are provided as global-parameters, as well as within each service and backend:
Multiple logging facilities may be specified for each of the attachment points and this hierarchy allows for additional logging configuration options in the future (i.e. format, etc).
Reference haproxy documentation: https://www.haproxy.com/documentation/haproxy-configuration-manual/latest/#8
When none of these options are specified, the original behavior is preserved and the original global logging configuration will be present in
haproxy.cfg
.How to test
Configure logging options
Ensure the configuration has been rendered:
Ensure the service has been reloaded and is running (valid configuration):
Smoketest result
New test ensures that original logging behavior is preserved if not configured. Also tests multiple facilities configured for
global-parameters
,service
andbackend
items:Checklist:
This is an automatic backport of pull request #3753 done by [Mergify](https://mergify.com).