New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gitfs cleans up wrong directories #27217
Comments
@nasenbaer13, thanks for the report. |
fixes #27217 clear_old_remotes clears wrong directory (gitfs)
No, it was correct the way it was. Can you please post your master config, as well as the version of Salt you are running? You shouldn't have the second "gitfs" there unless there is some misconfiguration. |
…y (gitfs)" This reverts commit cccdeee, as it was correct in the first place.
We're running the 2015.8 branch.
Our master config looks like this:
I can also confirm, that this fixes our problem with the gitfs directory vanishing during file transfer. |
For some reason, gitpython is not included in the output of --versions-report
|
It's not the correct fix, trust me. I'm not saying there's not a bug here, in fact I'm pretty sure the custom-named cachedir code (which was added for winrepo) just doesn't work properly with gitfs. I had a hunch you were using this, and while it's undocumented and not intended to be used for gitfs, it should still work if used. |
Oh ok. we introduced the name parameters in our attempt to fix the issue. As far as I remember, we had the issue as well before using the repo names. I can verify this next week. I am not sure how we should prevent the code above from deleting the gitfs directory during file transfer. It's cleaned up at that point. Or is the directory just wrong and has one gitfs too much?
In the latter case, it will not be cleaned up by the code. |
There is one too many "gitfs" there, and I'm not sure what would cause it as I can't reproduce this locally. |
Are you doing anything with root_dir or cachedir in the master config? |
What do you mean by 'doing anything'? The posted master config is complete. We'll have a look into the origin of the extra gitfs next week. |
I didn't know if that was a complete master config, since you appear to have redacted information from at least the |
You mean the space in line 11? This is actually present in our master config. So is this valid yaml? I also replaced two strings with company internals but nothing close to 'gitfs' ... |
I don't know what you mean, line 11 appears to be empty. |
OK, so I guess that should be no problem, since you were refering to missing information in the |
Here's what I'm seeing: [root@cent6 ~]# mkdir /var/cache/salt/master/gitfs/someotherdir; salt-run -l debug fileserver.update 2>&1 | grep someotherdir
[DEBUG ] gitfs removed old cachedir /var/cache/salt/master/gitfs/someotherdir The extra "gitfs" on your system I can't explain, nor can I reproduce it. |
Revert "fixes #27217 clear_old_remotes clears wrong directory (gitfs)"
@nasenbaer13 Can you update your master to the latest 2015.8 branch (which reverts your pull request), then before starting up the master again run |
@terminalmage What about the
If self.role is 'gitfs' and 'self.cache_root' is None, then gitfs is appended (path.join) to cache_root first. It is appended again two lines below when |
@jfindlay, since the 'fix' was reverted. I also think one should re-open the bug until a proper solution is merged. I'll test and prepare a pull request in time. |
if @terminalmage considers this as a proper fix I would create a pull request vs. saltstack/salt/2015.8. |
@nasenbaer13 I'll look at this today, working on a couple other things at the moment. Thanks very much for your time and effort! |
No, problem. Just make sure that we fixed the correct position this time ;-) |
@nasenbaer13 I was able to trigger the original issue, and I can confirm that your commit fixes it. I opened a pull request using your commit because I wanted to get the fix in as soon as possible: #27477 Thank you for providing this fix. |
Thx for merging! |
No problem, thanks again for all your help. |
When running a file recurse state, copying some files fails because the wrong directory is cleaned up.
The crucial line here is:
which removes the gitfs directory.
The text was updated successfully, but these errors were encountered: