saltstack/salt
Voir sur GitHubsmtp returner: encryption via gpgowner option not working
Open
#54 721 ouverte le 23 sept. 2019
Confirmedbuggood first issueseverity-high
Métriques du dépôt
- Stars
- (13 710 stars)
- Métriques de merge PR
- (Merge moyen 72j 6h) (221 PRs mergées en 30 j)
Description
Description of Issue
The smtp.gpgowner option is not working (anymore).
First error is that gpg will not accept the option "--trust-model always" this way:
2019-09-23 15:53:19,567 [salt.utils.event :1249][ERROR ][28910] Could not store events - returner 'smtp.event_return' raised exception: Error invoking gpg: 2: [GNUPG:] FAILURE option-parser 33554433
gpg: invalid option "--trust-model always"
When changing the code so it reads "--trust-model=always" (added the "=") then it seems to work, but then this error occurs:
2019-09-23 16:23:02,499 [salt.utils.event :1249][ERROR ][20550] Could not store events - returner 'smtp.event_return' raised exception: StringIO instance has no attribute 'encode'
Setup
GnuPG Version: 2.2.17 python gnupg: 0.4.3
master config snipped
event_return: smtp
event_return_whitelist:
- salt/job/*/ret/*
smtp.fields: id,fun
...
smtp.gpgowner: /etc/salt
Anf with a valid gnupg home being in /etc/salt/.gnupg
Steps to Reproduce Issue
salt-call state.highstate
Versions Report
# salt --versions-report
Salt Version:
Salt: 2019.2.0
Dependency Versions:
cffi: 1.11.4
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: 0.6.4
gitpython: 1.0.2
ioflo: Not Installed
Jinja2: 2.10.1
libgit2: 0.28.3
libnacl: 1.6.1
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.6.1
mysql-python: Not Installed
pycparser: 2.14
pycrypto: 3.6.6
pycryptodome: Not Installed
pygit2: 0.28.2
Python: 2.7.15 (default, Aug 11 2019, 03:43:36)
python-gnupg: 0.4.3
PyYAML: 5.1
PyZMQ: 16.0.2
RAET: Not Installed
smmap: 0.9.0
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.2
System Versions:
dist: gentoo 2.6
locale: UTF-8
machine: x86_64
release: 4.9.74-grsecurity
system: Linux
version: Gentoo Base System 2.6