control: tags -1 patch On 2016-11-16 12:14:43 [+0100], Filip Pytloun wrote: > To reproduce the issue simply install salt-master and run salt-call: > > apt-get install salt-master > salt-call > > Following exception will occur: > > Traceback (most recent call last): > File "/usr/bin/salt-call", line 11, in <module> > salt_call() … > File "/usr/lib/python2.7/dist-packages/salt/utils/rsax931.py", line 63, in > _init_libcrypto > libcrypto.OPENSSL_no_config() > File "/usr/lib/python2.7/ctypes/__init__.py", line 375, in __getattr__ > func = self.__getitem__(name) > File "/usr/lib/python2.7/ctypes/__init__.py", line 380, in __getitem__ > func = self._FuncPtr((name_or_ordinal, self)) > AttributeError: /lib/x86_64-linux-gnu/libcrypto.so.1.1: undefined symbol: > OPENSSL_no_config
the problem is that salt/rsax931.py loads the library manually and expects certain symbols which are no longer available in OpenSSL 1.1.0. And it loads the first libcrypto it finds plus has no dependency on openssl. Sebastian
>From 67676f782796071a793ec1908de50c7b86e9fbee Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <sebast...@breakpoint.cc> Date: Thu, 17 Nov 2016 20:43:04 +0000 Subject: [PATCH] load libcrypto.1.0.2 and not libcrypto.1.1.0 Signed-off-by: Sebastian Andrzej Siewior <sebast...@breakpoint.cc> --- debian/control | 1 + salt/utils/rsax931.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 5947de1336fb..b60ca31b52b2 100644 --- a/debian/control +++ b/debian/control @@ -31,6 +31,7 @@ Depends: python-apt, python-requests (>= 1.0.0), python-tornado (>= 4.2), python-yaml, + libssl1.0.2, ${misc:Depends}, ${python:Depends} Recommends: lsb-release, python-croniter diff --git a/salt/utils/rsax931.py b/salt/utils/rsax931.py index 9eb1f4a1faf0..2d73cc2428ed 100644 --- a/salt/utils/rsax931.py +++ b/salt/utils/rsax931.py @@ -28,7 +28,8 @@ from ctypes.util import find_library os.path.dirname(sys.executable), 'libcrypto.so*'))[0]) else: - lib = find_library('crypto') + # We need to load the lib from 1.0.2 and not what might come first + lib = "libcrypto.so.1.0.2" if not lib and salt.utils.is_smartos(): # smartos does not have libraries in std location lib = glob.glob(os.path.join( -- 2.10.2