mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #811 from UtahDave/develop
Fix errors regarding dns_check
This commit is contained in:
commit
2fb3d61328
2 changed files with 5 additions and 2 deletions
|
@ -151,6 +151,7 @@ def minion_config(path):
|
|||
'cython_enable': False,
|
||||
'state_verbose': False,
|
||||
'acceptance_wait_time': 10,
|
||||
'dns_check': True,
|
||||
}
|
||||
|
||||
load_config(opts, path, 'SALT_MINION_CONFIG')
|
||||
|
|
|
@ -26,7 +26,8 @@ import zmq
|
|||
|
||||
# Import salt libs
|
||||
from salt.exceptions import AuthenticationError, MinionError, \
|
||||
CommandExecutionError, CommandNotFoundError, SaltInvocationError
|
||||
CommandExecutionError, CommandNotFoundError, SaltInvocationError, \
|
||||
SaltClientError
|
||||
import salt.client
|
||||
import salt.crypt
|
||||
import salt.loader
|
||||
|
@ -76,6 +77,7 @@ def safe_dns_check(addr):
|
|||
'will continue to be used').format(addr)
|
||||
log.error(err)
|
||||
raise SaltClientError
|
||||
return addr
|
||||
|
||||
|
||||
class SMinion(object):
|
||||
|
@ -453,7 +455,7 @@ class Minion(object):
|
|||
if self.opts['dns_check']:
|
||||
try:
|
||||
# Verify that the dns entry has not changed
|
||||
self.opts['master_ip'] = safe_dns_check()
|
||||
self.opts['master_ip'] = safe_dns_check(self.opts['master'])
|
||||
except SaltClientError:
|
||||
# Failed to update the dns, keep the old addr
|
||||
pass
|
||||
|
|
Loading…
Add table
Reference in a new issue