salt icon indicating copy to clipboard operation
salt copied to clipboard

Git Pillar locks not managed by fileserver runner

Open fphhotchips opened this issue 11 years ago • 7 comments

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 avatar Oct 07 '15 01:10 fphhotchips

@fphhotchips, thanks for the report.

@terminalmage

jfindlay avatar Oct 07 '15 22:10 jfindlay

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.

terminalmage avatar Oct 07 '15 23:10 terminalmage

https://github.com/saltstack/salt/pull/27802 contains a new runner function which will clear locks from components other than gitfs.

terminalmage avatar Oct 08 '15 22:10 terminalmage

@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

terminalmage avatar Oct 12 '15 16:10 terminalmage

Pull request was merged, I'm going to close this.

terminalmage avatar Oct 21 '15 14:10 terminalmage

sudo salt-run cache.clear_git_lock

returns:

'cache.clear_git_lock' is not available.

sudo salt --version salt 2015.8.1 (Beryllium)

aabognah avatar Nov 05 '15 19:11 aabognah

@aabognah Yes, this is expected. Please re-read my earlier comment.

terminalmage avatar Nov 06 '15 16:11 terminalmage