cloud_controller_ng
cloud_controller_ng copied to clipboard
Quota `apps.per_app_tasks` limits are misleading
In v3 docs, it’s mentioned apps.per_app_tasks
is per app: “Maximum number of running tasks in a single application”.
However, with apps.per_app_tasks
set to 1 with two different apps in same org, the first task can be executed with app1, but the second task with app2 fails with error “app_task_limit quota exceeded”. The limit is not per app but per org (or space).
It looks like we made a mistake naming/documenting that quota limit. It is number of tasks per space/org:
- https://github.com/cloudfoundry/cloud_controller_ng/blob/40ffe7bd65ffe661c45085da623b51e85bba599c/app/models/runtime/constraints/max_app_tasks_policy.rb
- https://github.com/cloudfoundry/cloud_controller_ng/blob/40ffe7bd65ffe661c45085da623b51e85bba599c/app/models/runtime/organization.rb#L244
The same problem appears on the v2 API docs.
We have created an issue in Pivotal Tracker to manage this:
https://www.pivotaltracker.com/story/show/176042140
The labels on this github issue will be updated when the story is started.
Bumping this as something we should fix,
I think something like "Maximum number of running tasks in the specified org/space" (depending on if the page is for spaces or orgs) would be really good.
We recently had an experience where a user was confused by this because they knew the docs text was misleading, but they assumed that if they applied the same quota to 3 different orgs, that the quota would be shared across those 3 orgs, so I'd be curious if y'all had any other thoughts on ways to make this clear
Files needed to change in the docs
rg "Maximum number of running tasks in a single application"
docs/v3/source/includes/resources/space_quotas/_update.md.erb
56:| **apps.per_app_tasks** | _integer_ or null | Maximum number of running tasks in a single application
docs/v3/source/includes/resources/space_quotas/_object.md.erb
20:| **apps.per_app_tasks** | _integer_ or null | Maximum number of running tasks in a single application |
docs/v3/source/includes/resources/space_quotas/_create.md.erb
54:| **apps.per_app_tasks** | _integer_ or null | Maximum number of running tasks in a single application | null (infinite) |
docs/v3/source/includes/resources/organization_quotas/_update.md.erb
59:| **apps.per_app_tasks** | _integer_ or null | Maximum number of running tasks in a single application
docs/v3/source/includes/resources/organization_quotas/_object.md.erb
20:| **apps.per_app_tasks** | _integer_ or null | Maximum number of running tasks in a single application |
docs/v3/source/includes/resources/organization_quotas/_create.md.erb
49:| **apps.per_app_tasks** | _integer_ or null| Maximum number of running tasks in a single application | null (infinite) |