[Nexthop] FBOSS Distro init service and default configs#888
Open
marif-nexthop wants to merge 8 commits intofacebook:mainfrom
Open
[Nexthop] FBOSS Distro init service and default configs#888marif-nexthop wants to merge 8 commits intofacebook:mainfrom
marif-nexthop wants to merge 8 commits intofacebook:mainfrom
Conversation
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. --> **Pre-submission checklist** - [X] 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` - [X] `pre-commit run` <!-- Explain the motivation for making this change and any other context that you think would help reviewers of your code. What existing problem does the pull request solve? --> package_manager, by default, detects the platform it is running on then uses a compiled-in config file to install the platform BSP RPM using dnf. This requires that we have an RPM repo with those RPMs. In Distro Image we cannot presume an infrastructure RPM server with the correct BSP and dependent RPMs. Instead, create a device-local one for that purpose. The repo metadata is created at boot instead of just install time to help the development workflows where a new RPM is uploaded to the device, then the device is restarted for testing. <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? --> <!-- If a relevant Github issue exists for this PR, please make sure you link that issue to this PR --> Build and load the image on a dut. Manually copy the BSP RPM into /usr/local/share/local_rpm_repo, run createrepo /usr/local/share/local_rpm_repo, then dnf search for that RPM: ``` dnf search nexthop Repository local_rpm_repo is listed more than once in the configuration Last metadata expiration check: 0:00:15 ago on Sat 17 Jan 2026 12:44:46 AM UTC. ======================= Name & Summary Matched: nexthop ======================== nexthop_bsp_kmods-6.11.1-1.fboss.el9.x86_64-1.el9-1.0.0.x86_64 : Nexthop BSP Kernel Modules ```
At boot, start a oneshot systemd service that launches a fboss_init.sh script to perform FBOSS distro initialization and setup e.g. copying right config files to /etc/coop etc.
- Added systemd service launches the script fboss_init.sh
- The init script does the following steps for now
- Copy /etc/coop configuration files based on the dmidecode output
- Generate fruid.json file
- Added option to add default configs (qsfp_service and wedge_agent) for different platforms
- Added default configs for montblanc platform as an example
cbe8419 to
0c27eef
Compare
2 tasks
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
At boot, start a oneshot
systemdservice that launches afboss_init.shscript to perform FBOSS distro initialization and setup e.g. copying right config files to/etc/coopetc.systemdservice launches the scriptfboss_init.sh/etc/coopconfiguration files based on thedmidecodeoutputfruid.jsonfileqsfp_serviceandwedge_agent) for different platformsmontblancplatform as an exampleTest Plan
fboss_init systemd service
when system config files exist (skipped)