openbmc / bmcweb

A do everything Redfish, KVM, GUI, and DBus webserver for OpenBMC
Apache License 2.0
156 stars 131 forks source link

Push style event subscription gets deleted on BMC reboot #164

Open adathatri opened 3 years ago

adathatri commented 3 years ago

@edtanous @ratagupt

Step to recreate:

  1. Subscribe to Push style events using RedfishEventListener_v1.py
    
    Method = POST, status = 201, expected status = [200, 201, 204] 
    {
    "@Message.ExtendedInfo": [
    {
      "@odata.type": "#Message.v1_0_0.Message",
      "Message": "The resource has been created successfully",
      "MessageArgs": [],
      "MessageId": "Base.1.8.1.Created",
      "MessageSeverity": "OK",
      "Resolution": "None"
    }
    ]
    }

-bash-4.2$ curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${BMC_IP}/redfish/v1/EventService/Subscriptions/ { "@odata.id": "/redfish/v1/EventService/Subscriptions", "@odata.type": "#EventDestinationCollection.EventDestinationCollection", "Members": [ { "@odata.id": "/redfish/v1/EventService/Subscriptions/955021906" -- A subscription is created. } ], "Members@odata.count": 1, "Name": "Event Destination Collections"


2. Execute "reboot" command on BMC
3. Check the subscription after BMC reboots.  

}-bash-4.2$ curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${BMC_IP}/redfish/v1/EventService/Subscriptions { "@odata.id": "/redfish/v1/EventService/Subscriptions", "@odata.type": "#EventDestinationCollection.EventDestinationCollection", "Members": [], "Members@odata.count": 0, -- Subscription is deleted "Name": "Event Destination Collections" }-bash-4.2$

edtanous commented 3 years ago

Possibly related to this: https://github.com/openbmc/bmcweb/issues/165

It's not clear all the version information and other things were handled on the evenservice persistent file. It just needs rolled into the main one.

adathatri commented 3 years ago

@edtanous This issue is for https subscription only. On BMC reboot, the exisiting subscription does not persist. Issue #165 talks about being unable to subscribe to event notification itself using http.

edtanous commented 1 year ago

Is this still an issue? The eventservice code has changed significantly in the last few years.