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

Revert "Don't mount shares with failed underlying storages" #41059

Merged
merged 2 commits into from Oct 30, 2023

Conversation

jvillafanez
Copy link
Member

This reverts commit 692c9be. and 635267e

Description

Revert those 2 commits for now due to performance problems for large installations

Related Issue

https://github.com/owncloud/enterprise/issues/6098

Motivation and Context

There were performance problems caused by #41014 making the system too slow.

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:
  • Changelog item, see TEMPLATE

@update-docs
Copy link

update-docs bot commented Oct 23, 2023

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@IljaN IljaN self-requested a review October 23, 2023 12:02
Copy link
Member

@IljaN IljaN left a comment

Choose a reason for hiding this comment

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

LGTM. Please add changelog.

changelog/unreleased/41059 Outdated Show resolved Hide resolved
@pako81
Copy link
Contributor

pako81 commented Oct 23, 2023

Should this not target the release-10.13.3 branch? @jnweiger

@sonarcloud
Copy link

sonarcloud bot commented Oct 30, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@jvillafanez jvillafanez merged commit 9ffde39 into master Oct 30, 2023
3 checks passed
@delete-merged-branch delete-merged-branch bot deleted the revert_41014 branch October 30, 2023 13:15
@phil-davis
Copy link
Contributor

@jvillafanez reverting this causes problems to come back in some app tests. For example:
https://github.com/owncloud/files_lifecycle/issues/136 is a problem again.
(and see reports in issue https://github.com/owncloud/files_lifecycle/issues/555 )

Also in user_ldap owncloud/user_ldap#814

Is there likely to be another core change to address this?
Or do we sort out the tests so the failing tests do not impact the nightly CI results?

@jvillafanez
Copy link
Member Author

I think the fixes for those issues were a side effect. Maybe we can try to run those tests with 10.12.0 or 10.13.0 and see what happens.

There are some skips in owncloud/user_ldap#814 so I guess the issue was already there. I'm not sure about https://github.com/owncloud/files_lifecycle/issues/555 , maybe it was merged right after the core fix was merged.

If they are side effects, I think it's fine to skip those because we'll have to analyze the issues separately anyway.

@phil-davis
Copy link
Contributor

@jvillafanez after the original PR #41014 was merged in core, we adjusted the files_lifecycle tests - see PR https://github.com/owncloud/files_lifecycle/pull/544

The test scenarios started doing the right thing, so we removed the "expectation" of 500 status, and put in the correct expected behavior. That made the tests pass on against core master.

If there is some "easy" way to make these tests pass again (without causing other performance... side-effects), that would be nice. Otherwise we will revert the test changes.

@jvillafanez
Copy link
Member Author

owncloud/user_ldap#814 is caused by the previous exception. Since the LDAP is down, the FS initialization for the "original" user (Alice) fails (

Filesystem::initMountPoints($this->superShare->getShareOwner());
$sourcePath = $this->ownerView->getPath($this->superShare->getNodeId(), false);
list($this->sourceStorage, $sourceInternalPath) = $this->ownerView->resolvePath($sourcePath);
$this->sourceRootInfo = $this->sourceStorage->getCache()->get($sourceInternalPath);
// adjust jail
$this->rootPath = $sourceInternalPath;
). The rootPath isn't set due to the bind exception that happens in the initMountPoints method.

I think running through the initMountPoints is required in order to get information from the ownerView. It isn't like we can swap the order and run the initMountPoints after those methods.
The other option we could try is to fake the value, but I don't know which one we could use. Furthermore, we could introduce new bugs in other places due to a wrong / fake rootPath. It seems too risky for a quick "fix".

@jvillafanez
Copy link
Member Author

For https://github.com/owncloud/files_lifecycle/issues/555 I'll have a deep look at it tomorrow (I need a fresh installation).

I guess the problem is that the shares are "limited" to the user's files, and the archived files are outside of it, so maybe they're counted as "not available".
With the patch reverted, I guess the share file is visible for the sharee, but since it isn't available because it's on the archive storage, it's giving problems.
Anyway, it needs a deeper look. No quick solution so far.

@jvillafanez
Copy link
Member Author

For https://github.com/owncloud/files_lifecycle/issues/555 I'll have a deep look at it tomorrow (I need a fresh installation).

The problem seems to be around https://github.com/owncloud/core/blob/v10.13.2/lib/private/Files/View.php#L1448-L1456
Without the patch, the mount manager returns a shared mount backed up by the shared storage, which fails to be initialized. That's why when we try to access, we have the exception shown in the logs.
However, with the patch, the mount manager returns a regular mount backed up by the home storage of the user. It doesn't give any problem in this case.

The failure in the initialization of the shared storage happens because the target file (the one shared and now archived) isn't found in the owner's filesystem. The target file is archived and the owner's view doesn't reach it (it's out of the ownCloud FS)

Taking this into account, I guess the problem was there from the beginning. We just had the patch before we noticed the problem.

DeepDiver1975 pushed a commit that referenced this pull request Nov 16, 2023
Revert "Don't mount shares with failed underlying storages"
DeepDiver1975 pushed a commit that referenced this pull request Nov 17, 2023
Revert "Don't mount shares with failed underlying storages"
phil-davis pushed a commit that referenced this pull request Nov 22, 2023
Revert "Don't mount shares with failed underlying storages"
@phil-davis
Copy link
Contributor

@jvillafanez I think that we will revert the user_ldap and files_lifecycle tests so that they go back to passing again (demonstrating what is the "current" behavior)
issues: owncloud/user_ldap#814
https://github.com/owncloud/files_lifecycle/issues/555

If some thing happens to implement a new/different fix related to this, then the tests can easily be adjusted.

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.

None yet

4 participants