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

Allow to estimate free space when using object storage #33221

Closed
wants to merge 1 commit into from

Conversation

tcitworld
Copy link
Member

@tcitworld tcitworld commented Jul 13, 2022

With ObjectStorage there's no way to determine the free space for a bucket with a limited storage quota, so it's hard to detect when you have a space issue (there's nothing like disk_free_space).

It would be better if the object storage provider would provide us this information, but at least for S3 it's hard or impossible to get this information easily, so this can be an appropriate workaround in the meanwhile.

Using an AppConfig instead of a SystemConfig might be more flexible for admins to change the value, but it might also introduce a database overhead.

When using the Local storage regular disk_free_space is used instead.

Still need to check if and how this affects external storages.

@tcitworld tcitworld added the 2. developing Work in progress label Jul 13, 2022
@tcitworld tcitworld added this to the Nextcloud 25 milestone Jul 13, 2022
@tcitworld tcitworld added this to In progress in Thomas things to do via automation Jul 13, 2022
@CarlSchwan

This comment was marked as outdated.

@github-actions
Copy link

Possible performance regression detected

Show Output
1 queries added

≠ /remote.php/dav/files/test with 1 queries removed
  - UPDATE "oc_preferences" SET "configvalue" = :dcValue1 WHERE ("userid" = :dcValue2) AND ("appid" = :dcValue3) AND ("configkey" = :dcValue4)
≠ /remote.php/dav/files/test/test.txt with 1 queries added
  + UPDATE "oc_preferences" SET "configvalue" = :dcValue1 WHERE ("userid" = :dcValue2) AND ("appid" = :dcValue3) AND ("configkey" = :dcValue4)
= /remote.php/dav/files/test/many_files
= /remote.php/dav/files/test/new_file.txt
≠ /remote.php/dav/files/test/new_file.txt with 1 queries added
  + UPDATE "oc_preferences" SET "configvalue" = :dcValue1 WHERE ("userid" = :dcValue2) AND ("appid" = :dcValue3) AND ("configkey" = :dcValue4)

This was referenced Aug 12, 2022
This was referenced Aug 24, 2022
@tcitworld tcitworld marked this pull request as ready for review September 1, 2022 17:23
@tcitworld tcitworld added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Sep 1, 2022
@tcitworld tcitworld requested review from CarlSchwan, a team, blizzz and skjnldsv and removed request for a team September 1, 2022 17:23
@blizzz
Copy link
Member

blizzz commented Sep 2, 2022

doesn't it overlap with the default_quota?

@tcitworld
Copy link
Member Author

default_quota is for users, this is for the whole instance. It should still work anyway.

Thomas things to do automation moved this from In progress to Reviewer approved Sep 2, 2022
This was referenced Sep 6, 2022
@skjnldsv skjnldsv mentioned this pull request Sep 15, 2022
@PVince81
Copy link
Member

sounds like a good idea

would still like to have another opinion in case of side effects @icewind1991 @juliushaertl

@blizzz blizzz mentioned this pull request Sep 20, 2022
@blizzz blizzz modified the milestones: Nextcloud 27, Nextcloud 28 May 23, 2023
if ($quota < 0) {
/** @var IConfig $config */
$config = Server::get(IConfig::class);
$quota = (int) $config->getAppValue('core', 'quota_instance_global', '0');
Copy link
Member

Choose a reason for hiding this comment

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

Probably makes sense to move this option under the rest of the object store options, since it is only applicable for object stores

Copy link
Member Author

Choose a reason for hiding this comment

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

You mean the objectstore config.php entries? Makes sense indeed, will do.

@skjnldsv skjnldsv mentioned this pull request Nov 1, 2023
This was referenced Nov 6, 2023
This was referenced Nov 14, 2023
@blizzz blizzz modified the milestones: Nextcloud 28, Nextcloud 29 Nov 23, 2023
@blizzz blizzz requested a review from skjnldsv January 18, 2024 10:50
@skjnldsv skjnldsv removed their request for review January 18, 2024 11:34
… quota

If the object storage backend doesn't return quota or used bytes
information, use a config override for the quota and count the size used
in Nextcloud instead.

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
tcitworld added a commit to nextcloud/app-certificate-requests that referenced this pull request Feb 5, 2024
The Instance Quota app is a fork of the Group Quota app allowing to simply define a quota for the
whole server instance, though keeping individual user quotas in account.

It is a better way to handle things than the PR given at nextcloud/server#33221

Link to repository: https://framagit.org/framasoft/nextcloud/instance_quota

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This was referenced Mar 12, 2024
@skjnldsv skjnldsv added 2. developing Work in progress stale Ticket or PR with no recent activity and removed 3. to review Waiting for reviews labels Mar 15, 2024
@skjnldsv skjnldsv marked this pull request as draft March 15, 2024 15:14
This was referenced Mar 18, 2024
@skjnldsv skjnldsv modified the milestones: Nextcloud 29, Nextcloud 30 Mar 28, 2024
@skjnldsv
Copy link
Member

skjnldsv commented May 2, 2024

Closing this pull request due to lack of recent activity and updates. We appreciate your contribution and encourage you to reopen or provide further updates if necessary. ☺️
Our aim is to keep the project moving forward with active collaboration. Thank you for your understanding and continued support! 🙏

@skjnldsv skjnldsv closed this May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress stale Ticket or PR with no recent activity
Projects
No open projects
Thomas things to do
  
Review in progress
Development

Successfully merging this pull request may close these issues.

None yet

7 participants