Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1466185 - Changing service level from subscription manager does not make changes on WebUI
Summary: Changing service level from subscription manager does not make changes on WebUI
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Subscription Management
Version: 6.2.10
Hardware: All
OS: Linux
medium
medium
Target Milestone: Unspecified
Assignee: Brad Buckingham
QA Contact: Walden Raines
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-29 08:36 UTC by Amit Upadhye
Modified: 2020-12-14 08:58 UTC (History)
4 users (show)

Fixed In Version: tfm-rubygem-katello-3.4.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:51:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 20266 0 None None None 2017-07-10 17:25:16 UTC
Red Hat Knowledge Base (Solution) 3098301 0 None None None 2017-06-29 09:05:35 UTC

Description Amit Upadhye 2017-06-29 08:36:00 UTC
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 17:25:14 UTC
Created redmine issue http://projects.theforeman.org/issues/20266 from this bug

Comment 2 Satellite Program 2017-07-18 16:07:17 UTC
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 Satellite Program 2017-08-03 22:09:10 UTC
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 21:05:11 UTC
I now see the service level being removed when running:

subscription-manager service-level --unset 

on sat 6.3.0 snap 11.

Comment 5 Satellite Program 2018-02-21 16:51:07 UTC
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.