Skip to content
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

Panic when downloading #1351

Closed
refs opened this issue Jan 19, 2021 · 12 comments · Fixed by #1388
Closed

Panic when downloading #1351

refs opened this issue Jan 19, 2021 · 12 comments · Fixed by #1388
Assignees
Labels

Comments

@refs
Copy link
Member

refs commented Jan 19, 2021

When downloading via phoenix, we get 502 in CERN's setup.
Logs: https://gist.github.com/ishank011/2ec204692a6cc1092db68b743857fdf6

@refs refs added the Type:Bug label Jan 19, 2021
@refs
Copy link
Member Author

refs commented Jan 19, 2021

@ishank011 could you provide a bit more input? 👯 I suspect that accounts middleware is acting funny. It would be helpful if you could post the phoenix request since such middleware can be bypassed, and I would like to see what the implications are.

@refs refs self-assigned this Jan 19, 2021
@refs
Copy link
Member Author

refs commented Jan 19, 2021

I tried killing the usual suspect, the ocis store, but I'm not reproducing the issue that way. I think the smoking gun is the accounts middleware, as your logs show

@refs refs changed the title Panic when downloading [CERN] Panic when downloading Jan 19, 2021
@refs refs changed the title [CERN] Panic when downloading Panic when downloading Jan 20, 2021
@ishank011
Copy link
Contributor

@refs Clicking on a file first sends a HEAD request which returns successfully

Request URL: https://cbox-spare-02.cern.ch:9200/remote.php/webdav/hello.txt
Request Method: HEAD
Status Code: 200 OK
Remote Address: 127.0.0.1:12345
Referrer Policy: strict-origin-when-cross-origin

followed by one to the endpoint, which returns a 502

Request URL: https://cbox-spare-02.cern.ch:9200/ocs/v1.php/cloud/user/signing-key
Request Method: GET
Status Code: 502 Bad Gateway
Remote Address: 127.0.0.1:12345
Referrer Policy: strict-origin-when-cross-origin

The complete logs are here https://gist.github.com/ishank011/2ec204692a6cc1092db68b743857fdf6
I don't see any others.

Also, all these background requests remote.php/dav/files/iarora/abc.txt?a=1&c=424293cbda57c4ed5931b8a011f7ea59&preview=1&scalingup=0 return a 500, and I see that these return a 404 at https://ocis.owncloud.works/.

One more thing. How do we disable tus from phoenix?

@ishank011
Copy link
Contributor

ishank011 commented Jan 20, 2021

As @butonic mentioned, this should be handled by reva but apparently, it is somehow being redirected to ocis (or vice versa).

@ishank011
Copy link
Contributor

But looking at https://github.com/cs3org/reva/blob/master/internal/http/services/owncloud/ocs/handlers/cloud/user/user.go, this won't be the issue, as it should always return 200

@ishank011
Copy link
Contributor

ishank011 commented Jan 20, 2021

@ishank011
Copy link
Contributor

Yep. opaque:<map:<key:\"gid\" value:<decoder:\"plain\" value:\"2763\" > > map:<key:\"uid\" value:<decoder:\"plain\" value:\"125677\" > > >

@butonic
Copy link
Member

butonic commented Jan 20, 2021

@ishank011 regarding TUS: as long as TUS headers are present ocis web will use them. owncloud/owncloud-sdk#461

Which means that on EOS which does not support TUS the ocdav handler should not announce them in PROPFIND headers. which is currently hardcodet to true: https://github.com/cs3org/reva/blob/a7bf52ba4cf145baeb4b72d5dca485c731d5c1a7/internal/http/services/owncloud/ocdav/propfind.go#L192-L197

We could return capabilities like this in a ResourceInfo Opaque propery ... because it might change from file to file ...

@ishank011
Copy link
Contributor

@butonic oh okay. I added a change which fixes the capabilities response in ocs cs3org/reva#1331. Can we somehow propagate that to ocdav? Otherwise, I'll add the opaque property to EOS resources

@butonic
Copy link
Member

butonic commented Jan 21, 2021

forget the capabilities endpoint. it has to die for anything related to files. having a single endpoint does not make sense because the capabilities might change with every tree, maybe even for every folder and file.

TUS ist a good example. It really is specific to the folder and we should announce it in the PROPFIND / HEAD requests using the proper headers. So I strongly vote for opaque properties.

@ishank011
Copy link
Contributor

Cool, I'll make the change. Thanks for looking into this!

@butonic
Copy link
Member

butonic commented Jan 21, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants