Software to automate the management and configuration of any infrastructure or application at scale. Install Salt from the Salt package repositories here:
Description
on a fresh master setup with gitfs/pillarfs using ssh keys, the error log is filled with known_hosts errors. the hostname in question is actually in the root user known_hosts file ( see end of report )
Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)
Please be as specific as possible and give set-up details.
[ ] on-prem machine
[ X ] 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
Fresh install of 3006.1 on debian 11. install salt master.
apt install libgit2 libgit2-dev
salt-pip install pygit2
add a gitfs and git pillar setup with ssh_key auth
check /var/log/salt/master for errors
gitfs_remotes:
- ssh://git@<hostname_removed>:2222/eng/<reponame>.git:
- pubkey: /etc/salt/pki/master/ssh_key/id_rsa.pub
- privkey: /etc/salt/pki/master/ssh_key/id_rsa
- fallback: main
- all_saltenvs: main
ext_pillar:
- git:
- main ssh://git@<hostname_removed>:2222/eng/<reponame>.git:
- pubkey: /etc/salt/pki/master/ssh_key/id_rsa.pub
- privkey: /etc/salt/pki/master/ssh_key/id_rsa
- root: pillar
- env: base
- fallback: main
Expected behavior
salt external git pillar should be able to connect.
error
2023-05-24 16:44:21,398 [salt.utils.gitfs :1894][ERROR ][144943] Error occurred fetching gitfs remote 'ssh://git@<hostname_removed>:2222/eng/<reponame>.git': error loading known_hosts:
Traceback (most recent call last):
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/gitfs.py", line 1870, in _fetch
fetch_results = origin.fetch(**fetch_kwargs)
File "/opt/saltstack/salt/extras-3.10/pygit2/remote.py", line 146, in fetch
payload.check_error(err)
File "/opt/saltstack/salt/extras-3.10/pygit2/callbacks.py", line 98, in check_error
check_error(error_code)
File "/opt/saltstack/salt/extras-3.10/pygit2/errors.py", line 65, in check_error
raise GitError(message)
_pygit2.GitError: error loading known_hosts:
2023-05-24 16:43:27,050 [salt.utils.gitfs :1894][ERROR ][144941] Error occurred fetching git_pillar remote 'main ssh://git@<hostname_removed>:2222/eng/<reponame>.git': error loading known_hosts:
Traceback (most recent call last):
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/gitfs.py", line 1870, in _fetch
fetch_results = origin.fetch(**fetch_kwargs)
File "/opt/saltstack/salt/extras-3.10/pygit2/remote.py", line 146, in fetch
payload.check_error(err)
File "/opt/saltstack/salt/extras-3.10/pygit2/callbacks.py", line 98, in check_error
check_error(error_code)
File "/opt/saltstack/salt/extras-3.10/pygit2/errors.py", line 65, in check_error
raise GitError(message)
_pygit2.GitError: error loading known_hosts:
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
```yaml
Salt Version:
Salt: 3006.1
Python Version:
Python: 3.10.11 (main, May 5 2023, 02:31:54) [GCC 11.2.0]
Dependency Versions:
cffi: 1.14.6
cherrypy: unknown
dateutil: 2.8.1
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 3.1.2
libgit2: 1.6.4
looseversion: 1.0.2
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.2
msgpack-pure: Not Installed
mysql-python: Not Installed
packaging: 22.0
pycparser: 2.21
pycrypto: Not Installed
pycryptodome: 3.9.8
pygit2: 1.12.1
python-gnupg: 0.4.8
PyYAML: 5.4.1
PyZMQ: 23.2.0
relenv: 0.12.3
smmap: Not Installed
timelib: 0.2.4
Tornado: 4.5.3
ZMQ: 4.3.4
System Versions:
dist: debian 11 bullseye
locale: utf-8
machine: x86_64
release: 5.10.0-11-amd64
system: Linux
version: Debian GNU/Linux 11 bullseye
```
Additional context
the hostname in question is actually in the root known_hosts file
Description on a fresh master setup with gitfs/pillarfs using ssh keys, the error log is filled with known_hosts errors. the hostname in question is actually in the root user known_hosts file ( see end of report )
Setup (Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)
Please be as specific as possible and give set-up details.
Steps to Reproduce the behavior
Expected behavior salt external git pillar should be able to connect.
error
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.) ```yaml Salt Version: Salt: 3006.1 Python Version: Python: 3.10.11 (main, May 5 2023, 02:31:54) [GCC 11.2.0] Dependency Versions: cffi: 1.14.6 cherrypy: unknown dateutil: 2.8.1 docker-py: Not Installed gitdb: Not Installed gitpython: Not Installed Jinja2: 3.1.2 libgit2: 1.6.4 looseversion: 1.0.2 M2Crypto: Not Installed Mako: Not Installed msgpack: 1.0.2 msgpack-pure: Not Installed mysql-python: Not Installed packaging: 22.0 pycparser: 2.21 pycrypto: Not Installed pycryptodome: 3.9.8 pygit2: 1.12.1 python-gnupg: 0.4.8 PyYAML: 5.4.1 PyZMQ: 23.2.0 relenv: 0.12.3 smmap: Not Installed timelib: 0.2.4 Tornado: 4.5.3 ZMQ: 4.3.4 System Versions: dist: debian 11 bullseye locale: utf-8 machine: x86_64 release: 5.10.0-11-amd64 system: Linux version: Debian GNU/Linux 11 bullseye ```Additional context the hostname in question is actually in the root known_hosts file