Skip to content

Redfish non-compliance: Telemetry: MetricProperties accept full Sensor resources instead of arbitrary Redfish properties #305

@FHomps

Description

@FHomps

Is this the right place to submit this?

  • This is not a security vulnerability or a crashing bug
  • This is not a question about how to use OpenBMC
  • This is not a bug in an OpenBMC fork or a bug in code still under code review.
  • This is not a request for a new feature.

Bug Description

Hi,

The current telemetry implementation is not compliant with the redfish standard.

When creating a MetricReportDefinition, BMCWeb expects any MetricProperty to link to a Sensor resource. When POSTed to the TelemetryService, the following json works:

{
  "Id": "SampleMetric",
  "Metrics": [
    {
      "MetricProperties": [
        "/redfish/v1/Chassis/power_board/Sensors/power_C3PB7_HSW_PIN"
      ]
    }
  ],
  "MetricReportDefinitionType": "Periodic",
  "ReportActions": [
    "RedfishEvent",
    "LogToMetricReportsCollection"
  ],
  "Schedule": {
    "RecurrenceInterval": "PT5S"
  }
}

DSP0268 explains that a MetricProperty must point to a resource property (e.g. the Reading property of a Sensor):

Image

Image

This allows for Metric Reports to be defined for any property, not only the Reading of Sensors. E.g., the example of MetricReportDefinition in DSP0268 points to the PowerConsumedWatts property of the Thermal schema:

Image

A properly Redfish-compliant MetricReportDefinition request on the previous sensor should thus be:

{
  "Id": "SampleMetric",
  "Metrics": [
    {
      "MetricProperties": [
        "/redfish/v1/Chassis/power_board/Sensors/power_C3PB7_HSW_PIN/Reading"
      ]
    }
  ],
  "MetricReportDefinitionType": "Periodic",
  "ReportActions": [
    "RedfishEvent",
    "LogToMetricReportsCollection"
  ],
  "Schedule": {
    "RecurrenceInterval": "PT5S"
  }
}

Which fails against bmcweb on OpenBMC 2.14 with the following reply:

{
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The property '/redfish/v1/Chassis/power_board/Sensors/power_C3PB7_HSW_PIN/Reading' with the requested value of 'MetricProperties/0' could not be written because the value does not meet the constraints of the implementation.",
        "MessageArgs": [
          "/redfish/v1/Chassis/power_board/Sensors/power_C3PB7_HSW_PIN/Reading",
          "MetricProperties/0"
        ],
        "MessageId": "Base.1.16.0.PropertyValueIncorrect",
        "MessageSeverity": "Warning",
        "Resolution": "No resolution is required."
      }
    ],
    "code": "Base.1.16.0.PropertyValueIncorrect",
    "message": "The property '/redfish/v1/Chassis/power_board/Sensors/power_C3PB7_HSW_PIN/Reading' with the requested value of 'MetricProperties/0' could not be written because the value does not meet the constraints of the implementation."
  }

Version

Internal Eviden fork of OpenBMC based on OpenBMC 2.14.
Offending code is from upstream:
https://github.com/openbmc/bmcweb/blob/4d7b5ddb3a2b6cc42b7bbc0c710f297e6df4fd55/redfish-core/lib/metric_report_definition.hpp#L666

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions