Salt-Master broken in 3.12
I'm seeing the following errors when attempting to process any return data from any salt minions on Alpine 3.12, even something as simple as a ping test causes it to fail.
salt_1 | [WARNING ] /usr/lib/python3.8/site-packages/salt/utils/dictdiffer.py:16: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
salt_1 | from collections import Mapping
salt_1 |
salt_1 | Process salt.transport.zeromq.<class 'method'>._publish_daemon:
salt_1 | Traceback (most recent call last):
salt_1 | File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
salt_1 | self.run()
salt_1 | File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
salt_1 | self._target(*self._args, **self._kwargs)
salt_1 | File "/usr/lib/python3.8/site-packages/salt/transport/zeromq.py", line 920, in _publish_daemon
salt_1 | unpacked_package = salt.payload.unpackage(package)
salt_1 | File "/usr/lib/python3.8/site-packages/salt/payload.py", line 47, in unpackage
salt_1 | return salt.utils.msgpack.loads(package_, use_list=True)
salt_1 | File "/usr/lib/python3.8/site-packages/salt/utils/msgpack.py", line 128, in unpackb
salt_1 | return msgpack.unpackb(packed, **_sanitize_msgpack_kwargs(kwargs))
salt_1 | File "msgpack/_unpacker.pyx", line 195, in msgpack._cmsgpack.unpackb
salt_1 | UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 0: invalid start byte
salt_1 | [ERROR ] Future <salt.ext.tornado.concurrent.Future object at 0x7fcc862eeee0> exception was never retrieved: Traceback (most recent call last):
salt_1 | File "/usr/lib/python3.8/site-packages/salt/ext/tornado/gen.py", line 309, in wrapper
salt_1 | yielded = next(result)
salt_1 | File "/usr/lib/python3.8/site-packages/salt/utils/process.py", line 531, in run
salt_1 | self.check_children()
salt_1 | File "/usr/lib/python3.8/site-packages/salt/utils/process.py", line 556, in check_children
salt_1 | for pid, mapping in six.iteritems(self._process_map):
salt_1 | RuntimeError: dictionary keys changed during iteration
salt_1 | Process salt.transport.zeromq.<class 'method'>._publish_daemon:
salt_1 | Traceback (most recent call last):
salt_1 | File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
salt_1 | self.run()
salt_1 | File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
salt_1 | self._target(*self._args, **self._kwargs)
salt_1 | File "/usr/lib/python3.8/site-packages/salt/transport/zeromq.py", line 920, in _publish_daemon
salt_1 | unpacked_package = salt.payload.unpackage(package)
salt_1 | File "/usr/lib/python3.8/site-packages/salt/payload.py", line 47, in unpackage
salt_1 | return salt.utils.msgpack.loads(package_, use_list=True)
salt_1 | File "/usr/lib/python3.8/site-packages/salt/utils/msgpack.py", line 128, in unpackb
salt_1 | return msgpack.unpackb(packed, **_sanitize_msgpack_kwargs(kwargs))
salt_1 | File "msgpack/_unpacker.pyx", line 195, in msgpack._cmsgpack.unpackb
salt_1 | UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 0: invalid start byte
Digging into this a little bit, Salt is working on full support for Python3.8 in the 3001, but in the meantime things are woefully broken.
Edgan on Freenode #salt suggested the following patch This is what he's using currently to overcome the 3.8 incompatibilities and has successfully deployed saltstack 3000.2 on Ubuntu 20.04 with it.
There's some additional information available here: https://github.com/saltstack/salt/issues/55835
Edited by Will Sinatra