Bug 1321977 - ESXi host license info out of sync between API and Elasticsearch
Summary: ESXi host license info out of sync between API and Elasticsearch
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Subscription Management
Version: 6.1.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: Unspecified
Assignee: Eric Helms
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-29 13:44 UTC by Jason Berry
Modified: 2019-09-26 13:58 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-12 19:37:33 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Jason Berry 2016-03-29 13:44:41 UTC
Description of problem:
When removing a license from an ESXi host under Content Hosts, if the license has guests using the "Guests Of" license, the GUI will allow you to remove the license and all seems proper.  However, if you hit the subscriptions API, the old license still exists, and any new license you assign to that ESXi host is not found anywhere. 

Only after a katello:clean_backend_objects and katello:reindex, does the web interface and the API match up again

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

How reproducible:
Sporadically.  Those conditions mentioned above are what I've been able to narrow it down to, but I have limited testing capabilities due to this being a production infrastructure

Steps to Reproduce:
1. virt-who and inventory an ESXi cluster
2. Assign a "1 guest" license to an ESXi host
3. subscription-manager register a VM on that host to Sat6 and assign it the "guest of <esxihost>" license available
4. Remove the license from the ESXi host
5. Hit the subscriptions API and search by the UUID of the ESXi host, and the "removed" subscription still shows attached.
6. Assign a new license to the ESXi host
7. Hit the subscriptions API again and you'll still find the old license attached to the UUID, and nothing about the new license

Actual results:
API and Elasticsearch are out of sync

Expected results:
They should be the same without having to do the foreman-rake jobs

Comment 1 Bryan Kearney 2016-07-26 19:00:50 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 2 Bryan Kearney 2017-01-12 19:37:33 UTC
Elastic Search has been removed in 6.2, this issue should be resolved.


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