-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Files deleted from local client when external local storage unavailable. #37934
Comments
Hi, can you share screenshots for the external storage configuration? |
We actually do start returning a 503, but not... until it's too late. In the interim we start returning the 404 instead. Obviously that's not good. As far as I can tell the 503 (what we want) doesn't kick in until something manages to trigger the availability check [1] like a user recheck request on the external storage page (simply reloading the external storage settings page also works I believe). Easy enough to reproduce. Here's how:
If testing in Docker containers you'll also have to add the bind mount in the app container... then remove it to simulate the removal. I think the issue is around here:
and
Instead of the ServiceUnavailable (5xx) we start returning the NotFound (404) until the availability gets rechecked. But we should be able to use the fact we know the file/folder still exists in the db to assume this is the former rather than the latter, no? Should also confirm this behaves the same with S3/B2/etc - I assume it does but dunno. [1]
[2] Good (no issues) state
[3] Bad (intermediate) state where we start 404ing
[4] Expected (after manual intervention triggering a storage availability check) we start 503ing like we want
|
Bug description
Files synced on a local client that are hosted on external local storage, get deleted when the storage is unmounted. The external storage is a subfolder of mountpoint. Also the https://ncloud.xxx.xx/remote.php/dav/files/xxxx/ seems to return 200 status code for erroneus external local storages while the nextcloud gui shows them red.
Steps to reproduce
Expected behavior
The forlder should not be deleted for error conditions.
Maybe an error status code should be responded for these cases see nextcloud/desktop#2454 (comment)
Installation method
Community Manual installation with Archive
Nextcloud Server version
24 and 25.0.6
Operating system
Debian/Ubuntu
PHP engine version
PHP 7.4
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Updated to a major version (ex. 22.2.3 to 23.0.1)
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: