Merge branch '2017.7' into avoid_ssl_race

This commit is contained in:
Pedro Algarvio 2019-02-28 07:22:24 +00:00 committed by GitHub
commit e99654d4ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View file

@ -30,6 +30,10 @@ def _check_zfs():
Looks to see if zfs is present on the system.
'''
# Get the path to the zfs binary.
# Don't try to load this on Windows (#51703)
# Don't merge this forward
if salt.utils.platform.is_windows():
return False, 'ZFS: Not available on Windows'
return salt.utils.which('zfs')

View file

@ -648,14 +648,18 @@ def _fetch_events(q):
atexit.register(_clean_queue)
a_config = AdaptedConfigurationTestCaseMixin()
event = salt.utils.event.get_event('minion', sock_dir=a_config.get_config('minion')['sock_dir'], opts=a_config.get_config('minion'))
event = salt.utils.event.get_event(
'minion',
sock_dir=a_config.get_config('minion')['sock_dir'],
opts=a_config.get_config('minion'),
)
while True:
try:
events = event.get_event(full=False)
except Exception:
except Exception as exc:
# This is broad but we'll see all kinds of issues right now
# if we drop the proc out from under the socket while we're reading
pass
log.exception("Exception caught while getting events %r", exc)
q.put(events)