Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

salt-key -a returns exit code 0 on error #42468

Closed
kevinquinnyo opened this issue Jul 21, 2017 · 1 comment
Closed

salt-key -a returns exit code 0 on error #42468

kevinquinnyo opened this issue Jul 21, 2017 · 1 comment
Labels
Duplicate Duplicate of another issue or PR - will be closed
Milestone

Comments

@kevinquinnyo
Copy link
Contributor

Description of Issue/Question

Exit code from salt-key -a not appropriate (IMO) when key glob is not found.

root@ubuntu:~# salt-key -a key-that-does-not-exist
The key glob 'key-that-does-not-exist' does not match any unaccepted keys.
root@ubuntu:~# echo $?
0

I expected this to return a non-zero exit status. Is it supposed to be 'idempotent' and as such not return failure?

When writing a script to check if a key is accepted, you pretty much have to pipe the command to grep.

This is a very trivial issue, but I figured I might as well report it.

Setup

No setup necessary.

Steps to Reproduce Issue

See above.

Versions Report

Salt Version:
Salt: 2017.7.0

Dependency Versions:
cffi: 1.10.0
cherrypy: 3.5.0
dateutil: 2.4.2
docker-py: Not Installed
gitdb: 0.6.4
gitpython: 1.0.1
ioflo: Not Installed
Jinja2: 2.8
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: 1.0.3
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: 2.18
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.12 (default, Nov 19 2016, 06:48:10)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.2.0
RAET: Not Installed
smmap: 0.9.0
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4

System Versions:
dist: Ubuntu 16.04 xenial
locale: UTF-8
machine: x86_64
release: 4.4.0-62-generic
system: Linux
version: Ubuntu 16.04 xenial

@gtmanfred
Copy link
Contributor

This is a duplicate of #18562 which is a duplicate of #18510

@gtmanfred gtmanfred marked this as a duplicate of #18562 Jul 21, 2017
@gtmanfred gtmanfred marked this as a duplicate of #18510 Jul 21, 2017
@gtmanfred gtmanfred added the Duplicate Duplicate of another issue or PR - will be closed label Jul 21, 2017
@gtmanfred gtmanfred added this to the Blocked milestone Jul 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate Duplicate of another issue or PR - will be closed
Projects
None yet
Development

No branches or pull requests

2 participants