Redfish Validator: Deprecated Properties Error With New Schema
Introduction
The Redfish standard, managed by the Distributed Management Task Force (DMTF), provides a widely adopted interface for managing modern data center infrastructure. Validating Redfish implementations is crucial to ensure interoperability and compliance. The Redfish Interoperability Validator is a tool used to verify that a Redfish service adheres to the specification correctly. This article addresses a specific issue encountered during Redfish validation: the validator flagging deprecated properties even when the schema implements the newer, recommended properties.
Understanding the Issue
When implementing the Redfish standard, developers sometimes encounter validation errors related to deprecated properties. Deprecated properties are older features that have been replaced by newer, more efficient, or standardized methods. The Redfish specification evolves, and as it does, some properties are marked as deprecated, with recommendations to use their replacements. A common scenario arises when a schema correctly implements the newer, recommended properties, yet the validator still flags errors related to the deprecated ones. This can lead to confusion and unnecessary troubleshooting efforts.
The specific issue reported involves the Redfish validator flagging errors for deprecated properties, specifically Thermal and Power, even though the schema already implements their recommended replacements, ThermalSubsystem and PowerSubsystem. This problem occurs within a particular hardware management context, utilizing the OCPBaselineHardwareManagement.v1_1_0.json schema from the Open Compute Project (OCP).
Background on Redfish and Property Deprecation
The Essence of Redfish
Redfish is a modern, open standard designed for the management of server hardware and data center infrastructure. It provides a RESTful interface that simplifies tasks such as server monitoring, control, and automation. By adopting a standardized approach, Redfish enhances interoperability across different hardware vendors and management tools.
Property Deprecation in Redfish
As the Redfish standard evolves, certain properties and features may become outdated or less efficient. To ensure forward compatibility and encourage the adoption of improved methods, the DMTF marks these older elements as deprecated. This process involves recommending newer properties or approaches while still allowing the deprecated properties to function for a transitional period. The goal is to gradually phase out the older methods in favor of the new ones, ensuring a smoother upgrade path for implementers.
Key Properties in Question: Thermal and Power vs. ThermalSubsystem and PowerSubsystem
In the context of chassis management, the older Thermal and Power properties have been superseded by ThermalSubsystem and PowerSubsystem. The newer properties offer a more structured and comprehensive way to manage thermal and power aspects of a system. They allow for detailed monitoring and control, providing more granular information than their predecessors. When a Redfish implementation adopts ThermalSubsystem and PowerSubsystem, it signifies an alignment with the latest best practices in the standard.
The Specific Scenario: OCP and Chassis Types
OCPBaselineHardwareManagement.v1_1_0.json
The OCPBaselineHardwareManagement.v1_1_0.json schema defines a set of guidelines for hardware management within Open Compute Project (OCP) environments. This schema specifies how different hardware components should be represented and managed via the Redfish interface. It includes definitions for chassis, thermal subsystems, power subsystems, and other critical elements.
Implementation Context: Chassis and Subsystems
In the reported scenario, the implementation places PowerSubsystem and ThermalSubsystem under the /redfish/v1/Chassis/StorageBackplane endpoint. This placement aligns with the Redfish specification’s guidance on organizing resources within a management interface. The chassis type in this implementation is not a typical Drawer, RackMount, or Sled, which are common chassis types where the older Power and Thermal resources might be expected. Instead, it is a different chassis type where the expectation is to use the newer subsystem properties.
The Core of the Issue: Validator Behavior
The central issue is that the Redfish validator checks for the deprecated properties (Thermal, Power) even when the schema correctly implements the newer, recommended properties (ThermalSubsystem, PowerSubsystem). This behavior leads to false positives, as the implementation is adhering to the latest standards by using the subsystem properties. The validator’s insistence on the deprecated properties creates an unnecessary validation hurdle.
Analyzing the Redfish Validator's Behavior
Understanding the Validator's Logic
The Redfish validator is designed to ensure compliance with the Redfish specification. It performs a series of checks to verify that a Redfish service correctly implements the required properties and behaviors. These checks include verifying property existence, data types, and relationships between resources. The validator’s logic often includes checks for deprecated properties to ensure a smooth transition during version upgrades.
Potential Causes for the Issue
Several factors might contribute to the validator flagging deprecated properties:
- Validator Configuration: The validator might be configured with a strict set of rules that prioritize backward compatibility. This configuration could lead it to check for deprecated properties even when newer properties are present.
- Schema Interpretation: The validator's interpretation of the schema might not fully account for the context in which the new properties are implemented. It may not recognize that the presence of
ThermalSubsystemandPowerSubsystemnegates the need forThermalandPower. - Version Mismatch: There might be a mismatch between the schema version being validated and the validator's understanding of property deprecation rules. An older validator version might not correctly interpret the deprecation guidelines in a newer schema.
- Chassis Type Handling: The validator might not adequately handle different chassis types. It might assume that all chassis types should implement the older properties, even when the specification allows for newer properties to replace them in certain contexts.
The Importance of Context
Context is crucial in determining whether a deprecated property should be flagged as an error. In the scenario described, the context includes the chassis type and the implementation of the newer subsystem properties. When an implementation uses ThermalSubsystem and PowerSubsystem in a chassis type where the older properties are not expected, the validator should ideally recognize this and not flag an error.
Steps to Resolve the Validation Issue
1. Review Validator Configuration
The first step is to review the validator’s configuration settings. Check if there are options to adjust the strictness of the validation rules or to specify which properties are required based on the schema version. Modifying these settings might resolve the issue by allowing the validator to recognize that the newer properties satisfy the requirements.
2. Update the Validator Version
Ensure that you are using the latest version of the Redfish validator. Newer versions often include bug fixes and improvements that address issues related to property deprecation and schema interpretation. Upgrading the validator can resolve compatibility issues and ensure accurate validation results.
3. Verify Schema Compliance
Double-check the schema to ensure that it correctly implements the ThermalSubsystem and PowerSubsystem properties. Verify that the properties are defined according to the Redfish specification and that they include all required attributes. Any discrepancies in the schema definition could lead to validation errors.
4. Provide Context to the Validator
If possible, provide additional context to the validator about the chassis type and the implementation details. Some validators allow for custom configurations or annotations that can guide the validation process. Providing context can help the validator understand that the older properties are not required in this specific scenario.
5. Engage with the DMTF Community
If the issue persists, consider engaging with the DMTF community. The DMTF forums and mailing lists are valuable resources for discussing Redfish implementation challenges and seeking guidance from experts. Reporting the issue to the DMTF can help identify potential bugs in the validator and contribute to its improvement.
Best Practices for Implementing Redfish Properties
1. Prioritize Newer Properties
When implementing Redfish, prioritize the use of newer properties and features. The Redfish specification evolves to improve functionality and standardization. Adopting newer properties ensures that your implementation aligns with the latest best practices and benefits from the improvements.
2. Understand Deprecation Policies
Familiarize yourself with the Redfish deprecation policies. Understanding how properties are deprecated and replaced can help you plan for future updates and avoid compatibility issues. The DMTF provides guidelines on property deprecation, including timelines and recommended replacements.
3. Validate Regularly
Regularly validate your Redfish implementation using the Redfish validator. Early detection of validation errors can prevent issues from escalating and ensure that your implementation remains compliant with the specification. Incorporate validation into your development and deployment processes.
4. Document Implementation Choices
Document your implementation choices, including the use of specific properties and the reasons for those choices. Clear documentation can help others understand your implementation and can facilitate troubleshooting and maintenance. Documenting deviations from the standard can also be valuable for future reference.
5. Stay Informed About Updates
Stay informed about updates to the Redfish specification and the Redfish validator. The DMTF releases updates periodically, and these updates may include new features, bug fixes, and changes to validation rules. Staying informed ensures that you are aware of the latest developments and can adapt your implementation accordingly.
Conclusion
Encountering validation errors for deprecated properties despite implementing newer ones can be a frustrating challenge in Redfish development. Understanding the nuances of property deprecation, the validator’s behavior, and the specific context of your implementation is crucial for resolving such issues. By reviewing validator configurations, updating to the latest versions, verifying schema compliance, and engaging with the Redfish community, developers can overcome these hurdles and ensure their Redfish services meet the highest standards of interoperability and compliance.
For more information on Redfish and the DMTF, visit the DMTF Website. This resource provides comprehensive documentation, specifications, and community support for Redfish implementations.