magnusbaeck / logstash-filter-verifier

Apache License 2.0
191 stars 27 forks source link

daemon run "--pipeline" option seems to have a non-null default value #144

Closed nicolasreich closed 2 years ago

nicolasreich commented 2 years ago

Description

When running lfv in daemon mode with the --logstash-config option, it fails, saying that --pipeline and --logstash-config are mutually exclusive.

Example

On the latest released version (not built from source):

bash-4.2$ ./logstash-filter-verifier daemon run  --logstash-config /tmp --testcase-dir /tmp
logstash-filter-verifier: error: --pipeline and --logstash-config flags are mutual exclusive

This is fixed by adding --pipeline "" to the command line.

breml commented 2 years ago

@nicolasreich can you please provide some info about the version of LFV you are using? For me, it looks like in current master this should be resolved (see: https://github.com/magnusbaeck/logstash-filter-verifier/blob/master/internal/app/daemon_run.go#L51).

This has been fixed in https://github.com/magnusbaeck/logstash-filter-verifier/commit/db20b891e365e8c254ff91555a97f8c91a2c3c61, which has heen commited after beta.1. Maybe you can just run LFV with the following arguments daemon run --help. Can you see the following line in the output:

-p, --pipeline string          location of the pipelines.yml file to be processed (e.g. /etc/logstash/pipelines.yml)
nicolasreich commented 2 years ago

Ah, sorry about that then. It was on the latest released version, so beta.1, I should have been clearer in my initial question. Thanks for the answer!