about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-02-05 21:52:08 +0000
committerEric Wong <e@80x24.org>2015-02-05 21:54:38 +0000
commit10ae48e0880fc76d1f2044f80e20004491801663 (patch)
tree8f29cd1c176e85a01bad3ac0eeb8cc1dc3c39052
parentee4a340bfb304f0270ef3704b09ba7faca6a3c1e (diff)
downloadcmogstored-10ae48e0880fc76d1f2044f80e20004491801663.tar.gz
Errors on failed unlink can be a prelude to a bigger problem, so
log it locally ourselves even if the tracker will notice it.

This commit was tested manually by setting up cmogstored to point to a
read-only mount point on my system and attempting a DELETE request on
it.
-rw-r--r--http_dav.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/http_dav.c b/http_dav.c
index 8487e13..ad7c80d 100644
--- a/http_dav.c
+++ b/http_dav.c
@@ -46,6 +46,8 @@ forbidden:
         PRESERVE_ERRNO(do {
                 mog_http_resp(mfd, "500 Internal Server Error", true);
         } while(0));
+        syslog(LOG_ERR, "Failed to unlink %s (in %s): %m",
+                path, http->svc->docroot);
 }
 
 void mog_http_mkcol(struct mog_fd *mfd, char *buf)