-
Notifications
You must be signed in to change notification settings - Fork 670
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
Sync-Client 1.8.0 broken: Sync error if external folder isn't reachable #3113
Comments
@guruz 503 for a directory means the directory needs to be ignored. I suggest this patch to handle this properly: diff --git a/csync/src/csync_update.c b/csync/src/csync_update.c
index 1c89a87..ddac969 100644
--- a/csync/src/csync_update.c
+++ b/csync/src/csync_update.c
@@ -621,11 +621,11 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
if (asp < 0) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "asprintf failed!");
}
- } else if(errno == ERRNO_STORAGE_UNAVAILABLE) {
- CSYNC_LOG(CSYNC_LOG_PRIORITY_WARN, "Storage was not available!");
+ } else if(errno == ERRNO_STORAGE_UNAVAILABLE || errno == ERRNO_SERVICE_UNAVAILABLE) {
+ CSYNC_LOG(CSYNC_LOG_PRIORITY_WARN, "Storage or Service was not available!");
if (ctx->current_fs) {
ctx->current_fs->instruction = CSYNC_INSTRUCTION_IGNORE;
ctx->current_fs->error_status = CSYNC_STATUS_STORAGE_UNAVAILABLE;
/* If a directory has ignored files, put the flag on the parent directory as well */
if( previous_fs ) {
previous_fs->has_ignored_files = true;
Lets discuss tomorrow. |
Please see #2884 for why the distinction between 503 Service Unavailable and 503 Storage Unavailable was made. |
@ckamm, @dragotin: I see the distiction between the root folder and other
Thanks for clarification. kuba On Wed, Apr 22, 2015 at 11:52 AM, ckamm [email protected] wrote:
Best regards, |
@moscicki I the server will reply "503 Service Unavailable" with the "Sabre\DAV\Exception\ServiceUnavailable" body for any folder in maintenance mode. A "503 Storage Unavailable" also makes no distinctions between root and other folders. Is this what you meant? |
@ckamm: thanks for clarification. I guess you are referring to this line: client/src/libsync/connectionvalidator.cpp Line 198 in f3cb5f8
I understand that the client recognises the server maintenance mode if 503 and the body match the error string. What happens when 503 and the body DOES NOT match the error string --> i.e. "a regular 503 from somewhere else? as per your comment". What happens then? Would you start deleting files? For the implementation, sorry to say but this is extremely bad design: it actually binds the client to a low-level implementation detail of the server such as the fact of using SabreDav. This does not only break any idea of a network protocol (and protocol encapsulation) but will also break the moment this particular error body changes in the server implementation. |
@moscicki The maintenance-503 and regular 503 are handled exactly the same during discovery, so that will produce no different behavior. During discovery only the magic '503 Storage not available', will be treated completely differently (by temporarily ignoring the folder). The specific handling of the server's 503 message only triggers different error reporting to the user. We don't want to bother users about temporary server maintenance. @dragotin agrees that we could extend that to any 503 error and remove the special casing. I agree that binding to that SabreDav http body and abusing 503 for the "Storage not available" message is brittle and should be avoided. We can skip the former by giving up on distinguishing oc-maintenance-503 and any-other-503, but we're stuck with the latter for now. |
@dragotin will this be fixed in 1.8.2 ? /cc @MorrisJobke |
So yes, it will be in 1.8, and can already be tested by trying out beta1: https://owncloud.org/install/#testing-development |
For me behavior of 1.8.2beta1 didn't change from 1.8.0 since a WND-mount isn't available through invalid credentials for example. Error message in SyncClient is "Sync Error". No data is synced. SyncClient before 1.8.0 simply skips those directories and syncs all the rest. This is the behavior we expect. Regards, Log of 1.8.2beta1
|
@timm2k can you provide what you find in the access_log for the folders in question? |
@danimo @timm2k @dragotin My patch was not intended to fix this issue, it just resolved a side discussion with @moscicki. If we want to ignore folders for which we get 503 (independently of whether it's "service unavailable" or "storage not available") @dragotin's patch from #3113 (comment) looks good. I wonder why the server doesn't reply "storage not available" in this case... |
1.8.2-final solve my reported issue. Thanks for your work! |
@timm2k thanks for reporting back, closing this one. |
The first time the user opens this windows folder (windows network drive plugin) he is asked for credentials.
If a user never entered credentials the folder isn't accessible.
Sync-client 1.7.1 and versions and below didn't care about inaccessible external folders.
Since sync-client 1.8.0 a error message is dropped and the client didn't sync any data.
Relevant logs:
Here the most relevant lines (I think):
Sync-client 1.7.1:
Sync-client 1.8.0:
Full Log files:
S3-ownCloud\Shared\owncloud\support\github-issues\client\3113
@MorrisJobke
00002881
The text was updated successfully, but these errors were encountered: