If there is a syntax error in the YAML, it should throw an error rather than exiting silently.
In some situations, curator runs and exits without any output if supplied with a configuration in which there is a YAML syntax error.
elasticsearch-curator-5.5.4-1.x86_64.rpm on an offline RHEL 7.4 (Maipo) machineclient:
hosts: ["10.10.10.10"]
port: 9200
use_ssl: True
certificate:'/etc/elasticsearch/ca.crt'
(Note the minor syntax error here: there should be a space after the : on the certificate line)
~/.curator/curator.yml, it will return curator_cli show_indices --loglevel DEBUG
or
curator --config ~/.curator/curator.yml --dry-run ./shrink.yml
It simply exits without any output to log or console.
Note that this seems to be related to the installation method - on a similar pip install the issue does not manifest.
I've reproduced this by building the Dockerfile from the v5.5.4 tag
Using the exact example above, the soon-to-be-updated code will yield:
$ python run_curator.py --config badyaml.yml action.yml
Unable to read/parse YAML file: badyaml.yml
while scanning a simple key
in "<unicode string>", line 5, column 3:
certificate:'/etc/elasticsearch/ ...
^
could not find expected ':'
in "<unicode string>", line 6, column 1:
^
and immediately terminate with an exit code of 1
Thank you @untergeek ! :)
Most helpful comment
Using the exact example above, the soon-to-be-updated code will yield:
and immediately terminate with an exit code of 1