Git push randomly fails through git-http-backend on AFS share
My Git repository sits on an AFS share. All running processes on the Linux server have rights to write on this AFS share what ever the mask of files and directories are.
Git is served through Git Smart HTTP with Apache and git-http-backend.
The problem I have, is when I try to push to the master from a client, I have to repeat the operation 3 to 4 times until it works. On the Apache server side I see these errors:
fatal: failed to write object error: insufficient perm开发者_C百科ission for adding an object to repository database ./objects
On the client side I have this error:
error: unpack failed: unpack-objects abnormal exit
What I don't understand is why is it working after 3/4 times because in between the rights on the folder don't change.
Any clue?
Thank you!
Gilles
PS: version of Git on the client is git-1.7.3.4-3.6 and on the server git-1.7.4.1
why is it working after 3/4 times because in between the rights on the folder don't change.
Probably because it is not permissions related. More likely, there is a kind of race condition that is made possible by storing on the AFS share. Your best bets would be to
- do 'not do that' (i.e. store on local storage first)
- per-use AFS documentation to find any relevant flags (look for 'sync', 'delay', 'cache' or 'lazy')
- file it as a bug/post on AFS user groups
I've seen problems like this occur on ZFS-fuse when we first started out optimizing small writes (git does very accurate and optimized stat updates; if it cannot read back as expected immediately, it will fail)
精彩评论