Core: Insufficient Storage error handling

Created on 26 Apr 2018  Â·  12Comments  Â·  Source: owncloud/core

It looks like there is an uncaught exception in case of Insufficient Storage for WebDAV. This should be probably treated like a normal log message:

{"reqId":"421a6474-d32a-4da7-904f-564c2e4d02a2","level":4,"time":"2018-04-26T11:20:51+00:00","remoteAddr":"xxx.xx.xx.xxx","user":"user2","app":"webdav","method":"PUT","url":"/owncloud1008rc3/remote.php/dav/files/user2/ownCloud%20Manual2.pdf","message":"Exception: {\"Message\":\"HTTP/1.1 507 Insufficient Storage\",\"Exception\":\"Sabre\DAV\Exception\InsufficientStorage\",\"Code\":0,\"Trace\":\"
#0 /var/www/html/owncloud1008rc3/apps/dav/lib/Connector/Sabre/QuotaPlugin.php(134): OCA\DAV\Connector\Sabre\QuotaPlugin->checkQuota('//ownCloud Manu...')
#1 [internal function]: OCA\DAV\Connector\Sabre\QuotaPlugin->handleBeforeCreateFile('files/user2/own...', Resource id #69, Object(OCA\DAV\Connector\Sabre\Directory), false)
#2 /var/www/html/owncloud1008rc3/lib/composer/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)
#3 /var/www/html/owncloud1008rc3/lib/composer/sabre/dav/lib/DAV/Server.php(1093): Sabre\Event\EventEmitter->emit('beforeCreateFil...', Array)
#4 /var/www/html/owncloud1008rc3/lib/composer/sabre/dav/lib/DAV/CorePlugin.php(525): Sabre\DAV\Server->createFile('files/user2/own...', Resource id #69, NULL)
#5 [internal function]: Sabre\DAV\CorePlugin->httpPut(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#6 /var/www/html/owncloud1008rc3/lib/composer/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)
#7 /var/www/html/owncloud1008rc3/lib/composer/sabre/dav/lib/DAV/Server.php(479): Sabre\Event\EventEmitter->emit('method:PUT', Array)
#8 /var/www/html/owncloud1008rc3/lib/composer/sabre/dav/lib/DAV/Server.php(254): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#9 /var/www/html/owncloud1008rc3/apps/dav/lib/Server.php(278): Sabre\DAV\Server->exec()
#10 /var/www/html/owncloud1008rc3/apps/dav/appinfo/v2/remote.php(31): OCA\DAV\Server->exec()
#11 /var/www/html/owncloud1008rc3/remote.php(165): require_once('/var/www/html/o...')
#12 {main}\",\"File\":\"/var/www/html/owncloud1008rc3/apps/dav/lib/Connector/Sabre/QuotaPlugin.php\",\"Line\":169,\"User\":\"user2\"}"}

Tested in 10.0.7 and 10.0.8. @tomneedham as discussed.

Bug blue-ticket p3-medium sev3-medium

All 12 comments

GitMate.io thinks possibly related issues are https://github.com/owncloud/core/issues/28840 (-Error-), https://github.com/owncloud/core/issues/26902 (error), https://github.com/owncloud/core/issues/15189 ([OC 8.0.2] Sabre Quota Plugin Errors - 507 Insufficient Storage ), https://github.com/owncloud/core/issues/6391 (ownCloud can't handle Unlimited Storage?), and https://github.com/owncloud/core/issues/29082 (a Error).

Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.)

@PVince81 ping

@pako81 @michaelstingl I think we agreed to make this a debug message instead ?

HTTP status code 507 Insufficient Storage is okay, but the response body isn't beautiful:

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\InsufficientStorage</s:exception>
  <s:message/>
</d:error>

@michaelstingl what message do you want there ?

@PVince81 response message is the least problem. Level 4 exception in owncloud.log is much much bigger problem.

OCS API for example sometimes responds with a "nice" message:

<message>can't change permission for public link share</message>
(source: docs)

This can be displayed in the clients directly, and it's even translated automatically:
https://github.com/owncloud/core/blob/v10.0.8/apps/files_sharing/l10n/ja.json#L47

I'd love to get more of these "actionable" responses, but's that's probably another discussion…

so can this ticket be closed ? further wishes to be raised as separate non-support ticket ?

PR for the log level change was merged, will be in 10.0.10: https://github.com/owncloud/core/pull/31978

@PVince81 moving this to debug level would make for an admin more difficult to find out why uploads for a specific user failed, isn't it?

@pako81 in general I'd expect that for said user the error response 507 is returned, that would be visible in the HTTP status code of the access log

I'm closing this. @pako81 @michaelstingl if there are additional wishes, please make new tickest.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PVince81 picture PVince81  Â·  4Comments

rehoehle picture rehoehle  Â·  4Comments

PVince81 picture PVince81  Â·  4Comments

dpeger picture dpeger  Â·  3Comments

patrickjahns picture patrickjahns  Â·  4Comments