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
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.
Fixed in https://github.com/openshift/li/pull/1958
(In reply to Ravi Sankar from comment #2) > Fixed in https://github.com/openshift/li/pull/1958 Just remind: above pull request failed.
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
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