Bug 1466185 - Changing service level from subscription manager does not make changes on WebUI
Changing service level from subscription manager does not make changes on WebUI
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Subscription Management (Show other bugs)
6.2.10
All Linux
medium Severity medium (vote)
: GA
: --
Assigned To: Brad Buckingham
Walden Raines
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-29 04:36 EDT by Amit Upadhye
Modified: 2018-02-21 11:51 EST (History)
4 users (show)

See Also:
Fixed In Version: tfm-rubygem-katello-3.4.4
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-02-21 11:51:07 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3098301 None None None 2017-06-29 05:05 EDT
Foreman Issue Tracker 20266 None None None 2017-07-10 13:25 EDT

  None (edit)
Description Amit Upadhye 2017-06-29 04:36:00 EDT
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,

# 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.

# 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
Comment 1 Brad Buckingham 2017-07-10 13:25:14 EDT
Created redmine issue http://projects.theforeman.org/issues/20266 from this bug
Comment 2 pm-sat@redhat.com 2017-07-18 12:07:17 EDT
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20266 has been resolved.
Comment 3 pm-sat@redhat.com 2017-08-03 18:09:10 EDT
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20266 has been resolved.
Comment 4 Walden Raines 2017-08-16 17:05:11 EDT
I now see the service level being removed when running:

subscription-manager service-level --unset 

on sat 6.3.0 snap 11.
Comment 5 pm-sat@redhat.com 2018-02-21 11:51:07 EST
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
> 
> For information on the advisory, and where to find the updated files, follow the link below.
> 
> If the solution does not work for you, open a new bug report.
> 
> https://access.redhat.com/errata/RHSA-2018:0336

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