Created attachment 257385 [details] Add crytography to PYTHON_USES Salt requires the cryptography library, and will happily fill up your disk with backtraces in the minion log if it doesn't have it: File "/usr/local/lib/python3.11/site-packages/salt/crypt.py", line 235, in __init__ self.key = get_rsa_key(path, passphrase) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/salt/crypt.py", line 351, in get_rsa_key return _get_key_with_evict(path, str(os.path.getmtime(path)), passphrase) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/salt/utils/decorators/__init__.py", line 296, in _memoize cache[args_] = func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/salt/crypt.py", line 333, in _get_key_with_evict return serialization.load_pem_private_key( ^^^^^^^^^^^^^ NameError: name 'serialization' is not defined So... add it :)
I confirm without py311-cryptography in a newly created 14.2 jail, salt is unable to create a private key to offer to the salt_master with the following error: [DEBUG ] salt.crypt.get_rsa_key: Loading private key [DEBUG ] salt.crypt._get_key_with_evict: Loading private key [CRITICAL] Unexpected error while connecting to verdi.p-o.co.uk After installing py311-cryptography salt creates a key and salt minion connects as normal.
I can confirm that installing cryptography solves this problem, but I can imagine the issue is related to https://github.com/saltstack/salt/issues/68024 https://github.com/saltstack/salt/issues/68036
I can confirm this as well.
Will work on it.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=5f890d753f568452ab44a551dbabd5878cea99f1 commit 5f890d753f568452ab44a551dbabd5878cea99f1 Author: fullermd@over-yonder.net <fullermd@over-yonder.net> AuthorDate: 2025-05-26 07:42:28 +0000 Commit: Xavier Beaudouin <kiwi@FreeBSD.org> CommitDate: 2025-05-26 09:56:09 +0000 sysutils/py-salt: Add missing cryptography dependancy Add cryptography to PYTHON_USES. Salt requires the cryptography library, and will happily fill up /var/log/salt with backtraces in the minion log if it doesn't have it. PR: 284715 Approved by: 0mp (mentor) Approved by: maintainer timeout Differential Revision: https://reviews.freebsd.org/D50530 sysutils/py-salt/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Hi! The fix has been commited! Thanks