You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
During investigation of a customer issue, it was noted that msgpack will produce errors if it attempts to unpack an empty file.
Setup
User had enabled pillar caching, and then removed all pillar cached files etc. The code then create the replacement cache files, but they are empty and msgpack then will error when trying to unpack an empty file.
This was on RHEL 7 with msgpack 0.5.6.
Please be as specific as possible and give set-up details.
on-prem machine
VM (Virtualbox, KVM, etc. please specify)
VM running on a cloud service, please be explicit and add details
container (Kubernetes, Docker, containerd, etc. please specify)
or a combination, please be explicit
jails if it is FreeBSD
classic packaging
onedir packaging
used bootstrap to install
Steps to Reproduce the behavior
2023-02-09 15:43:02,891 [salt.master :1916][ERROR ][22024] Error in function _pillar:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/salt/master.py", line 1910, in run_func
ret = getattr(self, func)(load)
File "/usr/lib/python3.6/site-packages/salt/master.py", line 1604, in _pillar
clean_cache=load.get("clean_cache"),
File "/usr/lib/python3.6/site-packages/salt/pillar/__init__.py", line 83, in get_pillar
clean_cache=clean_cache,
File "/usr/lib/python3.6/site-packages/salt/pillar/__init__.py", line 432, in __init__
minion_cache_path=self._minion_cache_path(minion_id),
File "/usr/lib/python3.6/site-packages/salt/utils/cache.py", line 34, in factory
return CacheDisk(ttl, kwargs["minion_cache_path"], *args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/utils/cache.py", line 89, in __init__
self._read()
File "/usr/lib/python3.6/site-packages/salt/utils/cache.py", line 147, in _read
fp_, encoding=__salt_system_encoding__, raw=False
File "/usr/lib/python3.6/site-packages/salt/utils/msgpack.py", line 145, in unpack
return msgpack.unpack(stream, **_sanitize_msgpack_unpack_kwargs(kwargs))
File "/usr/local/lib64/python3.6/site-packages/msgpack/__init__.py", line 58, in unpack
return unpackb(data, **kwargs)
File "msgpack/_unpacker.pyx", line 200, in msgpack._unpacker.unpackb
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfe in position 0: invalid start byte
Expected behavior
Not to throw errors in log files, by checking if file is not empty before attempting to load (unpack) with msgpack
Screenshots
If applicable, add screenshots to help explain your problem.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
This version report shows msgpack 0.5.6 but a correct installation should show msgpack 0.6.2, hence this is not a correct installation, and questions have been asked of the customer about how they have installed Salt. Response has not been received at this time.
- Salt Version:
Salt: 3005.1Dependency Versions:
cffi: Not Installedcherrypy: Not Installeddateutil: 2.8.1docker-py: Not Installedgitdb: Not Installedgitpython: Not InstalledJinja2: 2.11.1libgit2: Not InstalledM2Crypto: 0.35.2Mako: Not Installedmsgpack: 0.5.6msgpack-pure: Not Installedmysql-python: Not Installedpycparser: Not Installedpycrypto: 2.6.1pycryptodome: 3.9.8pygit2: Not InstalledPython: 3.6.8 (default, Aug 13 2020, 07:46:32)python-gnupg: Not InstalledPyYAML: 3.13PyZMQ: 18.0.1smmap: Not Installedtimelib: Not InstalledTornado: 4.5.3ZMQ: 4.1.4Salt Extensions:
SSEAPE: 8.9.0.5System Versions:
dist: rhel 7.9 Maipolocale: UTF-8machine: x86_64release: 3.10.0-1160.76.1.el7.x86_64system: Linuxversion: Red Hat Enterprise Linux Server 7.9 Maipo
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Description
During investigation of a customer issue, it was noted that msgpack will produce errors if it attempts to unpack an empty file.
Setup
User had enabled pillar caching, and then removed all pillar cached files etc. The code then create the replacement cache files, but they are empty and msgpack then will error when trying to unpack an empty file.
This was on RHEL 7 with msgpack 0.5.6.
Please be as specific as possible and give set-up details.
Steps to Reproduce the behavior
Expected behavior
Not to throw errors in log files, by checking if file is not empty before attempting to load (unpack) with msgpack
Screenshots
If applicable, add screenshots to help explain your problem.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)This version report shows msgpack 0.5.6 but a correct installation should show msgpack 0.6.2, hence this is not a correct installation, and questions have been asked of the customer about how they have installed Salt. Response has not been received at this time.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: