-
Notifications
You must be signed in to change notification settings - Fork 2.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
Imposibility to forward connectivity issues from an external storage to ownCloud clients #7022
Comments
I did discuss this with @icewind1991 some time back - but I think we did not come up with a final solution. From a pure http status code interpretation point of view 404 still seems legit as it stats that the reason could also be temporary:
|
From my point of view, if I, as a sync client, ask for a file "file1" and I receive a 404, what I understand is that "file1" doesn't exists in the server, so if I have the file locally, I should delete it. As a file provider, if I have a connectivity issue to an external storage, I want to tell the client that it's a temporary issue in order to prevent the client to do any action such as delete the file. |
How about 503 Service Unavailable ? |
We have had the same issue when our primary storage (an NFS server) became unavailable. OwnCloud re-created the initial default folders, the sync clients deleted everything on the local machines and cleaned up the filecache table as well. We had to restore a database backup to get things working again. I would vote for a 503 (that way, that server would drop out of our load balancer and no further harm is done) |
In this case the whole sync process will stop because at the moment the assumption is that the server itself is in maintenance mode. In case where an external mounted folder is not available there is no need to stop the whole sync process but to just ignore that specific folder. @dragotin @danimo as we are talking about sync please add your comments and thoughts - thx |
503 might be too tough as stated by DeepDiver1975. It works from the external storage to ownCloud but I'm not sure if it will work fine from ownCloud to the client. Unless we tell the client that the error code is just for the folder and it can keep syncing other folder, it might not be an idea good enough. To give more ideas:
That would require twisting the meaning of the error, but it might fit. And the other option is to create a custom error code, because I don't think other standard error codes can fit. |
We already have 503 unavailable for "ownCloud" mounts. But I'm not sure all backends properly detect such cases. I raised #11792 to look into this. |
Closing in favour of #11792 |
There could be issues in the connection between ownCloud and the external storage, such a server down, network temporary cut, etc.
We can detect this kind of issue in the external storage plugin and rise an exception to the core, but there is no specific exception to be risen here.
If we use another exception to send an error to the client (a "not found" exception for example) the behaviour could be different than the user expects (which probably will be not to take any action at all).
I think a new exception is needed so these kind of errors are correctly propagated to clients.
Thanks!
The text was updated successfully, but these errors were encountered: