maindavfs2 - Support: sr #108597, No error when writing to a full...

 
 

sr #108597: No error when writing to a full WebDAV device

Submitter:  Eckhard Henkel <henkel>
Submitted:  Sat 07 Jun 2014 02:36:39 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  _71007
Open/Closed:  Closed Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 10 Aug 2014 10:51:42 AM UTC, comment #3: 

Fixed in the CVS sources, branch MAIN and branch rel-1-4-6

- <_71007>
Mon 09 Jun 2014 07:21:59 PM UTC, comment #2: 

Yes, there is room for improvement, but with some limitations. I will have to explain this in some detail.

HTTP does not know partial file uploads, only complete files can be send to the server with PUT. So while a file is open for writing all writes go to a local copy and only after the file is closed davfs2 will upload it to the server.

In default mode davfs2 will delay this upload for about 10 seconds. The reason for this is to avoid uploading of temporary files and to not block the file system, but to try to do uploads when the file system is idle (the last point will not allways work because davfs2 is still single threaded).

Because of this delayed upload davfs2 can't return an error message on close.

You can turn off this delay with option 'delay-upload 0'. Unfortunately there is a bug and davfs2 will still not return the error message from the server. I will probably fix this bug soon. Of course even with this fixed it will depend on getting a proper status code from the server.

There is another problem: an upload may fail because the server refuses the request and sends a proper status code. An upload may also fail temporarily, e.g. because of some network error. In case of a tmporary failure davfs2 will keep the file in the cache and retry later. I would be wrong to return an error in this case.

Another point: davfs2 supports the stat system call and also WebDAV-quota. But the code is not optimal and the values may not always be correct. I will have to fix this too. Again it depends on what is supported by the server and often quota is not supported.

One tipp:
If you are not sure whether your files have been uploaded please have a look into the lost+found directory. If an upload fails permanently davfs2 will move the changed local copy there.

Werner

- <_71007>
Sat 07 Jun 2014 04:09:06 PM UTC, comment #1: 

To exclude a malfunction of the "Telekom Mediencenter", I checked, what will happen, if I don't use davfs2 on Linux.

My first try was made by a Windows system, commandline, "copy"-command. As expected, it reports an error. Either "Die Dateigröße überschreitet die maximal zulässige Größe und kann nicht gespeichert werden" (remote copy on the WebDAV device) or "Nicht genügend Quoten erfügbar, um diesen Befehl zu verarbeiten." (copy of a local file to the WebDAV device).

In a second try I used as client a Mac OS X (10.9.3) device and "Finder" as GUI. Again, as expected, I got error messages: "Das Objekt 'xyz' kann nicht kopiert werden, da nicht genügend freier Platz zur Verfügung steht." (both, remote copy on the WebDAV device and copy of a local file to the WebDAV device).

Both, Windows and Mac OS X, receive error messages from the Mediencenter WebDAV device.

My conclusion is, the error handling of davfs2 can be improved.

Kind regards,

Eckhard



Eckhard Henkel <henkel>
Sat 07 Jun 2014 02:36:39 PM UTC, original submission:  

Dear Werner Baumann,

I'm using davfs2 1.5.0. In general it works fine, thanks a lot for it!

In case the WebDAV device has reached it's limit (full with files), the exit status of a cp (or rsync) command still reports me 0 (= success), even if the file copy didn't work. I expected to get an exit code different to 0.

The WebDAV device is provided by Telekom Mediencenter and I use it to do daily backups, triggered by a cron job.

Somewhere an user mentioned, WebDAV might not support (f)stat system calls. Therefore I compiled the sample code provided by "man 2 stat" and used it to prove access to files on the WebDAV device. The prove worked, so (f)stat system calls work.

Do you have any idea, what can be done to detect an uncessful file copy? Did I miss any options? Does the behaviour concern davfs2 or the cp command?

Kind regards,

Eckhard

Eckhard Henkel <henkel>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by _71007 (Posted a comment)
  • -email is unavailable- added by henkel (Submitted the item)
  • -email is unavailable- added by henkel
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-04-15 _71007 Open/ClosedOpen Closed
    2014-08-10 _71007 StatusIn Progress Done
    2014-06-09 _71007 StatusNone In Progress
        Assigned toNone _71007
    2014-06-07 henkel Carbon-Copy- Added henkel

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code