Project

General

Profile

Actions

Bug #20266

closed

Changing service level from subscription manager does not make changes on WebUI

Added by Brad Buckingham over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Subscriptions
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1466185

Description of problem:

After changing service level using subscription manager it does not make any changes on Content Host profile on WebUI.

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

6.2.10

How reproducible:

Everytime

Steps to Reproduce:
1. Register a system on Satellite using subscription-manager.
2. Set Premium as service level on content host profile.
3. Unset service level from client system,

  1. subscription-manager service-level --unset
    Service level preference has been unset

This makes no changes on WebUI.

Actual results:

Service level does not change on Content Host system profile.

Expected results:

Service level changes should be reflected on WebUI for Content Hosts page.

Additional info:

1. On Satellite if I manually update service_level using subscription_facet then I can see it changes on Content Hosts page.

  1. vim /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.137/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb

247 def facts
248 User.current = User.anonymous_admin
249 async_task(::Actions::Katello::Host::Update, @host, rhsm_params)
250 Rails.logger.info("amit debug: #{rhsm_params[:serviceLevel]}")
251 @host.subscription_facet[:service_level] = rhsm_params[:serviceLevel]
252 @host.subscription_facet.save!
253 #Katello::Host::SubscriptionFacet.update_facts(@host, rhsm_params)
254 render :json => {:content => _("Facts successfully updated.")}, :status => 200
255 end

2. On upstream Foreman instance if I try to unset service level then it fails as below,

2017-06-29 14:02:59 ba103d50 [app] [I] Processing by Katello::Api::Rhsm::CandlepinProxiesController#facts as JSON
2017-06-29 14:02:59 ba103d50 [app] [I] Parameters: {"serviceLevel"=>"", "id"=>"32584679-f348-4349-a711-a7f8b472758f"}
2017-06-29 14:02:59 ba103d50 [foreman-tasks/dynflow] [W] Error on on_execution_plan_save event | ActiveRecord::RecordInvalid: Validation failed: Resource can't be blank

http://pastebin.test.redhat.com/498781

Actions #1

Updated by Brad Buckingham over 7 years ago

  • Subject changed from Changing service level from subscription manager does not make changes on WebUI to Changing service level from subscription manager does not make changes on WebUI
  • Target version set to 202
Actions #2

Updated by The Foreman Bot over 7 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/6862 added
Actions #3

Updated by Justin Sherrill over 7 years ago

  • Translation missing: en.field_release set to 267
Actions #4

Updated by Brad Buckingham over 7 years ago

  • Target version changed from 202 to 205
Actions #5

Updated by Brad Buckingham over 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #6

Updated by Eric Helms over 7 years ago

  • Translation missing: en.field_release changed from 267 to 281
Actions

Also available in: Atom PDF