Setting up a git pillar using pygit2 as the provider doesn't work. It results in the following error being logged:
2019-02-25 10:49:27,819 [salt.utils.gitfs :1423][ERROR ][94841] Unable to get SHA of HEAD for git_pillar remote 'master https://git/sf/salt-pillar-test.git'
It looks like there is a fix for this in c02757d70b38813e566a47954fc1118a55c8116d but this didn't make it into 2018.3.4
(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)
Vanilla 2018.3.4 salt-master with the following config stub:
git_pillar_provider: pygit2
ext_pillar:
- git:
- master https://git/sf/salt-pillar-test.git
(Include debug logs if possible and relevant.)
(Provided by running salt --versions-report
. Please also mention any differences in master/minion versions.)
Salt Version:
Salt: 2018.3.4
Dependency Versions:
cffi: 1.11.5
cherrypy: Not Installed
dateutil: 2.5.3
docker-py: Not Installed
gitdb: 2.0.0
gitpython: 2.1.1
ioflo: Not Installed
Jinja2: 2.9.4
libgit2: 0.27.7
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: Not Installed
pycparser: 2.17
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: 0.27.4
Python: 3.5.3 (default, Sep 27 2018, 17:25:39)
python-gnupg: Not Installed
PyYAML: 3.12
PyZMQ: 16.0.2
RAET: Not Installed
smmap: 2.0.1
timelib: Not Installed
Tornado: 4.4.3
ZMQ: 4.2.1
System Versions:
dist: debian 9.8
locale: UTF-8
machine: x86_64
release: 4.9.0-8-amd64
system: Linux
version: debian 9.8
@sfozz Thanks for reporting this. I tested the use of git pillars on 2018.3.4 and did not run into any issues. Can the hostname git
from your config be resolved to the correct server?
Here is my config:
git_pillar_provider: pygit2
ext_pillar:
- git:
- master https://github.com/dwoz/salt-test-pillars.git
Version Report
Salt Version:
Salt: 2018.3.4
Dependency Versions:
cffi: 1.12.2
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.10
libgit2: 0.27.7
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.6.1
mysql-python: Not Installed
pycparser: 2.17
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: 0.27.4
Python: 3.5.3 (default, Sep 27 2018, 17:25:39)
python-gnupg: Not Installed
PyYAML: 3.13
PyZMQ: 18.0.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.1
System Versions:
dist: debian 9.8
locale: UTF-8
machine: x86_64
release: 4.9.0-8-amd64
system: Linux
version: debian 9.8
And some debug logs:
[DEBUG ] pygit2 git_pillar_provider enabled
[DEBUG ] Current fetch URL for git_pillar remote 'master https://github.com/dwoz/salt-test-pillars.git': https://github.com/dwoz/salt-test-pillars.git (desired: https://github.com/dwoz/salt-test-pillars.git)
[DEBUG ] Current refspecs for git_pillar remote 'master https://github.com/dwoz/salt-test-pillars.git': ['+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*'] (desired: ['+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*'])
[DEBUG ] Current http.sslVerify for git_pillar remote 'master https://github.com/dwoz/salt-test-pillars.git': true (desired: true)
[DEBUG ] Set update lock for git_pillar remote 'master https://github.com/dwoz/salt-test-pillars.git'
[DEBUG ] Fetching git_pillar remote 'master https://github.com/dwoz/salt-test-pillars.git'
I was working in this environment some more and saw the same error when doing salt * saltutil.sync_all
Didn't make it into 2019.2 either.
Most helpful comment
Didn't make it into 2019.2 either.