SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
NFS Rmdir Failing fix
Author Message
Post NFS Rmdir Failing fix 
Hello,

could someone with better python and rdiff-backup knowledge than me (just a
very python newbie, today my first python book arrived) please confirm the
attached patch will cause no harm?

This nfs rmdir problem is for sure no nfs bug, rdiff-backup only forgets to
close a filehandle. The nfs-lock-daemon will rename those files to .nfs...
files which cannot be delete until rdiff-backup will be closes. In principle
in Linux it also works that way on other filesystems, only the kernel allowes
to delete the partent directory and everything else, but silently doesn't
delete it until the filehandle is closed.

By tracing(*) the code I believe to have found the function that forgets to
close the filehandle, see the attached patch. It now seems to work fine over
nfs.

Thanks,
Bernd

(*): Thanks goes to 'Malaprop' in the #chipy channel for pointing me to the
nice trace-howto, as python-newbie I had no clue how to do that:
http://www.dalkescientific.com/writings/diary/archive/2005/04/20/tracing_python_code.html


--
Bernd Schubert
PCI / Theoretische Chemie
Universität Heidelberg
INF 229
69120 Heidelberg

Post NFS Rmdir Failing fix 
Bernd Schubert <bernd-schubert < at > gmx.de>
wrote the following on Sat, 13 Aug 2005 01:17:18 +0200

could someone with better python and rdiff-backup knowledge than me
(just a very python newbie, today my first python book arrived)
please confirm the attached patch will cause no harm?

This nfs rmdir problem is for sure no nfs bug, rdiff-backup only
forgets to close a filehandle. The nfs-lock-daemon will rename those
files to .nfs... files which cannot be delete until rdiff-backup
will be closes. In principle in Linux it also works that way on
other filesystems, only the kernel allowes to delete the partent
directory and everything else, but silently doesn't delete it until
the filehandle is closed.

By tracing(*) the code I believe to have found the function that
forgets to close the filehandle, see the attached patch. It now
seems to work fine over nfs.

I'm surprised this patch works at all. It looks like the file gets
closed before it can get created. The point of a LikeFile object (and
SigFile, DeltaFile, etc.) is to act like a file. That is why they
have .read() and .close() methods. I'm not sure why there isn't an
error when something tries to read a sigfile after it is closed.

But I looked around for some files left open (since you said your
patch fixes the problem for you) and found one. Maybe you could check
out:

http://savannah.nongnu.org/cgi-bin/viewcvs/rdiff-backup/rdiff-backup/rdiff_backup/Rdiff.py.diff?r2=1.11&r1=1.10&diff_format=u

and see if that also fixes the problem for you.


--
Ben Escoto

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB