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

docs: don't call the bucket quota a "hard quota" #5012

Closed
wants to merge 1 commit into from

Conversation

feorlen
Copy link
Contributor

@feorlen feorlen commented Aug 7, 2024

Community Contribution License

All community contributions in this pull request are licensed to the project maintainers
under the terms of the Apache 2 license.
By creating this pull request I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 license.

Description

Follow up to #5011, already merged.

Calling the mc quota set quota value a "hard quota" is misleading. It is indeed possible to go over quota while waiting for the next scanner pass to notice. Remove hard from the command help and example.

Note: there is also a reference in the code itself, which could be confusing to future maintainers. (Maybe used in an error message on failure to set quota?) Someone more familiar with the code should determine what to do about that.

qType := madmin.HardQuota

Motivation and Context

How to test this PR?

Docs only

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Unit tests added/updated
  • Internal documentation updated
  • Create a documentation update request here

@@ -32,7 +32,7 @@ import (
var quotaSetFlags = []cli.Flag{
cli.StringFlag{
Name: "size",
Usage: "set a hard quota, disallowing writes after quota is reached",
Usage: "set a quota, disallowing writes after quota is reached",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Usage: "set a quota, disallowing writes after quota is reached",
Usage: "Set a quota or usage limit for a bucket. Depends on the scanner for determining usage."

Maybe - a little weird because we don't talk about the scanner, but I think it's not terrible either.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a practical limit on how long these descriptions should be? Maybe

Suggested change
Usage: "set a quota, disallowing writes after quota is reached",
Usage: "set a quota, disallowing writes if the object scanner determines the quota has been exceeded.",

The text added yesterday does cover the scanner at least. This is what it currently looks like:

$ ./mc --dp quota set
NAME:
  mc quota set - set bucket quota

USAGE:
  mc quota set TARGET [--size QUOTA]

QUOTA
  Quota accepts human-readable case-insensitive number.
  Suffixes such as "k", "m", "g" and "t" referring to the metric units KB,
  MB, GB and TB respectively. Adding an "i" to these prefixes, uses the IEC
  units, so that "gi" refers to "gibibyte" or "GiB". A "b" at the end is
  also accepted. Without suffixes the unit is bytes.

  The MinIO object scanner checks a bucket's quota each time it is scanned.
  If the scanner determines a bucket has met or exceeded its quota, MinIO
  rejects subsequent object write requests until the scanner determines the
  bucket no longer exceeds its quota.

FLAGS:
  --size value                  set a hard quota, disallowing writes after quota is reached
  --config-dir value, -C value  path to configuration folder (default: "/Users/andrealongo/.mc") [$MC_CONFIG_DIR]
  --quiet, -q                   disable progress bar display [$MC_QUIET]
  --disable-pager, --dp         disable mc internal pager and print to raw stdout [$MC_DISABLE_PAGER]
  --no-color                    disable color theme [$MC_NO_COLOR]
  --json                        enable JSON lines formatted output [$MC_JSON]
  --debug                       enable debug output [$MC_DEBUG]
  --insecure                    disable SSL certificate verification [$MC_INSECURE]
  --limit-upload value          limits uploads to a maximum rate in KiB/s, MiB/s, GiB/s. (default: unlimited) [$MC_LIMIT_UPLOAD]
  --limit-download value        limits downloads to a maximum rate in KiB/s, MiB/s, GiB/s. (default: unlimited) [$MC_LIMIT_DOWNLOAD]
  --help, -h                    show help
  
EXAMPLES:
  1. Set hard quota of 1gb for a bucket "mybucket" on MinIO.
     $ mc quota set myminio/mybucket --size 1GB

Copy link
Contributor

Choose a reason for hiding this comment

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

If it's very wide I guess it can clip in the CLI view, but that's not the end of the world either. Your edit works for me.

set a hard quota on the bucket based on scanner usage measurements

Brings back hard but at least folds the scanner into it.

@harshavardhana
Copy link
Member

Calling the mc quota set quota value a "hard quota" is misleading. It is indeed possible to go over quota while waiting for the next scanner pass to notice. Remove hard from the command help and example.

it is hard quota, as long as the quota has not changed what server sees. This is due with any quota system, if you can keep increasing your top level limit it is as good as not having any limit.

feorlen added a commit to minio/docs that referenced this pull request Aug 8, 2024
Bucket quotas don't work the way people think they work, as they cannot
enforce hard limits. Deprecate in docs while we sort out what to do with
the commands.

The future replacement is MinIO Enterprise Catalog.

Staged:

http://192.241.195.202:9000/staging/deprecate-bucket-quota/linux/reference/minio-mc-deprecated.html

See:
minio/mc#5011
minio/mc#5012
@feorlen
Copy link
Contributor Author

feorlen commented Aug 8, 2024

Consensus is deprecate this. Already done in docs: minio/docs#1294
Closing this PR, I'll make an issue about doing a proper deprecation in mc.

See #5014

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

Successfully merging this pull request may close these issues.

3 participants