Bug 1878665

Summary: Hypervisor with 0 socket is submitted via Yupana to HBI and tally is broken
Product: Red Hat Hybrid Cloud Console (console.redhat.com) Reporter: Sanket Jagtap <sjagtap>
Component: Subscription WatchAssignee: Michael Stead <mstead>
Status: CLOSED CURRENTRELEASE QA Contact: Jon Allen <jallen>
Severity: high Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: apatel, bcourt, mstead, sghai, sshtein, wpinheir
Target Milestone: ---Keywords: SubscriptionWatch, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-15 12:19:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Sanket Jagtap 2020-09-14 10:13:15 UTC
Description of problem:
There are two means to bring hypervisor hosts to HBI in Subwatch ,
1. Yupana (Satellite)
2. RHSM-Conduit (RHSM)

If any Hypervisor with 0 socket counts makes it way to HBI, the next tally onwards on the account fails

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

How reproducible:

Steps to Reproduce:
1. Have a hypervisor with 0 socket submitted via yupana

Actual results:
Tally breaks and account is not tallied. 
PFA to see the trace and log

Expected results:
There should be validation happening to detect the 0 hypervisor socket and stop it from being submitted to HBI. 
Currently, there is validation at rhsm-conduit, there should be the same in yupana aswell. 

Additional info:
This only affects the hypervisors submitted via Yupana, i.e Red hat Cloud Satellite Plugin.

Comment 2 Michael Stead 2020-09-25 13:35:16 UTC
This has been addressed in rhsm-subscriptions such that a tally run will not fail when a host is processed in this state. The end result is that Tally will record the host with 0 sockets (for discovery if need be) but the API should filter then as it has already been doing.

As far as I know, the hypervisor host is not currently being validated in Yupana as suggested by the reporter to prevent the host from reaching HBI (as rhsm-conduit is doing).

I'm going to leave this bug open until this has been addressed.

Comment 3 Anurag Patel 2020-09-25 15:10:58 UTC
The 0 socket count issue is being addressed in foreman-rhcloud as well. To ensure sanity of data, we should filter these in Yupana as well. Do we have a spec on which system facts similar to `cpu::cpu_socket(s)` should be inspected and dropped?

Comment 4 Sanket Jagtap 2020-09-28 08:27:04 UTC
Do we have a bugzilla for foreman-rhcloud ? If not I think we should create as it would be a two part fix and easier to cherrypick in other versions of the plugin , Can we add it to see also in here, for better tracking.

Comment 7 Barnaby Court 2020-10-15 12:19:01 UTC
Fix in Tally was pushed to production.