Bug 1640215 - purpose compliance event gives mismatch reason for null SLA
Summary: purpose compliance event gives mismatch reason for null SLA
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 2.5
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: candlepin-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: 1650635 1654094
TreeView+ depends on / blocked
 
Reported: 2018-10-17 14:51 UTC by Jonathon Turel
Modified: 2019-01-23 16:56 UTC (History)
5 users (show)

Fixed In Version: candlepin-2.6.1-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1640688 1640689 (view as bug list)
Environment:
Last Closed: 2019-01-23 16:56:08 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin candlepin pull 2143 0 'None' 'closed' '1640215: Fix incorrect partial compliance status on consumers' 2019-11-12 11:28:34 UTC
Red Hat Bugzilla 1640531 1 None None None 2021-01-20 06:05:38 UTC

Internal Links: 1640531

Description Jonathon Turel 2018-10-17 14:51:33 UTC
Description of problem:

When a consumer has a null service level and a subscription is attached the system_purpose_compliance event is sent. if the attached subscription provides a service level the event will provide a reason indicating a mismatch


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


How reproducible:


Steps to Reproduce:
1. create a consumer and do not set an sla
2. attach a subscription which provides an SLA
3. observe the system purpose compliance event (probably the same through API but didn't check)

Actual results: The compliance event contains a reason, for example: "expected sla is  but pool 4028f935658b81450165a5d4ecd50c9b with product RH00003 provides SLA: Premium"


Expected results: There should not be a mismatch since we didn't set an SLA on the consumer


Additional info:

example event:

{"id":null,"type":"CREATED","target":"SYSTEM_PURPOSE_COMPLIANCE","targetName":"katello-client.jturel.example.com","principalStore":"{\"type\":\"trusteduser\",\"name\":\"foreman_admin\"}","timestamp":1539785096299,"entityId":"08b35f38-7576-40d9-a235-1f8108252695","ownerId":"4028f93563fc914b0163fe5ab16e0001","consumerUuid":"08b35f38-7576-40d9-a235-1f8108252695","referenceId":null,"referenceType":null,"eventData":"{\"reasons\":[\"expected sla is  but pool 4028f935658b81450165a5d4ecd50c9b with product RH00003 provides SLA: Premium\"],\"status\":\"partial\"}","messageText":null,"principal":{"type":"trusteduser","name":"foreman_admin"}}]

Comment 1 Jonathon Turel 2018-10-17 17:56:31 UTC
Forgot to mention I saw this on 2.5.7

Comment 2 Kevin Howell 2018-10-18 14:17:24 UTC
Dev, let's eliminate the legacy handling of empty string in Candlepin.

Comment 3 Kevin Howell 2018-10-18 14:18:43 UTC
> Dev, let's eliminate the legacy handling of empty string in Candlepin.

receiving empty string for SLA should set the SLA to null.


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