Bug 1016192 - Plan change erases gear size customizations for domains
Plan change erases gear size customizations for domains
Product: OpenShift Online
Classification: Red Hat
Component: Pod (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Ravi Sankar
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-10-07 13:12 EDT by Jordan Liggitt
Modified: 2015-05-14 20:21 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-17 09:33:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jordan Liggitt 2013-10-07 13:12:30 EDT
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:

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
      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
      Rails.logger.error e.message
      Rails.logger.error e.backtrace.inspect
Comment 1 Jordan Liggitt 2013-10-08 15:29:18 EDT
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 16:40:01 EDT
Fixed in https://github.com/openshift/li/pull/1958
Comment 3 Xiaoli Tian 2013-10-09 06:40:49 EDT
(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 17:16:12 EDT
Commits pushed to master at https://github.com/openshift/li

Bug 1016192 - Don't add back gear sizes to the domain explicitly disallowed by the user.

Merge pull request #1958 from pravisankar/dev/ravi/bug1016192

Merged by openshift-bot
Comment 5 Jianwei Hou 2013-10-10 01:55:02 EDT
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.