Git Pillar locks not managed by fileserver runner
I receive warnings in the master log file similar to the below:
Update lockfile is present for git_pillar remote 'master [email protected]:repo.git', skipping. If this warning persists, it is possible that the update process was interrupted. Removing /var/cache/salt/master/git_pillar/b2f9cc5623c6bfbe65a310fb7ef60a90/update.lk or running 'salt-run fileserver.clear_lock git_pillar' will allow updates to continue for this remote.
However, when I run fileserver.clear_lock, it doesn't unlock git_pillar, only gitfs. This is the same (as far as I can tell) for the entire fileserver module.
salt 2015.8.0-1809-g611d3e5 (Beryllium) on CentOS 7.
@fphhotchips, thanks for the report.
@terminalmage
OK, this has to do with the fact that the git_pillar code now shares the same backend with ~~git_pillar~~ gitfs. I didn't account for locks when I made the gitfs backend code pluggable, so the error message really only applies to gitfs and is a false error message.
Thanks for bringing this to my attention. I will take care of this and provide an accurate error message, as well as try to add some CLI functionality to remove the locks (which currently does not exist for git_pillar).
In the meantime, you can simply remove /var/cache/salt/master/git_pillar/b2f9cc5623c6bfbe65a310fb7ef60a90/update.lk to proceed.
https://github.com/saltstack/salt/pull/27802 contains a new runner function which will clear locks from components other than gitfs.
@fphhotchips in 2015.8.2, there will be a new runner function called cache.clear_git_lock that can be used to clear the git_pillar locks:
salt-run cache.clear_git_lock git_pillar
Pull request was merged, I'm going to close this.
sudo salt-run cache.clear_git_lock
returns:
'cache.clear_git_lock' is not available.
sudo salt --version salt 2015.8.1 (Beryllium)
@aabognah Yes, this is expected. Please re-read my earlier comment.