Event subscription mechanism for sonic-redfish#4
Open
chinmoy-nexthop wants to merge 2 commits into
Open
Conversation
|
/azp run |
|
No pipelines are associated with this pull request. |
2175198 to
a0d69a6
Compare
|
/azp run |
|
No pipelines are associated with this pull request. |
|
/azp run |
|
No pipelines are associated with this pull request. |
What:
- Integrate rmc-events-based leak detection into bmcweb via a new integration patch.
- Add LeakDetection and LeakDetectors Redfish endpoints and wire them into the existing ThermalSubsystem and Redfish router.
- Extend sonic-dbus-bridge so leak sensors in STATE_DB are surfaced on D-Bus and drive Redfish events.
- Update the build system to copy rmc-events sources into bmcweb and fix Meson wraps for stdexec and sdbusplus.
Why:
- Expose SONiC BMC leak sensors via standard Redfish resources so clients can monitor chassis leak status.
- Emit Environmental.* Redfish events when leak detector states change (Critical/Warning/Normal) for better observability and alerting.
- Ensure the leak detection path (STATE_DB -> D-Bus -> Redfish) is robust and buildable in the SONiC/sonic-redfish pipeline.
How:
- sonic-dbus-bridge:
- Add LeakSensorInfo and a leakSensors vector to InventoryModel.
- Extend RedisAdapter to read LEAK_SENSOR|* keys from STATE_DB and provide getLeakSensors/getLeakSensor helpers.
- Create leak sensor D-Bus objects under /xyz/openbmc_project/sensors/leak with:
- xyz.openbmc_project.Inventory.Item.LeakDetector (DetectorState, Type),
- xyz.openbmc_project.State.Decorator.OperationalStatus (Functional),
- xyz.openbmc_project.Inventory.Item (Present, PrettyName).
- Track leak sensor state changes in UpdateEngine and call DBusExporter::updateLeakSensorState, which updates DetectorState and Functional and emits PropertiesChanged signals.
- rmc-events:
- Add leak_detection.hpp implementing:
- /redfish/v1/Chassis/{id}/ThermalSubsystem/LeakDetection,
- /LeakDetectors (collection),
- /LeakDetectors/{detectorId} (per-sensor).
- Add leak_detector_monitor.{hpp,cpp} to watch D-Bus leak detector PropertiesChanged signals and map DetectorState into Environmental.* MessageIds, then call EventServiceManager::sendEvent.
- bmcweb integration:
- Update meson.build to include redfish-core/src/leak_detector_monitor.cpp in srcfiles_bmcweb.
- Include leak_detection.hpp, set up LeakDetection navigation links from ThermalSubsystem, and register LeakDetection/LeakDetector routes in redfish.cpp.
- Fix Meson wrap configuration for stdexec/sdbusplus
- Build system:
- Extend the top-level Makefile to:
- Copy rmc-events/lib, include, and src files into the bmcweb tree before applying patches.
- Ensure stdexec.wrap is copied into sdbusplus/subprojects (fix-sdbusplus-stdexec) before native bmcweb builds.
Signed-off-by: Chinmoy Dey <chinmoy@nexthop.ai>
a2d0023 to
fe3b12e
Compare
|
/azp run |
|
No pipelines are associated with this pull request. |
What: - Fix bmcweb Debian packaging so dpkg-buildpackage can find debian/changelog and complete successfully. - Move bmcweb source tarball (.tar.gz) to target/ directory alongside other build artifacts. - Remove redundant stdexec.wrap from sonic-dbus-bridge subprojects. - Update build instructions and patch format for bmcweb integration. Why: - The bmcweb build was failing because debian/ directory and its required files (changelog, control, rules, etc.) were missing from the bmcweb tree. - The .tar.gz source tarball was being left in the repo root, cluttering the workspace instead of being organized with other build outputs. - sonic-dbus-bridge doesn't need its own stdexec.wrap since the dependency is handled via sdbusplus. - Ensure the build is reproducible and all artifacts are properly collected. How: - bmcweb/debian/: - Add debian/changelog with version 1.0.0 for SONiC integration. - Add debian/control defining bmcweb and bmcweb-dbg packages with proper dependencies. - Add debian/install listing files to package (bmcweb binary, systemd units, www content). - Add debian/not-installed excluding unwanted artifacts (boost static libs, zstd tools, etc.). - Add debian/rules with proper Makefile syntax (tab-indented recipes) and wrap-mode=default. - Makefile: - Add @mv $(REPO_ROOT)/bmcweb_*.tar.gz $(TARGET_DIR)/ to build-bmcweb-native target so source tarballs are collected alongside .deb files. - patches/0004-Integrate-rmc-events-leak-detection-into-bmcweb.patch: - Fix corrupt patch format (line count mismatches in unified diff headers). - sonic-dbus-bridge/subprojects/stdexec.wrap: - Remove this file; stdexec dependency is managed via sdbusplus, not as a standalone subproject. - build/Dockerfile.build and README.md: - Update documentation and build environment setup to reflect current build process. Signed-off-by: Chinmoy Dey <chinmoy@nexthop.ai>
fe3b12e to
6f892ac
Compare
|
/azp run |
|
No pipelines are associated with this pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add leak detection Redfish events for SONiC BMC
What:
Why:
How: