openbmc / bmcweb

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

Clients are able to subscribe though EventService is disabled #149

Closed adathatri closed 2 years ago

adathatri commented 4 years ago

Step to recreate:

  1. Disable EventService via Redfish.
-bash-4.2$ curl -k -H "X-Auth-Token: $bmc_token" -X PATCH -d '{ "ServiceEnabled":false}' https://${BMC_IP}/redfish/v1/EventService
-bash-4.2$ curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${BMC_IP}/redfish/v1/EventService
{
"@odata.id": "/redfish/v1/EventService",
"@odata.type": "#EventService.v1_5_0.EventService",
"Actions": {
"#EventService.SubmitTestEvent": {
"target": "/redfish/v1/EventService/Actions/EventService.SubmitTestEvent"
}
},
"DeliveryRetryAttempts": 3,
"DeliveryRetryIntervalSeconds": 30,
"EventFormatTypes": [
"Event",
"MetricReport"
],
"Id": "EventService",
"Name": "Event Service",
"RegistryPrefixes": [
"Base",
"OpenBMC",
"Task"
],
"ResourceTypes": [
"Task"
],
"SSEFilterPropertiesSupported": {
"EventFormatType": true,
"MessageId": true,
"MetricReportDefinition": true,
"OriginResource": false,
"RegistryPrefix": true,
"ResourceType": false
},
"ServiceEnabled": false,                      <---- Set to disable
"Status": {
"State": "Disabled"
},
"Subscriptions": {
"@odata.id": "/redfish/v1/EventService/Subscriptions"
}
  1. Try to subscribe to events using RedfishEventListener_v1.py script after disabling the event service. (Here we will see that client is able to subscribe when EventService is in disabled state)
}-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/338222230"
}
],
"Members@odata.count": 1,
"Name": "Event Destination Collections"

BMC FW: 2.9.0-dev-826-g3c0e2b427

@apuli1 @feistjj @ratagupt

gtmills commented 3 years ago

Clarifying language is coming from Redfish around this. I am not sure this is a bug though. Redfish had a plumbing analogy, if I turn off the water, still want to be able to fix the pipes.

edtanous commented 2 years ago

I believe this was clarified with Redfish, and the current behavior is correct. Please reopen if this is still an issue.