Bug 2041079

Summary: Redfish events from HPE are not processed by hw-event-proxy
Product: OpenShift Container Platform Reporter: nwaizer
Component: Cloud Native EventsAssignee: Jack Ding <jacding>
Cloud Native Events sub component: Hardware Event Proxy QA Contact: nwaizer
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: aos-bugs, aputtur, ijolliff, jacding, nparekh
Version: 4.10   
Target Milestone: ---   
Target Release: 4.10.0   
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: 2022-03-16 11:12:07 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:
Attachments:
Description Flags
pcap none

Description nwaizer 2022-01-15 20:43:19 UTC
Created attachment 1851025 [details]
pcap

Description of problem:
Using HPE Redfish to emit a test event, this event is not processed by the hw-event-proxy

Version-Release number of selected component (if applicable):
ProLiant DL380 Gen10 running iLO 5 firmware version 2.10 Oct 30 2019


How reproducible:


Steps to Reproduce:

Setup hw-event-proxy on an SNO
Setup a second bare metal RHEL server.

Sanity 1
Use a Dell bare metal to test subscribing Redfish to the hw-event-proxy URI and SubmitTestEvent to receive an alert. as expected.

Sanity 2
1. Subscribe a HPE server to a bare metal running RHEL and netcat in listen to port 443, and tcpdump on the https port.

2. Now subscribe the netcat URI.
Issue Redfish SubmitTestEvent, and verify a request was received on the netcat, and in the tcpdump. attaching pcap and screenshot


Test
1. Subscribe the HPE redfish to the hw-event-proxy URI
2. SubmitTestEvent to the HPE redfish


Actual results:
1. No event is received int he sidecar consumer
2. hw-event-proxy app logs show no incoming redfish event.


Expected results:
1. sidecar consumer should get the event.
2. the hw-event-proxy should print a log for the receipted redfish event.

Additional info:

Comment 2 Jack Ding 2022-01-19 20:39:09 UTC
The minimum version Redfish we support is 1.8.0. 
The HPE hardware used in this test uses Redfish 1.6.0.

The schema definition (https://redfish.dmtf.org/schemas/v1/Event.v1_4_1.json) included in Redfish 1.8.0 requires an mandatory field `MemberId`.
The HPE hardware test event sent by this test uses a much older schema Event.v1_0_0 in which `MemberId` is an optional field and is not included in the test event. Hw-event-proxy rejected this message as expected.

The test needs to be done with a HPE supports Redfish 1.6.0 or later.

```
time="2022-01-19T20:32:09Z" level=trace msg="webhook received event {\"@odata.context\":\"/redfish/v1/$metadata#Event.Event\",\"@odata.type\":\"#Event.v1_0_0.Event\",\"Events\":[{\"EventId\":\"TestEventId\",\"EventTimestamp\":\"2021-06-11T11:11:11Z\",\"EventType\":\"Alert\",\"Message\":\"Test Event\",\"MessageArgs\":[\"NoAMS\",\"Busy\",\"Cached\"],\"MessageId\":\"iLOEvents.2.1.ServerPoweredOff\",\"OriginOfCondition\":\"/redfish/v1/Systems/1/\",\"Severity\":\"OK\"}],\"Name\":\"Events\"}"
time="2022-01-19T20:32:09Z" level=error msg="failed to publish hw event: error marshalling event error writing data: error writing Event[0]: field MemberId is not set"

```

Comment 3 Jack Ding 2022-01-19 22:38:58 UTC
The test needs to be done with a HPE firmware supporting Redfish 1.8.0 or later.

Comment 4 nwaizer 2022-01-25 15:05:44 UTC
Upgraded ProLiant e910t blade to iLO 5 firmware 2.60(2022-01-20) and I test a second power supply socket on/off and still see the events in schema v1.0.0

Comment 8 errata-xmlrpc 2022-03-16 11:12:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.10.4 bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:0811