Adds a default for failure_cache.min_ttl#21085
Adds a default for failure_cache.min_ttl#21085andrewkroh merged 2 commits intoelastic:masterfrom ycombinator:lb-processors-dns-min-ttl-default
Conversation
|
Pinging @elastic/siem (Team:SIEM) |
💔 Tests FailedExpand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
|
@ycombinator by looking at the linked discuss case I'm not sure if this PR is sufficient for the fix. I've had to add the following changes: diff --git a/libbeat/processors/dns/config.go b/libbeat/processors/dns/config.go
index 9c430a8845..ad9809325d 100644
--- a/libbeat/processors/dns/config.go
+++ b/libbeat/processors/dns/config.go
@@ -29,7 +29,7 @@ import (
// Config defines the configuration options for the DNS processor.
type Config struct {
- CacheConfig
+ CacheConfig `config:",inline"`
Nameservers []string `config:"nameservers"` // Required on Windows. /etc/resolv.conf is used if none are given.
Timeout time.Duration `conifg:"timeout"` // Per request timeout (with 2 nameservers the total timeout would be 2x).
Type string `config:"type" validate:"required"` // Reverse is the only supported type currently.
@@ -89,7 +89,7 @@ type CacheSettings struct {
TTL time.Duration `config:"ttl"`
// Minimum TTL value for successful DNS responses.
- MinTTL time.Duration `config:"min_ttl" validate:"min=1"`
+ MinTTL time.Duration `config:"min_ttl" validate:"min=1ns"`
// Initial capacity. How much space is allocated at initialization.
InitialCapacity int `config:"capacity.initial" validate:"min=0"` |
Co-authored-by: Adrian Serrano <adrisr83@gmail.com>
* Adds a default for failure_cache.min_ttl * Parse YAML as inline + fix default value Fixes elastic#21103 Co-authored-by: Adrian Serrano <adrisr83@gmail.com> (cherry picked from commit ddfe085)
* upstream/master: feat: prepare release pipelines (elastic#21238) Add IP validation to Security module (elastic#21325) Fixes for new 7.10 rsa2elk datasets (elastic#21240) o365input: Restart after fatal error (elastic#21258) Fix panic in cgroups monitoring (elastic#21355) Handle multiple upstreams in ingress-controller (elastic#21215) [CI] Fix runbld when workspace does not exist (elastic#21350) [Filebeat] Fix checkpoint (elastic#21344) [CI] Archive build reasons (elastic#21347) Add dashboard for pubsub metricset in googlecloud module (elastic#21326) [Elastic Agent] Allow embedding of certificate (elastic#21179) Adds a default for failure_cache.min_ttl (elastic#21085) [libbeat] Disk queue implementation (elastic#21176)
What does this PR do?
It adds a default value for the
failure_cache.min_ttlsetting added in #18986. The default value is the same as that for thesuccess_cache.min_ttlsetting.Why is it important?
As reported in https://discuss.elastic.co/t/fail-to-unpack-the-dns-configuration-requires-duration-1-accessing-processors-0-dns-min-ttl/248453/1, before the change in this PR, when a user configures the DNS processor minimally like so:
The following error is thrown:
Resolves #21103.