[Nexthop] Add fboss-sim: a minimal fake-SAI FBOSS runtime container#1278
Open
hillol-nexthop wants to merge 4 commits into
Open
[Nexthop] Add fboss-sim: a minimal fake-SAI FBOSS runtime container#1278hillol-nexthop wants to merge 4 commits into
hillol-nexthop wants to merge 4 commits into
Conversation
fboss-sim packages the fake-SAI FBOSS agents and the fboss2 CLI into a small (~1.2 GB) CentOS Stream 9 Docker image, so FBOSS can be run and exercised end-to-end without any switching hardware. - docker/Dockerfile.runtime builds the runtime image from the CentOS Stream 9 base plus the existing FBOSS centos-09.0 rootfs overlay (systemd agent units, login env hook, eth0 IPv6 sysctl) and the collected binaries + shared libraries. - scripts/fboss-sim-docker-package.py collects the fake-SAI binaries and their ldd-resolved libraries and builds the image. It has two phases: --collect-only (run where ldd resolves the image-base libraries, i.e. inside the CentOS build image) and --build-only (run on the host that owns the Docker daemon); a flagless run does both. - scripts/fboss-sim-docker-run.py creates an IPv6 network and starts the runtime container in split or monolithic agent mode. A new GitHub Actions workflow (.github/workflows/fboss-sim.yml) builds the fake-SAI agent + fboss2 targets via docker-build.py, packages and starts the runtime image, and runs fboss2_integration_test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The BUILD_SAI_FAKE arm now builds the agents with the -sai_impl suffix (and is made mutually exclusive with the real-SAI SAI_IMPL path via elseif), and fboss_fake_agent_targets depends on wedge_agent-sai_impl / fboss_hw_agent-sai_impl. This lands fake-SAI builds at the /opt/fboss/bin paths the systemd units and package.py already reference, so the fboss-sim runtime no longer needs the -fake -> -sai_impl symlinks. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…/profile 39 Add sudo to the runtime Dockerfile's dnf install list, and bump all four mono.conf ports from 400G/profileID 38 to 800G/profileID 39. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
there is a list of tests failing which need to be looked at separately but this is the fboss-sim infra and GHA. |
2 tasks
resolve_dependencies() set LD_LIBRARY_PATH to a `find installed/` union of every lib dir under the getdeps installed/ tree before running ldd. LD_LIBRARY_PATH outranks the binary's RUNPATH and ldd takes the first dir on the path with a matching soname, so a stale dependency generation left in installed/ by a previous build could shadow the correct one and produce a package with ABI-mismatched libs (undefined symbol at load). Each binary's RUNPATH already points at the exact install dir it was linked against, so resolve via RUNPATH instead: strip any inherited LD_LIBRARY_PATH and let ldd use RUNPATH + default system paths (system libs resolve from /usr/lib64). Remove the now-unused get_lib_search_paths() helper. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Adds
fboss-sim, a minimal fake-SAI FBOSS runtime container. It packages the fake-SAI FBOSS agents and thefboss2CLI into a small (~1.2 GB) CentOS Stream 9 Docker image, so FBOSS can be run and exercised end-to-end without any switching hardware.What's included
fboss-sim/docker/Dockerfile.runtime— builds the runtime image from the CentOS Stream 9 base plus the existing FBOSScentos-09.0rootfs overlay (fboss-image/image_builder/templates/centos-09.0/root_files/: systemd agent units, login env hook, eth0 IPv6 sysctl) and the collected binaries + shared libraries.fboss-sim/scripts/fboss-sim-docker-package.py— collects the fake-SAI binaries and theirldd-resolved shared libraries and builds the image. Two phases:--collect-only: resolve binaries + libs intotmp_build_dir/. Must run wherelddresolves the image-base libraries (CentOS Stream 9), e.g. inside the CentOS build image.--build-only:docker buildthe image fromtmp_build_dir/on the host that owns the Docker daemon.fboss-sim/scripts/fboss-sim-docker-run.py— creates an IPv6 network and starts the runtime container in split or monolithic agent mode..github/workflows/fboss-sim.yml— a GitHub Actions job that builds the fake-SAI agent +fboss2targets viadocker-build.py, packages and starts the runtime image (collect inside the CentOSfboss_image, build on the host), and runsfboss2_integration_test. Mirrors the existingagent.yml/fboss2-cli.ymlpattern.Build naming
The
BUILD_SAI_FAKECMake arm now names the fake-SAI agentswedge_agent-sai_impl/fboss_hw_agent-sai_impl(instead of-fake), so they land at the/opt/fboss/binpaths the systemd units andpackage.pyalready reference — the runtime no longer needs-fake→-sai_implsymlinks.Testing
Validated locally with a fake-SAI build:
--collect-onlyinside the build container →--build-onlyon the host → image built from thecentos-09.0template rootfs.fboss_sw_agentandfboss_hw_agent@0go active;fboss2 show interfaceserves fake Montblanc ports.fboss2_integration_test: 38 tests / 18 suites, all passed.