Skip to content

certutil return code on error #37841

@chriswhite199

Description

@chriswhite199

Elasticsearch version (bin/elasticsearch --version): 6.5.4

Plugins installed: []

JVM version (java -version): 1.8.0_192

OS version (uname -a if on a Unix-like system): Linux x86_64

Description of the problem including expected versus actual behavior:

bin/elasticsearch-certutil cert command yields an error message when you attempt to output certs to a zip file that already exists, but still returns a RC of 0.

This is an issue for scripts that may depend on the RC from running the certutil script as error detection should not depend on parsing stderr / stdout

Steps to reproduce:

  • Run the elasticsearch-certutil cert command twice with the --out /tmp/certs.zip argument
  • The second invocation yields an ERROR message to the console
  • The script exists with a RC of 0 (echo $?) rather than non-zero (indicating failure)

Provide logs (if relevant):

ERROR: Output file '/tmp/certs.zip' already exists

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions