Bug 2033404 - Cloud event schema is missing source type and resource field is using wrong value
Summary: Cloud event schema is missing source type and resource field is using wrong v...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cloud Native Events
Version: 4.10
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: 4.10.0
Assignee: Jack Ding
QA Contact: obochan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-16 17:36 UTC by Aneesh Puttur
Modified: 2022-03-10 16:34 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-10 16:34:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:34:42 UTC

Description Aneesh Puttur 2021-12-16 17:36:57 UTC
Description of problem:

EVent schema should have source type specified at the event level and use existing resource value at the data level.

Also, use the correct PTP resource value for the resource type.

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


Actual results:

"event":{ 
    "id": "24593ca4-965d-469a-bc75-1bc8e6d24b77",
    "type": "event.sync.ptp-status.ptp-state-change",
    "dataContentType": "application/json",
    "time": "2021-12-16T15:28:19.185050702Z", 
    "data": 
      "version": "v1", 
      "values": [ {
        "resource":"/cluster/node/cnfdt06.lab.eng.tlv2.redhat.com/ptp/clock_realtime",
        "dataType": "notification",    
        "valueType": "enumeration",     
       "value": "LOCKED"        
       }],
}     



Expected results:

event  { 
    "id": "24593ca4-965d-469a-bc75-1bc8e6d24b77",
    "type": "event.sync.ptp-status.ptp-state-change",
    "source":"/cluster/node/cnfdt06.lab.eng.tlv2.redhat.com/ptp/clock_realtime",
    "dataContentType": "application/json",
    "time": "2021-12-16T15:28:19.185050702Z", 
    "data": 
      "version": "v1", 
      "values": [ {
        "resource": /sync/sync-status/sync-state  
        "dataType": "notification",    
        "valueType": "enumeration",     
       "value": "LOCKED"        
       }],
}     

Additional info:

Comment 2 obochan 2022-01-24 15:10:14 UTC
issue is verified in 

Server Version: 4.10.0-0.nightly-2022-01-22-102609
Kubernetes Version: v1.23.0+1e7220d

ime="2022-01-24T14:57:28Z" level=debug msg="event sent {\n    \"id\": \"946a64f6-4c90-426d-92e8-178490cc5194\",\n    \"type\": \"event.sync.ptp-status.ptp-state-change\",\n    \"source\": \"/cluster/cnfde7.ptp.lab.eng.bos.redhat.com/ptp/interface/ens5fx/master\",\n    \"dataContentType\": \"application/json\",\n    \"time\": \"2022-01-24T14:57:28.72318257Z\",\n    \"data\": {\n      \"version\": \"v1\",\n      \"values\": [\n        {\n          \"resource\": \"/sync/sync-status/sync-state\",\n          \"dataType\": \"notification\",\n          \"valueType\": \"enumeration\",\n          \"value\": \"FREERUN\"\n        },\n        {\n          \"resource\": \"/sync/sync-status/sync-state\",\n          \"dataType\": \"metric\",\n          \"valueType\": \"decimal64.3\",\n

Comment 6 errata-xmlrpc 2022-03-10 16:34:29 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 (Moderate: OpenShift Container Platform 4.10.3 security 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/RHSA-2022:0056


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