Skip to content

[Nexthop] Enable "led_service" in FBOSS distro image - #1432

Open
marif-nexthop wants to merge 1 commit into
facebook:mainfrom
nexthop-ai:marif.fboss-distro-led-service
Open

[Nexthop] Enable "led_service" in FBOSS distro image#1432
marif-nexthop wants to merge 1 commit into
facebook:mainfrom
nexthop-ai:marif.fboss-distro-led-service

Conversation

@marif-nexthop

Copy link
Copy Markdown
Contributor

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run

Summary

led_service was missing from the FBOSS OSS distro image.

In this PR:
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() andqsfp_service().state().tcvrStates() matching what each callback deserializes which finally fixed the error and led_service could run successfully.

Test Plan

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

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
```
@marif-nexthop
marif-nexthop requested review from a team as code owners July 28, 2026 22:39
@meta-cla meta-cla Bot added the CLA Signed label Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant