Skip to content

[sonic-redfish] Sonic Redfish support with OpenBMC D-Bus#1

Merged
yxieca merged 1 commit into
sonic-net:masterfrom
nexthop-ai:review/bmcweb-with-dbus-bridge
Apr 9, 2026
Merged

[sonic-redfish] Sonic Redfish support with OpenBMC D-Bus#1
yxieca merged 1 commit into
sonic-net:masterfrom
nexthop-ai:review/bmcweb-with-dbus-bridge

Conversation

@chinmoy-nexthop
Copy link
Copy Markdown
Contributor

@chinmoy-nexthop chinmoy-nexthop commented Mar 3, 2026

Guideline for Reviewer :

bmcweb - Upstream code (mostly untouched )

  • No need to review

Build

  • integration patches/*
  • Makefile - Docker orchestration, build automation
  • build/Dockerfile.build - Debian Trixie build environment
  • README.md - SONiC-specific documentation

sonic-dbus-bridge - Bridge SONiC Redis to D-Bus for bmcweb integration

  • Bridge between SONiC's Redis database and OpenBMC's D-Bus
  • Export SONiC platform data as D-Bus objects
  • Sync SONiC state (users, inventory, FRU) to D-Bus
  • Enable bmcweb to access SONiC data via D-Bus
  • Pub/Sub for real-time updates,. etc.
sonic-dbus-bridge/
├── config/
 │   └── config.yaml                   - Redis/D-Bus configuration
├── dbus/                                 - D-Bus security policies
├── debian/                              - Debian packaging
├── include/                             - All header files
├── src/                                    - All implementation files
├── subprojects/                     - Meson dependencies

About the Changes

OpenBMC Standard Compliance:

bmcweb (industry-standard Redfish server) is hardcoded to expect xyz.openbmc_project.* D-Bus interfaces. sonic-dbus-bridge implements these exact interfaces, while existing SONiC services use incompatible org.SONiC.* interfaces.

Mimicking OpenBMC:

sonic-dbus-bridge mimics OpenBMC D-Bus interfaces (xyz.openbmc_project.*) to expose SONiC platform data as standard Redfish APIs, creating the illusion that all phosphor-* services exist in SONiC without actually porting them.

Data Model Mismatch:

Existing SONiC host-service is action-oriented (RPC methods for internal container-to-host control), but Redfish requires a property-based, inventory data model. sonic-dbus-bridge provides the data-oriented interface that external management tools expect.

Keep bmcweb Pristine:

Establishes D-Bus as the singular standardized integration layer, ensuring bmcweb remains nearly unmodified and upstream-compatible no forking of the Redfish project.

Hardware Data Aggregation:

Translates SONiC's distributed hardware data (Redis CONFIG_DB/STATE_DB, FRU EEPROMs, platform.json) into unified OpenBMC compatible D-Bus objects that bmcweb can discover and consume.

Bidirectional Communication:

Enables both read (inventory queries) and write (host power control, reboot) operations via Redfish GET/PATCH/POST, bridging external management tools to SONiC's internal state.

Graceful Degradation:

Designed to tolerate missing data sources (Redis down, FRU unreadable) with safe fallbacks, ensuring Redfish endpoints remain available even in degraded mode critical for production BMC reliability.

sonic-dbus-bridge component:

  • Implements D-Bus to Redis state synchronization for SONiC integration
  • Provides D-Bus interfaces for Redfish API consumption by bmcweb
  • Supports inventory management via FRU and platform JSON adapters
  • Implements user management with PAM integration
  • Implements software update management for BMC firmware
  • Uses Redis pub/sub for state change notifications
  • Built with C++23, Meson build system, and sdbusplus library

Build system features:

  • Docker-only compilation for build consistency across environments
  • Meson-based builds for both bmcweb and sonic-dbus-bridge
  • C++23 support with proper dependency resolution via wrap files
  • Parallel build support via SONIC_CONFIG_MAKE_JOBS variable
  • Clean separation of build artifacts and source code
  • Makefile.build as central build orchestration with Docker-only builds
  • Docker build environment (debian:trixie) with all required dependencies
  • patch management system with series file for bmcweb integration
  • submodule setup scripts for bmcweb and sdbusplus dependencies
  • Docker container configuration for runtime deployment
  • README.md with build instructions and system architecture

@mssonicbld
Copy link
Copy Markdown

/azp run

@chinmoy-nexthop chinmoy-nexthop marked this pull request as draft March 3, 2026 05:44
@azure-pipelines
Copy link
Copy Markdown

Commenter does not have sufficient privileges for PR 1 in repo sonic-net/sonic-redfish

Copy link
Copy Markdown

@nate-nexthop nate-nexthop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Comment thread scripts/setup-submodules.sh Outdated
Comment thread build/Makefile Outdated
@chinmoy-nexthop chinmoy-nexthop changed the title [sonic-redfish] Add Docker-based build system and sonic-dbus-bridge c… [sonic-redfish] Sonic Redfish support with OpenBMC and sonic-dbus-bridge Mar 3, 2026
@chinmoy-nexthop chinmoy-nexthop force-pushed the review/bmcweb-with-dbus-bridge branch from 4e94c81 to 0dce995 Compare March 9, 2026 16:00
@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

Commenter does not have sufficient privileges for PR 1 in repo sonic-net/sonic-redfish

@chinmoy-nexthop chinmoy-nexthop marked this pull request as ready for review March 9, 2026 16:05
@chinmoy-nexthop chinmoy-nexthop force-pushed the review/bmcweb-with-dbus-bridge branch from 0dce995 to 842c43f Compare March 9, 2026 16:07
@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

Commenter does not have sufficient privileges for PR 1 in repo sonic-net/sonic-redfish

@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

Commenter does not have sufficient privileges for PR 1 in repo sonic-net/sonic-redfish

@chinmoy-nexthop chinmoy-nexthop changed the title [sonic-redfish] Sonic Redfish support with OpenBMC and sonic-dbus-bridge [sonic-redfish] Sonic Redfish support with OpenBMC D-Bus Mar 9, 2026
@chinmoy-nexthop chinmoy-nexthop force-pushed the review/bmcweb-with-dbus-bridge branch from 76f6aea to c9517fe Compare March 9, 2026 17:06
@mssonicbld
Copy link
Copy Markdown

/azp run

1 similar comment
@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

Commenter does not have sufficient privileges for PR 1 in repo sonic-net/sonic-redfish

1 similar comment
@azure-pipelines
Copy link
Copy Markdown

Commenter does not have sufficient privileges for PR 1 in repo sonic-net/sonic-redfish

@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

@shreyansh-nexthop shreyansh-nexthop force-pushed the review/bmcweb-with-dbus-bridge branch from 5261c49 to cd66795 Compare March 11, 2026 07:08
@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

@chinmoy-nexthop chinmoy-nexthop force-pushed the review/bmcweb-with-dbus-bridge branch from b308a60 to ebf76be Compare March 18, 2026 07:13
@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

@judyjoseph judyjoseph requested a review from yxieca April 1, 2026 01:19
@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

@judyjoseph
Copy link
Copy Markdown
Contributor

judyjoseph commented Apr 3, 2026

LGTM.. Can you add details in description as to which files/components are added newly and which are part of original openbmc/bmcweb - Will concentrate on that part to review, it is quite a big code to review :-)

Additional question do we have the code to handle the Oem URIs here .. ? especially templatizing the alert/tememetry data that can come in any formats or that is coming as subsequent PR

@chinmoy-nexthop
Copy link
Copy Markdown
Contributor Author

LGTM.. Can you add details in description as to which files/components are added newly and which are part of original openbmc/bmcweb - Will concentrate on that part to review, it is quite a big code to review :-)

Additional question do we have the code to handle the Oem URIs here .. ? especially templatizing the alert/tememetry data that can come in any formats or that is coming as subsequent PR

thank you @judyjoseph for looking into this.

bmcweb - Upstream code (mostly untouched )

  • No need to review

Build

  • integration patches/*
  • Makefile - Docker orchestration, build automation
  • build/Dockerfile.build - Debian Trixie build environment
  • README.md - SONiC-specific documentation

sonic-dbus-bridge - Bridge SONiC Redis to D-Bus for bmcweb integration

  • Bridge between SONiC's Redis database and OpenBMC's D-Bus
  • Export SONiC platform data as D-Bus objects
  • Sync SONiC state (users, inventory, FRU) to D-Bus
  • Enable bmcweb to access SONiC data via D-Bus
  • Pub/Sub for real-time updates,. etc.
sonic-dbus-bridge/
├── config/
 │   └── config.yaml                   - Redis/D-Bus configuration
├── dbus/                                 - D-Bus security policies
├── debian/                              - Debian packaging
├── include/                             - All header files
├── src/                                    - All implementation files
├── subprojects/                     - Meson dependencies

Oem URIs here:

  • We have a different PR for this
  • URI can only be added once we enable the framework to add SONiC OEM extension to bmcweb and schema mapping for the fields
  • This PR Implements OEM extention on top of Current PR

@judyjoseph
Copy link
Copy Markdown
Contributor

@chinmoy-nexthop if we do a squash commit all the changes will be merged into a single commit Is that ok ?

Or do you want to segregate your 24 commits into something same 5 meaningful commits based on functionality -- in that case we will just commit as such instead of doing a squash single commit.

Comment thread sonic-dbus-bridge/include/logger.hpp Outdated
…omponent

- Add Makefile.build as central build orchestration with Docker-only builds
- Add Docker build environment (debian:trixie) with all required dependencies
- Add patch management system with series file for bmcweb integration
- Add submodule setup scripts for bmcweb and sdbusplus dependencies
- Add Docker container configuration for runtime deployment
- Update README.md with build instructions and system architecture

sonic-dbus-bridge component:
- Implements D-Bus to Redis state synchronization for SONiC integration
- Provides D-Bus interfaces for Redfish API consumption by bmcweb
- Supports inventory management via FRU and platform JSON adapters
- Implements user management with PAM integration
- Implements software update management for BMC firmware
- Uses Redis pub/sub for state change notifications
- Built with C++23, Meson build system, and sdbusplus library

Build system features:
- Docker-only compilation for build consistency across environments
- Meson-based builds for both bmcweb and sonic-dbus-bridge
- C++23 support with proper dependency resolution via wrap files
- Parallel build support via SONIC_CONFIG_MAKE_JOBS variable
- Clean separation of build artifacts and source code

Signed-off-by: Chinmoy Dey <chinmoy@nexthop.ai>
Co-authored-by: Shreyansh Jain <shreyansh@nexthop.ai>
@chinmoy-nexthop chinmoy-nexthop force-pushed the review/bmcweb-with-dbus-bridge branch from c9d9933 to 1d09fa9 Compare April 8, 2026 11:48
@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

@chinmoy-nexthop
Copy link
Copy Markdown
Contributor Author

@chinmoy-nexthop if we do a squash commit all the changes will be merged into a single commit Is that ok ?

Or do you want to segregate your 24 commits into something same 5 meaningful commits based on functionality -- in that case we will just commit as such instead of doing a squash single commit.

Done @judyjoseph . thanks

Copy link
Copy Markdown
Contributor

@judyjoseph judyjoseph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM to start as base

Copy link
Copy Markdown
Contributor

@yxieca yxieca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review notes (non-blocking, OK to proceed as initial drop):

  • Config file is ignored: ConfigManager::load() does not parse YAML and always uses defaults, so config.yaml is unused. Consider implementing YAML parsing (yaml-cpp) or mark config as placeholder in README.
  • config.yaml indentation is invalid: platform/dbus/update/logging/features/persistence blocks are indented under redis, and fru_eeprom_paths list items are mis-indented. A YAML parser will fail or parse incorrectly. Please fix structure.
  • D-Bus policy too permissive for sensitive services: User.Manager and State.Host allow all users to send methods. Consider restricting to root/bmcweb or tighter policy group.

Happy to proceed with merge now and track these as follow-ups.

@chinmoy-nexthop
Copy link
Copy Markdown
Contributor Author

  • Config file is ignored: ConfigManager::load() does not parse YAML and always uses defaults, so config.yaml is unused. Consider implementing YAML parsing (yaml-cpp) or mark config as placeholder in README.
  • config.yaml indentation is invalid: platform/dbus/update/logging/features/persistence blocks are indented under redis, and fru_eeprom_paths list items are mis-indented. A YAML parser will fail or parse incorrectly. Please fix structure.
  • D-Bus policy too permissive for sensitive services: User.Manager and State.Host allow all users to send methods. Consider restricting to root/bmcweb or tighter policy group.

Thank you @yxieca for review . I will take care your feedback in a follow up PR with proper Config manager enhancements for sonic-redfish.

@judyjoseph judyjoseph requested a review from yxieca April 9, 2026 15:18
@yxieca yxieca merged commit 573a26d into sonic-net:master Apr 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants