Bug 1016192 - Plan change erases gear size customizations for domains
Summary: Plan change erases gear size customizations for domains
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Ravi Sankar
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-07 17:12 UTC by Jordan Liggitt
Modified: 2015-05-15 00:21 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-17 13:33:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jordan Liggitt 2013-10-07 17:12:30 UTC
Description of problem:
Changing a user's plan resets customized gear sizes for their domains

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

In cloud_user_ext.rb, we assign gear sizes to the domain, which could add back gear sizes the user specifically removed from the domain previously.

    # Update domain gear sizes
    begin
      domains.each do |d|
        d.allowed_gear_sizes = allowed_gear_sizes
        Rails.logger.error "Unable to update gear sizes for domain #{d.namespace} owned by user #{login} - #{d.errors.inspect}" if !d.save
      end
    rescue
      Rails.logger.error e.message
      Rails.logger.error e.backtrace.inspect
    end

Comment 1 Jordan Liggitt 2013-10-08 19:29:18 UTC
Goals for domain gear size modifications on plan change:
1. Remove any gear sizes no longer allowed by their plan (required)

2. If the user hasn't customized allowed gear sizes for the domain (hard to detect), automatically add new gear sizes the user is entitled to

3. If the user has customized gear sizes for the domain (hard to detect), don't add back gear sizes the user explicitly disallowed.

Comment 2 Ravi Sankar 2013-10-08 20:40:01 UTC
Fixed in https://github.com/openshift/li/pull/1958

Comment 3 Xiaoli Tian 2013-10-09 10:40:49 UTC
(In reply to Ravi Sankar from comment #2)
> Fixed in https://github.com/openshift/li/pull/1958

Just remind: above pull request failed.

Comment 4 openshift-github-bot 2013-10-09 21:16:12 UTC
Commits pushed to master at https://github.com/openshift/li

https://github.com/openshift/li/commit/1a3be56aff4241a1cf06a620416e7a9760276727
Bug 1016192 - Don't add back gear sizes to the domain explicitly disallowed by the user.

https://github.com/openshift/li/commit/ea1b4adb18c966829b083e92e5651567946f66f6
Merge pull request #1958 from pravisankar/dev/ravi/bug1016192

Merged by openshift-bot

Comment 5 Jianwei Hou 2013-10-10 05:55:02 UTC
Verified on devenv_3880

1. As silver plan, add only 'medium' gear size to domain
2. Downgrade to free, the domain does not have any allowed gearsize
3. Add 'small' to domain
4. Upgrade to silver, the domain allows 'small, silver' gear sizes
5. Downgrade to free, the domain only allows 'small' gear size


Note You need to log in before you can comment on or make changes to this bug.