When the minion key is denied by the master then exit status 77 (permission denied)

This commit is contained in:
Thayne Harbaugh 2017-05-26 16:18:57 -06:00 committed by rallytime
parent b94a43b09e
commit 0a1e607748
No known key found for this signature in database
GPG key ID: E8F1A4B90D0DEA19
2 changed files with 3 additions and 2 deletions

View file

@ -635,7 +635,7 @@ class AsyncAuth(object):
'minion.\nOr restart the Salt Master in open mode to '
'clean out the keys. The Salt Minion will now exit.'
)
sys.exit(salt.defaults.exitcodes.EX_OK)
sys.exit(salt.defaults.exitcodes.EX_NOPERM)
# has the master returned that its maxed out with minions?
elif payload['load']['ret'] == 'full':
raise tornado.gen.Return('full')
@ -1186,7 +1186,7 @@ class SAuth(AsyncAuth):
'minion.\nOr restart the Salt Master in open mode to '
'clean out the keys. The Salt Minion will now exit.'
)
sys.exit(salt.defaults.exitcodes.EX_OK)
sys.exit(salt.defaults.exitcodes.EX_NOPERM)
# has the master returned that its maxed out with minions?
elif payload['load']['ret'] == 'full':
return 'full'

View file

@ -32,6 +32,7 @@ EX_UNAVAILABLE = 69 # service unavailable
EX_SOFTWARE = 70 # internal software error
EX_CANTCREAT = 73 # can't create (user) output file
EX_TEMPFAIL = 75 # temp failure; user is invited to retry
EX_NOPERM = 77 # permission denied
# The Salt specific exit codes are defined below: