{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/31293","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/31293/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/31293/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/31293/events","html_url":"https://github.com/saltstack/salt/issues/31293","id":134425078,"number":31293,"title":"Git Pillars lose HEAD reference over time","user":{"login":"deuscapturus","id":5497572,"avatar_url":"https://avatars.githubusercontent.com/u/5497572?v=3","gravatar_id":"","url":"https://api.github.com/users/deuscapturus","html_url":"https://github.com/deuscapturus","followers_url":"https://api.github.com/users/deuscapturus/followers","following_url":"https://api.github.com/users/deuscapturus/following{/other_user}","gists_url":"https://api.github.com/users/deuscapturus/gists{/gist_id}","starred_url":"https://api.github.com/users/deuscapturus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deuscapturus/subscriptions","organizations_url":"https://api.github.com/users/deuscapturus/orgs","repos_url":"https://api.github.com/users/deuscapturus/repos","events_url":"https://api.github.com/users/deuscapturus/events{/privacy}","received_events_url":"https://api.github.com/users/deuscapturus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Core","name":"Core","color":"fef2c0"},{"url":"https://api.github.com/repos/saltstack/salt/labels/High%20Severity","name":"High Severity","color":"ff9143"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Info%20Needed","name":"Info Needed","color":"c7def8"},{"url":"https://api.github.com/repos/saltstack/salt/labels/P2","name":"P2","color":"155fb5"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Pillar","name":"Pillar","color":"006b75"},{"url":"https://api.github.com/repos/saltstack/salt/labels/TEAM%20Core","name":"TEAM Core","color":"A9A9A9"}],"state":"open","locked":false,"assignee":{"login":"terminalmage","id":328598,"avatar_url":"https://avatars.githubusercontent.com/u/328598?v=3","gravatar_id":"","url":"https://api.github.com/users/terminalmage","html_url":"https://github.com/terminalmage","followers_url":"https://api.github.com/users/terminalmage/followers","following_url":"https://api.github.com/users/terminalmage/following{/other_user}","gists_url":"https://api.github.com/users/terminalmage/gists{/gist_id}","starred_url":"https://api.github.com/users/terminalmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terminalmage/subscriptions","organizations_url":"https://api.github.com/users/terminalmage/orgs","repos_url":"https://api.github.com/users/terminalmage/repos","events_url":"https://api.github.com/users/terminalmage/events{/privacy}","received_events_url":"https://api.github.com/users/terminalmage/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/37","html_url":"https://github.com/saltstack/salt/milestones/Blocked","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/37/labels","id":343741,"number":37,"title":"Blocked","description":"Issues which are blocked in some way, whether they need further discussion, clarification, justification, or are blocked for some other reason.","creator":{"login":"basepi","id":702318,"avatar_url":"https://avatars.githubusercontent.com/u/702318?v=3","gravatar_id":"","url":"https://api.github.com/users/basepi","html_url":"https://github.com/basepi","followers_url":"https://api.github.com/users/basepi/followers","following_url":"https://api.github.com/users/basepi/following{/other_user}","gists_url":"https://api.github.com/users/basepi/gists{/gist_id}","starred_url":"https://api.github.com/users/basepi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basepi/subscriptions","organizations_url":"https://api.github.com/users/basepi/orgs","repos_url":"https://api.github.com/users/basepi/repos","events_url":"https://api.github.com/users/basepi/events{/privacy}","received_events_url":"https://api.github.com/users/basepi/received_events","type":"User","site_admin":false},"open_issues":374,"closed_issues":747,"state":"open","created_at":"2013-05-28T22:24:12Z","updated_at":"2016-02-22T13:12:33Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2016-02-17T22:51:15Z","updated_at":"2016-02-22T15:26:39Z","closed_at":null,"body":"We have a salt master configured with several git pillar repos.  About once a day we start getting these errors:\r\n```\r\nError occured fetching git_pillar remote 'staging git@github.com:myorg/saltstack-pillars.git': Reference 'HEAD' not found \r\nException caught while initializing git_pillar remote 'staging git@github.com:myorg/saltstack-pillars.git': tuple index out of range \r\n```\r\n\r\nWe resolve the issue each day by deleting /var/cache/salt/master/git_pillar\r\n\r\nLooking into /var/cache/salt/master/git_pillar/c245a5b583965a1bc938b8104013601c/.git/  I see that HEAD is actually missing.  What would cause HEAD to be deleted randomly?\r\n\r\nmaster config: (all other gitpillar settings are default)\r\n```\r\next_pillar:\r\n  - git:\r\n    - staging git@github.com:myorg/saltstack-pillars.git:\r\n      - privkey: /root/.ssh/id_rsa2\r\n      - pubkey: /root/.ssh/id_rsa2.pub\r\n      - env: base\r\n  - git:\r\n    - master git@github.com:myorg/saltstack-pillars-serverconfig.git:\r\n      - privkey: /root/.ssh/id_rsa3\r\n      - pubkey: /root/.ssh/id_rsa3.pub\r\n      - env: base\r\n  - git:\r\n    - master git@github.com:myorg/saltstack-primedirective.git:\r\n      - privkey: /root/.ssh/id_rsa4\r\n      - pubkey: /root/.ssh/id_rsa4.pub\r\n      - env: base\r\n      - root: pillars\r\n  - git:\r\n    - master git@github.com:myorg/saltstack-paths.git:\r\n      - privkey: /root/.ssh/id_rsa5\r\n      - pubkey: /root/.ssh/id_rsa5.pub\r\n      - env: base\r\n      - root: pillars\r\n```\r\n\r\n\r\n```\r\nSalt Version:\r\n           Salt: 2015.8.5\r\n \r\nDependency Versions:\r\n         Jinja2: 2.7.3\r\n       M2Crypto: 0.21.1\r\n           Mako: Not Installed\r\n         PyYAML: 3.11\r\n          PyZMQ: 14.5.0\r\n         Python: 2.6.9 (unknown, Dec 17 2015, 01:08:55)\r\n           RAET: Not Installed\r\n        Tornado: 4.2.1\r\n            ZMQ: 4.0.5\r\n           cffi: Not Installed\r\n       cherrypy: 3.2.2\r\n       dateutil: 2.1\r\n          gitdb: 0.6.4\r\n      gitpython: 1.0.1\r\n          ioflo: Not Installed\r\n        libgit2: 0.20.0\r\n        libnacl: Not Installed\r\n   msgpack-pure: Not Installed\r\n msgpack-python: 0.4.6\r\n   mysql-python: Not Installed\r\n      pycparser: Not Installed\r\n       pycrypto: 2.6.1\r\n         pygit2: 0.20.3\r\n   python-gnupg: 0.3.7\r\n          smmap: 0.9.0\r\n        timelib: Not Installed\r\n \r\nSystem Versions:\r\n           dist:   \r\n        machine: x86_64\r\n        release: 4.1.13-19.30.amzn1.x86_64\r\n```\r\n\r\nThe same error appears in https://github.com/saltstack/salt/issues/28298 which should be resolved in 2015.8.5, so I don't think they are the same issue."},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/187228918","html_url":"https://github.com/saltstack/salt/issues/31293#issuecomment-187228918","issue_url":"https://api.github.com/repos/saltstack/salt/issues/31293","id":187228918,"user":{"login":"deuscapturus","id":5497572,"avatar_url":"https://avatars.githubusercontent.com/u/5497572?v=3","gravatar_id":"","url":"https://api.github.com/users/deuscapturus","html_url":"https://github.com/deuscapturus","followers_url":"https://api.github.com/users/deuscapturus/followers","following_url":"https://api.github.com/users/deuscapturus/following{/other_user}","gists_url":"https://api.github.com/users/deuscapturus/gists{/gist_id}","starred_url":"https://api.github.com/users/deuscapturus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deuscapturus/subscriptions","organizations_url":"https://api.github.com/users/deuscapturus/orgs","repos_url":"https://api.github.com/users/deuscapturus/repos","events_url":"https://api.github.com/users/deuscapturus/events{/privacy}","received_events_url":"https://api.github.com/users/deuscapturus/received_events","type":"User","site_admin":false},"created_at":"2016-02-22T15:26:39Z","updated_at":"2016-02-22T15:26:39Z","body":"@terminalmage No, HEAD does not continue to be written to after removal of the git_pillar cachedir.  But after some time the continuous run of init_git_pillar() starts again."}}