Merge branch '2017.7' into win_update_2017.7

This commit is contained in:
Gareth J. Greenaway 2019-02-28 09:29:53 -08:00 committed by GitHub
commit b2cb1eb9a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 10 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

@ -55,6 +55,13 @@ def _init_libcrypto():
'''
libcrypto = _load_libcrypto()
try:
libcrypto.OPENSSL_init_crypto()
except AttributeError:
# Support for OpenSSL < 1.1 (OPENSSL_API_COMPAT < 0x10100000L)
libcrypto.OPENSSL_no_config()
libcrypto.OPENSSL_add_all_algorithms_noconf()
libcrypto.RSA_new.argtypes = ()
libcrypto.RSA_new.restype = c_void_p
libcrypto.RSA_free.argtypes = (c_void_p, )
@ -69,13 +76,6 @@ def _init_libcrypto():
libcrypto.RSA_private_encrypt.argtypes = (c_int, c_char_p, c_char_p, c_void_p, c_int)
libcrypto.RSA_public_decrypt.argtypes = (c_int, c_char_p, c_char_p, c_void_p, c_int)
try:
libcrypto.OPENSSL_init_crypto()
except AttributeError:
# Support for OpenSSL < 1.1 (OPENSSL_API_COMPAT < 0x10100000L)
libcrypto.OPENSSL_no_config()
libcrypto.OPENSSL_add_all_algorithms_noconf()
return libcrypto

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)