Bug 1640688 - 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: ---
: 2.5
Assignee: Nikos Moumoulidis
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-18 14:19 UTC by Kevin Howell
Modified: 2018-11-30 14:45 UTC (History)
7 users (show)

Fixed In Version: candlepin-2.5.8-1
Clone Of: 1640215
Environment:
Last Closed: 2018-11-30 14:45:49 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin candlepin pull 2166 0 None None None 2018-11-29 13:03:14 UTC

Description Kevin Howell 2018-10-18 14:19:17 UTC
+++ This bug was initially created as a clone of Bug #1640215 +++

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"}}]

--- Additional comment from Jonathon Turel on 2018-10-17 13:56:31 EDT ---

Forgot to mention I saw this on 2.5.7

--- Additional comment from Kevin Howell on 2018-10-18 10:17:24 EDT ---

Dev, let's eliminate the legacy handling of empty string in Candlepin.

--- Additional comment from Kevin Howell on 2018-10-18 10:18:43 EDT ---

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