mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge branch '2015.8' into '2016.3'
No conflicts.
This commit is contained in:
commit
5f499cfd41
4 changed files with 13 additions and 3 deletions
|
@ -489,10 +489,14 @@ class AsyncAuth(object):
|
|||
error = SaltClientError('Attempt to authenticate with the salt master failed')
|
||||
self._authenticate_future.set_exception(error)
|
||||
else:
|
||||
AsyncAuth.creds_map[self.__key(self.opts)] = creds
|
||||
key = self.__key(self.opts)
|
||||
AsyncAuth.creds_map[key] = creds
|
||||
self._creds = creds
|
||||
self._crypticle = Crypticle(self.opts, creds['aes'])
|
||||
self._authenticate_future.set_result(True) # mark the sign-in as complete
|
||||
# Notify the bus about creds change
|
||||
event = salt.utils.event.get_event(self.opts.get('__role'), opts=self.opts, listen=False)
|
||||
event.fire_event({'key': key, 'creds': creds}, salt.utils.event.tagify(prefix='auth', suffix='creds'))
|
||||
|
||||
@tornado.gen.coroutine
|
||||
def sign_in(self, timeout=60, safe=True, tries=1, channel=None):
|
||||
|
|
|
@ -1940,6 +1940,12 @@ class Minion(MinionBase):
|
|||
elif package.startswith('_salt_error'):
|
||||
log.debug('Forwarding salt error event tag={tag}'.format(tag=tag))
|
||||
self._fire_master(data, tag)
|
||||
elif package.startswith('salt/auth/creds'):
|
||||
tag, data = salt.utils.event.MinionEvent.unpack(package)
|
||||
key = tuple(data['key'])
|
||||
log.debug('Updating auth data for {0}: {1} -> {2}'.format(
|
||||
key, salt.crypt.AsyncAuth.creds_map.get(key), data['creds']))
|
||||
salt.crypt.AsyncAuth.creds_map[tuple(data['key'])] = data['creds']
|
||||
|
||||
def _fallback_cleanups(self):
|
||||
'''
|
||||
|
|
|
@ -385,7 +385,7 @@ def _netstat_route_freebsd():
|
|||
out = __salt__['cmd.run'](cmd, python_shell=True)
|
||||
for line in out.splitlines():
|
||||
comps = line.split()
|
||||
if __grains__['os'] == 'FreeBSD' and __grains__.get('osmajorrelease', 0) < 10:
|
||||
if __grains__['os'] == 'FreeBSD' and int(__grains__.get('osmajorrelease', 0)) < 10:
|
||||
ret.append({
|
||||
'addr_family': 'inet',
|
||||
'destination': comps[0],
|
||||
|
|
|
@ -653,7 +653,7 @@ class SaltEvent(object):
|
|||
self.opts['max_event_size'],
|
||||
is_msgpacked=True,
|
||||
)
|
||||
log.debug('Sending event - data = {0}'.format(data))
|
||||
log.debug('Sending event: tag = {0}; data = {1}'.format(tag, data))
|
||||
event = '{0}{1}{2}'.format(tag, tagend, serialized_data)
|
||||
msg = salt.utils.to_bytes(event, 'utf-8')
|
||||
if self._run_io_loop_sync:
|
||||
|
|
Loading…
Add table
Reference in a new issue