Bug 2152434

Summary: host_type is not set to Edge after logs rollover due to undetermined greenboot status
Product: Red Hat Hybrid Cloud Console (console.redhat.com) Reporter: Jonathan Holloway <jhollowa>
Component: InventoryAssignee: aprice
Status: CLOSED MIGRATED QA Contact: fstavela
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: amurdaca, bfahr, cmarinea, fjansen, lphiri, miclark, rblakley, stomsa, vdymna, zzhou
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-04-19 09:56:53 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:
Embargoed:

Description Jonathan Holloway 2022-12-11 21:40:11 UTC
Description of problem:
we identified that greenboot wasn't getting the correct information for host types to edge devices.

The hotfix (https://github.com/RedHatInsights/insights-core/pull/3582/files) was complete, however  if a system has been on long enough without a reboot, the logs from boot will roll off, and greenboot-status will not function.

We need to provide a way to get this information even if the log rotated. 

Version-Release number of selected component (if applicable):
9.x (at least)

How reproducible:
Every time if device is running long enough for logs to rollover.

Steps to Reproduce:
1. Install RHEL for Edge on a device
2. Register the device
3. Wait for logs to rollover and the next Insights collection will not set the host_type to Edge.

Actual results:
host_type is not set to Edge and the device is removed from Edge Management

Expected results:
host_type is set to Edge and the device remains in Edge Management

Additional info:

Comment 1 Link Dupont 2022-12-12 15:57:06 UTC
This is an RFE to an existing spec (presumably the greenboot spec?), assigning to insights-core team.

Comment 3 Jaylin Zhou 2022-12-13 07:21:15 UTC
Hey Jonathan, 

IIUC, what you mean is an edge device system disappears from Edge inventory (https://console.redhat.com/edge/inventory) if "greenboot status" returns unknown because of the rotation of greenboot events. 

IMO, whether an edge device should be displayed in the Edge inventory page should not depend on the result of "greenboot status" but whether it is an edge device or not. 

I think it is better to use https://github.com/RedHatInsights/insights-puptoo/blob/master/src/puptoo/process/profile.py#L223 instead of https://github.com/RedHatInsights/insights-puptoo/blob/master/src/puptoo/process/profile.py#L213

Comment 4 Antonio Murdaca 2023-02-07 08:11:01 UTC
(In reply to Jaylin Zhou from comment #3)
> Hey Jonathan, 
> 
> IIUC, what you mean is an edge device system disappears from Edge inventory
> (https://console.redhat.com/edge/inventory) if "greenboot status" returns
> unknown because of the rotation of greenboot events. 
> 
> IMO, whether an edge device should be displayed in the Edge inventory page
> should not depend on the result of "greenboot status" but whether it is an
> edge device or not. 

I can't agree more with this statement - basing the logic on whether a device is an edge device on the presence of greenboot logic is flacky at best and nothing stops people from using it elsewhere

> 
> I think it is better to use
> https://github.com/RedHatInsights/insights-puptoo/blob/master/src/puptoo/
> process/profile.py#L223 instead of
> https://github.com/RedHatInsights/insights-puptoo/blob/master/src/puptoo/
> process/profile.py#L213

Comment 6 Insights Rule Dev Team 2023-04-19 08:24:25 UTC
This bugzilla ticket has been migrated to https://issues.redhat.com/browse/RHINENG-290 for further development. Please follow the updates in that Jira ticket directly. This bugzilla ticket is marked as CLOSED. If the Jira ticket is not visible to you, please leave a comment in this bugzilla ticket.