Bug 1927751 - Subscription Watch SLA filter does not honors "service level" set to system when registered using activation key
Summary: Subscription Watch SLA filter does not honors "service level" set to system ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Hybrid Cloud Console (console.redhat.com)
Classification: Red Hat
Component: Subscription Watch
Version: unspecified
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ---
: ---
Assignee: Kevin Howell
QA Contact: Jon Allen
URL:
Whiteboard:
: 1929811 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-11 13:33 UTC by Sanket Jagtap
Modified: 2024-12-20 19:37 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-23 11:51:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sanket Jagtap 2021-02-11 13:33:16 UTC
This bug was initially created as a copy of Bug #1845113

I am copying this bug because: 



Description of problem:
When the system is registered using activation key with "service level" set in the key. The system is assigned to a service level(SLA), but the SLA is not captured while uploading the data to the cloud.redhat.com using satellite web ui.

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


How reproducible:


Steps to Reproduce:
1. Create an activation key with service level set in it
2. Register the system using the activatio key 
3. System will get the service level(SLA) as per the key
4. Upload the data to cloud.redhat.com.

Actual results:
The uploaded data do not have any information on SLA set by activation key


Expected results:
SLA set using activation key should also be upload in the data


Additional info:

Comment 3 Yves Eynard 2021-02-24 17:57:15 UTC
I see similar behavior, 

Satellite 6.8.1

Client, running RHEL 8.3:
[root@rhel7to8 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: Matched

[root@rhel7to8 ~]# syspurpose show
{
  "role": "Red Hat Enterprise Linux Server",
  "service_level_agreement": "Premium",
  "usage": "Production"
}

Satellite is configured to use Insight with account number 5910538, and the check connection test reports success

Changing entries on the Content tab in Satellite for a system results in an update on the Client. For example:

[root@satellite ~]# hammer host show --id rhel7to8.yceconsulting.com
Id:                       11
 ==== OUPUT CLIPPED ====
 Subscription Information:
     UUID:                          378b1f36-773a-4d8f-94fa-f645192a9962
     Last Checkin:                  2021-02-24 17:09:16 UTC
     Release Version:               8.3
     Autoheal:                      true
     Registered To:                 satellite.yceconsulting.com
     Registered At:                 2021-02-24 15:20:47 UTC
     Registered by Activation Keys:
      1) 235-rhel8-key
     System Purpose:
         Service Level:  Premium
         Purpose Usage:  Production
         Purpose Role:   Red Hat Enterprise Linux Server
         Purpose Addons:
 Host Collections:
  1) Id:   2
     Name: default

Change the syspurpose from the Content tab to Self-Support, re-run "hammer show":
Subscription Information:
    UUID:                          378b1f36-773a-4d8f-94fa-f645192a9962
    Last Checkin:                  2021-02-24 17:09:16 UTC
    Release Version:               8.3
    Autoheal:                      true
    Registered To:                 satellite.yceconsulting.com
    Registered At:                 2021-02-24 15:20:47 UTC
    Registered by Activation Keys:
     1) 235-rhel8-key
    System Purpose:
        Service Level:  Self-Support
        Purpose Usage:  Development/Test
        Purpose Role:   Red Hat Enterprise Linux Server
        Purpose Addons:
Host Collections:
 1) Id:   2
    Name: default

The client reports the data correctly:
[root@rhel7to8 ~]# syspurpose show
{
  "service_level_agreement": "Self-Support",
  "usage": "Development/Test"
}

However, nothing is reported up to cloud.redhat.com with respect to syspurpose. Here is the client entry from https://cloud.redhat.com/api/inventory/v1/hosts?page=1 for this system. Note the "facts" section has no data:
{
     "insights_id": "f0245603-bf47-4e28-8e05-282ca120bf8e",
     "rhel_machine_id": null,
     "subscription_manager_id": "378b1f36-773a-4d8f-94fa-f645192a9962",
     "satellite_id": "378b1f36-773a-4d8f-94fa-f645192a9962",
     "bios_uuid": "5e8ac7ba-d775-429a-a448-74491283a5c8",
     "ip_addresses": [
       "192.168.0.162",
       "192.168.122.1"
     ],
     "fqdn": "rhel7to8.yceconsulting.com",
     "mac_addresses": [
       "56:6f:7d:de:00:03",
       "00:00:00:00:00:00",
       "52:54:00:28:a8:be",
       "52:54:00:28:a8:be"
     ],
     "external_id": null,
     "id": "f0b06cbd-a715-4bc4-a6a7-8b053367c618",
     "account": "5910538",
     "display_name": "rhel7to8.yceconsulting.com",
     "ansible_host": null,
     "facts": [],
     "reporter": "puptoo",
     "stale_timestamp": "2021-02-25T19:46:35.935134+00:00",
     "stale_warning_timestamp": "2021-03-04T19:46:35.935134+00:00",
     "culled_timestamp": "2021-03-11T19:46:35.935134+00:00",
     "created": "2021-02-24T15:32:06.816241+00:00",
     "updated": "2021-02-24T17:46:36.002252+00:00"
   },

Satellite updates cloud.redhat.com with the client info; it is seen in Insights, but the syspurpose is not updated via Satellite. This is critical when enabling SCA and SW.

Comment 4 Sanket Jagtap 2021-02-25 07:57:33 UTC
*** Bug 1929811 has been marked as a duplicate of this bug. ***

Comment 5 Sanket Jagtap 2021-02-25 07:58:27 UTC
Satellite now sends the data to HBI successfully. However, we need to fix the same on Swatch. So filters would work for different SLA types.

Look also: https://bugzilla.redhat.com/show_bug.cgi?id=1929811

Comment 8 Aurobinda Nayak 2021-07-23 08:19:02 UTC
Verified with:
- Satellite 6.8.6 snap 1.1 (Manual testing)
- Satellite 6.7.2 (Automation testing)

Test steps:
- Generate a report with different SAL and usage(Premium/Standard and Production/Development/Test/Disaster Recovery) parameter
- Upload the report and verify the SLA and usage filter.


Observations:
- Valid JSON file is created.
- SLA and system_purpose_usage filter working fine on Swatch.

Comment 9 Nikhil Kathole 2021-07-23 11:51:13 UTC
rhsm-subscriptions-1.0.56

Fix is deployed to production.


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