[Nexthop] Enable "led_service" in FBOSS distro image - #1432
Open
marif-nexthop wants to merge 1 commit into
Open
Conversation
Build the `led_service` binary as part of the FBOSS platform stack and
set up the runtime config/settings so it starts on boot:
- Add `led_service` to the `fboss_platform_services` CMake target so it
ships in `platform-stack.tar`.
- Add a `systemd` unit (`led_service.service`) ordered after
`platform_manager` and `fboss_init`.
- Enable the unit in the FBOSS distro image (`config.sh`).
- Add a minimal `led.conf` at `default_configs/` and symlink it from
other platforms (`minipack3`, `wedge800bact`, `wedge800cact` and `wedge800bnhp` etc.).
- Have `fboss_init.sh` copy `/etc/coop/led.conf` from the platform's
`default_configs` at boot.
- FSDB subscription paths - OSS stubs in `FsdbSwitchStateSubscriber.cpp`
returned empty path vectors for both switch-state and transceiver-state,
so the second `addStatePathSubscription({})` collided with the first on
the root path `::1:/Path:/state:/` and threw `already exists` error.
Filled the stubs in with the real paths, `agent().switchState()`
and`qsfp_service().state().tcvrStates()` matching what each callback
deserializes which finally fixed the error and `led_service` could run
successfully.
Verified `led_service` is healthy on a device after loading
an image built from this branch.
```
root 1529 0.0 0.1 7082576 54460 ? Ssl 18:16 0:01 /opt/fboss/bin/led_service
```
```
● led_service.service - FBOSS LED Service
Loaded: loaded (/usr/lib/systemd/system/led_service.service; enabled; preset: disabled)
Active: active (running) since Thu 2026-05-28 18:16:33 UTC; 1h 15min ago
```
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.
Pre-submission checklist
pip install -r requirements-dev.txt && pre-commit installpre-commit runSummary
led_servicewas missing from the FBOSS OSS distro image.In this PR:
Build the
led_servicebinary as part of the FBOSS platform stack and set up the runtime config/settings so it starts on boot:Add
led_serviceto thefboss_platform_servicesCMake target so it ships inplatform-stack.tar.Add a
systemdunit (led_service.service) ordered afterplatform_managerandfboss_init.Enable the unit in the FBOSS distro image (
config.sh).Add a minimal
led.confatdefault_configs/and symlink it from other platforms (minipack3,wedge800bact,wedge800cactandwedge800bnhpetc.).Have
fboss_init.shcopy/etc/coop/led.conffrom the platform'sdefault_configsat boot.FSDB subscription paths - OSS stubs in
FsdbSwitchStateSubscriber.cppreturned empty path vectors for both switch-state and transceiver-state, so the secondaddStatePathSubscription({})collided with the first on the root path::1:/Path:/state:/and threwalready existserror. Filled the stubs in with the real paths,agent().switchState()andqsfp_service().state().tcvrStates()matching what each callback deserializes which finally fixed the error andled_servicecould run successfully.Test Plan
Verified
led_serviceis healthy on a device after loading an image built from this branch.