Bug 1121971
Summary: | Can't clone application of additional storage within owner domain by admin/edit member which has no additional stroage capability | |||
---|---|---|---|---|
Product: | OpenShift Online | Reporter: | XiuJuan Wang <xiuwang> | |
Component: | Pod | Assignee: | Abhishek Gupta <abhgupta> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> | |
Severity: | low | Docs Contact: | ||
Priority: | medium | |||
Version: | 2.x | CC: | anli, jliggitt, jokerman, mmccomas | |
Target Milestone: | --- | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1122496 (view as bug list) | Environment: | ||
Last Closed: | 2014-10-10 00:49:20 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1122496 |
Description
XiuJuan Wang
2014-07-22 09:08:50 UTC
applications_controller in the broker is doing two checks during app creation, based on the user doing the creation, rather than the owner of the domain: if (@cloud_user.consumed_gears >= @cloud_user.max_gears) return render_error(:unprocessable_entity, "#{@cloud_user.login} has already reached the gear limit of #{@cloud_user.max_gears}", 104) end if (cartridges.map(&:additional_gear_storage).compact.map(&:to_i).max || 0) > @cloud_user.max_storage return render_error(:unprocessable_entity, "#{@cloud_user.login} has requested more additional gear storage than allowed (max: #{@cloud_user.max_storage} GB)", 166) end Both of these checks are incorrect... the gears and extra storage should be validated against the capabilities of the owner of the domain where the app is being created, not the calling user. Simply need to validate against @domain.owner.consumed_gears and @domain.owner.max_storage Will merge fix in https://github.com/openshift/origin-server/pull/5638 Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/525547875c4673e2a317c013fd6053ed792c4b58 Bug 1121971: Validate based on domain owner capabilities during app create Checked on devenv_4998 Can't reproduce this bug.Will verify this bug after on_qa. Verified on devenv_5003 Move bug to VERIFIED.Thanks! |