Quota fixes #27420

Merged
merged 2 commits into from Mar 22, 2017

Conversation

Projects
None yet
5 participants
@jvillafanez
Member

jvillafanez commented Mar 20, 2017

Description

Backport of owncloud/user_ldap#64

Related Issue

#26074

Motivation and Context

Fix quota behaviour

How Has This Been Tested?

Manual tests with different quotas and unittests passing

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
@mention-bot

This comment has been minimized.

Show comment
Hide comment
@mention-bot

mention-bot Mar 20, 2017

@jvillafanez, thanks for your PR! By analyzing the history of the files in this pull request, we identified @blizzz, @DeepDiver1975 and @nickvergessen to be potential reviewers.

@jvillafanez, thanks for your PR! By analyzing the history of the files in this pull request, we identified @blizzz, @DeepDiver1975 and @nickvergessen to be potential reviewers.

@jvillafanez jvillafanez referenced this pull request in owncloud/user_ldap Mar 20, 2017

Merged

Correctly apply quota #64

if(is_null($valueFromLDAP)) {
$quotaAttribute = $this->connection->ldapQuotaAttribute;
- if(!empty($quotaAttribute)) {
+ if ($quotaAttribute !== '') {

This comment has been minimized.

@jvillafanez

jvillafanez Mar 20, 2017

Member

This is the only difference between these changes and the original ones. I guess it's fine.

@jvillafanez

jvillafanez Mar 20, 2017

Member

This is the only difference between these changes and the original ones. I guess it's fine.

@PVince81 PVince81 added this to the 9.1.5 milestone Mar 20, 2017

@PVince81

This comment has been minimized.

Show comment
Hide comment
@PVince81

PVince81 Mar 20, 2017

Member
Error response from daemon: Driver aufs failed to remove root filesystem 

👍 otherwise, I assume this will be retested manually before the release @owncloud/qa (wish there were integration tests)

Member

PVince81 commented Mar 20, 2017

Error response from daemon: Driver aufs failed to remove root filesystem 

👍 otherwise, I assume this will be retested manually before the release @owncloud/qa (wish there were integration tests)

@davitol

This comment has been minimized.

Show comment
Hide comment
@davitol

davitol Mar 21, 2017

Contributor

👍 tested and works

BTW in owncloud/user_ldap#64 (comment) maybe can be added to be a little bit more clearly the scenario:

  1. Set a Quota Field with a value and Quota Default is not set --> The Quota Field value is set as quota
  2. Modify Quota Field with a non valid field --> The current quota is kept.
Contributor

davitol commented Mar 21, 2017

👍 tested and works

BTW in owncloud/user_ldap#64 (comment) maybe can be added to be a little bit more clearly the scenario:

  1. Set a Quota Field with a value and Quota Default is not set --> The Quota Field value is set as quota
  2. Modify Quota Field with a non valid field --> The current quota is kept.
@PVince81

This comment has been minimized.

Show comment
Hide comment
@PVince81

PVince81 Mar 21, 2017

Member

@jvillafanez can you rebase to shake CI a bit ?

Member

PVince81 commented Mar 21, 2017

@jvillafanez can you rebase to shake CI a bit ?

@PVince81 PVince81 merged commit b1af6d1 into stable9.1 Mar 22, 2017

3 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details

@PVince81 PVince81 deleted the quotaFixes branch Mar 22, 2017

@IRAM38

This comment has been minimized.

Show comment
Hide comment
@IRAM38

IRAM38 Jun 28, 2017

hello Everybody!
I have the same issue, I don't understand. I have Cloud Vers9.1.5 (stable)

Warning user_ldap not suitable default quota found for user xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

And the user Quota (for exemple 50Gb) is set to Default quota (4Gb) ..
Thanks for your help.

IRAM38 commented Jun 28, 2017

hello Everybody!
I have the same issue, I don't understand. I have Cloud Vers9.1.5 (stable)

Warning user_ldap not suitable default quota found for user xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

And the user Quota (for exemple 50Gb) is set to Default quota (4Gb) ..
Thanks for your help.

@jvillafanez

This comment has been minimized.

Show comment
Hide comment
@jvillafanez

jvillafanez Jun 29, 2017

Member

@IRAM38 write the whole log entry. It's fine if you want to hide the user name because it isn't relevant, but the quota value is important.

Member

jvillafanez commented Jun 29, 2017

@IRAM38 write the whole log entry. It's fine if you want to hide the user name because it isn't relevant, but the quota value is important.

@IRAM38

This comment has been minimized.

Show comment
Hide comment
@IRAM38

IRAM38 Jun 29, 2017

Error PHP ldap_search(): Partial search results returned: Sizelimit exceeded at /usr/share/owncloud/apps/user_ldap/lib/LDAP.php#255 2017-06-28T14:21:01+02:00
Error PHP json_encode() expects at most 2 parameters, 3 given at /usr/share/owncloud/apps/configreport/lib/ReportDataCollector.php#140 2017-06-28T14:20:45+02:00
Error core Could not get categories: cURL error 7: See http://curl.haxx.se/libcurl/c/libcurl-errors.html 2017-06-28T14:20:45+02:00
Warning user_ldap not suitable default quota found for user C7DE23F8-ABA5-4A65-A50A-41C084DF6F80: [] 2017-06-28T13:38:36+02:00
Warning user_ldap not suitable default quota found for user 0A90B8AF-3795-44ED-88AB-887B68C6634D: [] 2017-06-28T13:38:34+02:00
Error PHP reset() expects parameter 1 to be array, null given at /usr/share/owncloud/apps/files_versions/lib/Storage.php#784 2017-06-28T10:15:10+02:00
Error PHP ksort() expects parameter 1 to be array, null given at /usr/share/owncloud/apps/files_versions/lib/Storage.php#783 2017-06-28T10:15:10+02:00
Error PHP Invalid argument supplied for foreach() at /usr/share/owncloud/apps/files_versions/lib/Storage.php#760 2017-06-28T10:15:10+02:00
Error PHP Undefined index: by_file at /usr/share/owncloud/apps/files_versions/lib/Storage.php#760 2017-06-28T10:15:10+02:00
Error PHP Undefined index: all at /usr/share/owncloud/apps/files_versions/lib/Storage.php#758 2017-06-28T10:15:10+02:00
Warning user_ldap not suitable default quota found for user D12E847B-D10E-4313-B987-8E94000EAFE4: [] 2017-06-28T10:14:37+02:00
Warning user_ldap not suitable default quota found for user 8AB74315-5F61-468D-A323-BDEADA7A6020: [] 2017-06-28T10:14:37+02:00
Warning user_ldap not suitable default quota found for user A94F3B3A-72B1-44D3-A36F-C665DBEB85FD: [] 2017-06-28T09:54:58+02:00
Warning user_ldap not suitable default quota found for user C7DE23F8-ABA5-4A65-A50A-41C084DF6F80: [] 2017-06-26T08:32:00+02:00
Warning user_ldap not suitable default quota found for user 0A90B8AF-3795-44ED-88AB-887B68C6634D: [] 2017-06-26T08:31:58+02:00

IRAM38 commented Jun 29, 2017

Error PHP ldap_search(): Partial search results returned: Sizelimit exceeded at /usr/share/owncloud/apps/user_ldap/lib/LDAP.php#255 2017-06-28T14:21:01+02:00
Error PHP json_encode() expects at most 2 parameters, 3 given at /usr/share/owncloud/apps/configreport/lib/ReportDataCollector.php#140 2017-06-28T14:20:45+02:00
Error core Could not get categories: cURL error 7: See http://curl.haxx.se/libcurl/c/libcurl-errors.html 2017-06-28T14:20:45+02:00
Warning user_ldap not suitable default quota found for user C7DE23F8-ABA5-4A65-A50A-41C084DF6F80: [] 2017-06-28T13:38:36+02:00
Warning user_ldap not suitable default quota found for user 0A90B8AF-3795-44ED-88AB-887B68C6634D: [] 2017-06-28T13:38:34+02:00
Error PHP reset() expects parameter 1 to be array, null given at /usr/share/owncloud/apps/files_versions/lib/Storage.php#784 2017-06-28T10:15:10+02:00
Error PHP ksort() expects parameter 1 to be array, null given at /usr/share/owncloud/apps/files_versions/lib/Storage.php#783 2017-06-28T10:15:10+02:00
Error PHP Invalid argument supplied for foreach() at /usr/share/owncloud/apps/files_versions/lib/Storage.php#760 2017-06-28T10:15:10+02:00
Error PHP Undefined index: by_file at /usr/share/owncloud/apps/files_versions/lib/Storage.php#760 2017-06-28T10:15:10+02:00
Error PHP Undefined index: all at /usr/share/owncloud/apps/files_versions/lib/Storage.php#758 2017-06-28T10:15:10+02:00
Warning user_ldap not suitable default quota found for user D12E847B-D10E-4313-B987-8E94000EAFE4: [] 2017-06-28T10:14:37+02:00
Warning user_ldap not suitable default quota found for user 8AB74315-5F61-468D-A323-BDEADA7A6020: [] 2017-06-28T10:14:37+02:00
Warning user_ldap not suitable default quota found for user A94F3B3A-72B1-44D3-A36F-C665DBEB85FD: [] 2017-06-28T09:54:58+02:00
Warning user_ldap not suitable default quota found for user C7DE23F8-ABA5-4A65-A50A-41C084DF6F80: [] 2017-06-26T08:32:00+02:00
Warning user_ldap not suitable default quota found for user 0A90B8AF-3795-44ED-88AB-887B68C6634D: [] 2017-06-26T08:31:58+02:00

@jvillafanez

This comment has been minimized.

Show comment
Hide comment
@jvillafanez

jvillafanez Jun 29, 2017

Member

@IRAM38 The default quota for LDAP isn't set or is empty. You can set it in the LDAP wizard, advanced tab. This is different from the general default quota, which I guess is the one you're expecting to be used.

Member

jvillafanez commented Jun 29, 2017

@IRAM38 The default quota for LDAP isn't set or is empty. You can set it in the LDAP wizard, advanced tab. This is different from the general default quota, which I guess is the one you're expecting to be used.

@IRAM38

This comment has been minimized.

Show comment
Hide comment
@IRAM38

IRAM38 Jun 29, 2017

Thank's Jvillafanez !
I have set 4294967296 bytes to the default LDAP Quota. (4GB)
So do you think this solve my problem?
If i put 50GB to an ldap user, this quota doesn't change automatically?
I test..

IRAM38 commented Jun 29, 2017

Thank's Jvillafanez !
I have set 4294967296 bytes to the default LDAP Quota. (4GB)
So do you think this solve my problem?
If i put 50GB to an ldap user, this quota doesn't change automatically?
I test..

@IRAM38

This comment has been minimized.

Show comment
Hide comment
@IRAM38

IRAM38 Jun 29, 2017

Effectively The error is no longer in the log..
But It's not working....
The quota for my user set to 50Gb, automatically change to default quota 4Gb.

It's even worse, because the default quota returns after a few minutes automatically

IRAM38 commented Jun 29, 2017

Effectively The error is no longer in the log..
But It's not working....
The quota for my user set to 50Gb, automatically change to default quota 4Gb.

It's even worse, because the default quota returns after a few minutes automatically

@jvillafanez

This comment has been minimized.

Show comment
Hide comment
@jvillafanez

jvillafanez Jun 29, 2017

Member

In the advanced tab of the LDAP wizard, set the LDAP attribute that will be used for the quota (it must exists) and set the quota in the LDAP server using the attribute you've set there. This is in the ownCloud's documentation.

Member

jvillafanez commented Jun 29, 2017

In the advanced tab of the LDAP wizard, set the LDAP attribute that will be used for the quota (it must exists) and set the quota in the LDAP server using the attribute you've set there. This is in the ownCloud's documentation.

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