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

Fix: SMB/CIFS/CEPH mounted drive caused large file upload errors #17218

Closed
wants to merge 1 commit into from
Closed

Fix: SMB/CIFS/CEPH mounted drive caused large file upload errors #17218

wants to merge 1 commit into from

Conversation

stereu
Copy link

@stereu stereu commented Sep 19, 2019

Fix #8942

On some installations using ceph/smb/cifs shares the protocol does not support renaming on the fly. This causes the issue as linked. This fix added a check for this and disables part-file if needed.

On some installations using ceph/smb/cifs shares the protocol does not support renaming on the fly. This causes the issue as linked. This fix added a check for this and disables part-file if needed.
@stereu
Copy link
Author

stereu commented Sep 19, 2019

#11295

@kesselb
Copy link
Contributor

kesselb commented Sep 19, 2019

Would you mind to share some information about a setup where this change fixes the issue?

Please sign off your commits. https://github.com/nextcloud/server/pull/17218/checks?check_run_id=228831643 for some details.

@kesselb
Copy link
Contributor

kesselb commented Sep 19, 2019

#8942 (comment) there are also some positive reports about this code change.

The suggested change makes sense to me in context of upload only (and therefore paths which are writeable but not readable) shares but I don't see how this fixes issues with large file uploads in general.

@kesselb kesselb added this to the Nextcloud 18 milestone Sep 19, 2019
@stereu
Copy link
Author

stereu commented Sep 20, 2019

Thx for your reply, forgot to change the testfile according to my little change. I will add this file to my PR so i think the tests will be successfull then.

I will also provide a more detailed description on how i think this fixes the bug.

@@ -149,7 +149,7 @@ public function put($data) {
// mark file as partial while uploading (ignored by the scanner)
$partFilePath = $this->getPartFileBasePath($this->path) . '.ocTransferId' . rand() . '.part';

if (!$view->isCreatable($partFilePath) && $view->isUpdatable($this->path)) {
if ((!$view->isCreatable($partFilePath) && $view->isUpdatable($this->path)) || (!$view->isReadable($partFilePath))) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@icewind1991 Souldn't all those checks run on the parent directory as the part file and path are the files that do ot exist yet, so isCreatable/isReadable will always return false.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're somewhat right I think, the isCreatable and isReadable check should be done on the parent, isUpdatable should be on the file

@juliusknorr
Copy link
Member

I will also provide a more detailed description on how i think this fixes the bug.

@stereu Any update on this?

@stereu
Copy link
Author

stereu commented Dec 4, 2019

I will also provide a more detailed description on how i think this fixes the bug.

@stereu Any update on this?

Was very busy the last time, i will have a look at it again in the next few days. Stay tuned.
I can only report that we have been using the patch for some time now and have had no problems with our customers since then.

This was referenced Dec 11, 2019
@rullzer rullzer mentioned this pull request Dec 19, 2019
18 tasks
@rullzer rullzer modified the milestones: Nextcloud 18, Nextcloud 19 Dec 19, 2019
This was referenced Apr 4, 2020
This was referenced Apr 15, 2020
@mrohnstock
Copy link

FYI: I stepped today into the same issue, this PR fixed the issue with 18.0.3 for me. Hope this get's atleast merged with 19.0?

@rullzer rullzer mentioned this pull request Apr 23, 2020
11 tasks
@juliusknorr juliusknorr added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Apr 24, 2020
@juliusknorr
Copy link
Member

Not yet ready to be merged as it just disables part files in general as stated in #17218 (comment)

@rullzer rullzer removed this from the Nextcloud 19 milestone Apr 30, 2020
@rullzer rullzer added this to the Nextcloud 20 milestone Apr 30, 2020
@MorrisJobke MorrisJobke mentioned this pull request Aug 11, 2020
57 tasks
This was referenced Dec 14, 2020
@ChristophWurst ChristophWurst removed this from the Nextcloud 21 milestone Dec 22, 2020
@ChristophWurst
Copy link
Member

As per #17218 (comment) this needs to be done slightly differently and the last activity of the author was more than a year ago. I'm closing this thus. Please open a new PR when you continue this work.

Thanks a lot ✌️

@ntinti
Copy link

ntinti commented Jan 10, 2021

Why do you close this? Issue is still present in 20.0.4. The fix from stereu helped us. If it is not state of the art, than please do it a better way, but do it.

@ChristophWurst
Copy link
Member

Did you actually read my comment? Read it again, it will tell you why. Also it links to a comment of the maintainer of this subsystem that has some concerns.

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

Successfully merging this pull request may close these issues.

Uploading to shared public upload-only Folder fails: Could not rename part file to final file
9 participants