Closed Amorik closed 3 years ago
Hi @Amorik
Thanks for your detailed bug report. Thanks to all the details you provided, I was quickly able to find the root cause for this issue.
The problem is not within LFV but in the logstash-config package (which is maintained by myself), which is used by LFV to parse and process Logstash config files. I was able to reproduce the issue in a test case and I will try to fix this issue as soon as possible.
@magnusbaeck I fixed logstash-config and I have a branch (https://github.com/breml/logstash-filter-verifier/tree/bugfix-104) with the updated go.mod
file to reference the fixed version of logstash-config. But we do not yet have a maintenance branch for LFV v1.x, so I can not create the pull request.
@breml I've created a maint-1.x branch based on the commit prior to the one that started with the v2 refactoring so you should be all set for a PR. Thanks!
A PR that fixes the problem has been merged now. I'll issue a 1.6.3 release tomorrow.
Logstash-filter-verifer:
Operating System:
Logstash:
When setting large integers in Logstash configurations Logstash will represent them as exponent values (ie
2000000
becomes2e6
). This is typically fine as its all back end processing by Logstash, except in LFV's case when copying/cloning the respective configurations into its designated/tmp
directory. LFVs copy function(s) appear to replace the numbers in the configuration with the string exponent equivalent. The problem now is that Logstash, despite some sources saying otherwise, does not support exponent notation in place of integers; As a result Logstash crashes due to parsing errors.NOTE: The same errors can be seen when running Logstash without LFV when using exponent substitution.
Filter Test configuration
Filter configuration (working)
Filter configuration (broken)
tmp Filter configuration (working)
tmp Filter Configuration (broken)
Output (working)
Output (broken)
lfv-bignumbers-test.debug.txt