[ci][broadcom] Build syncd-rpc docker for legacy-th image#26340
[ci][broadcom] Build syncd-rpc docker for legacy-th image#26340StormLiangMS merged 5 commits intosonic-net:masterfrom
Conversation
Add docker-syncd-brcm-legacy-th-rpc docker and build it in the pipeline alongside the existing docker-syncd-brcm-rpc build step. Cherry-picked from internal commit f2ff21395671ea0b75354604e84b3d007be57ab4 Note: .pipelines/template-stages.yml excluded (ADO-internal only) Signed-off-by: Liping Xu <xuliping@microsoft.com> Signed-off-by: xuliping@microsoft.com <xuliping@microsoft.com>
- Move \ inside ifeq (INSTALL_DEBUG_TOOLS) block to align with docker-syncd-brcm-rpc.mk (only needed for debug builds) - Add _AFTER = \ to enforce build ordering and prevent race conditions with the base image - Add docker-syncd-brcm-legacy-th-rpc.dep for cache invalidation support, following the same pattern as docker-syncd-brcm-rpc.dep Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: xuliping@microsoft.com <xuliping@microsoft.com>
Replace bcmcmd/bcmsh with the simpler single-ASIC versions used by docker-syncd-brcm-rpc, and remove bcm_common. The RPC container is used for SAI testing on single-ASIC setups, so the multi-ASIC capable scripts from the non-RPC legacy-th base are unnecessary. This aligns all RPC containers to use consistent, simpler host-side BCM scripts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: xuliping@microsoft.com <xuliping@microsoft.com>
…ncd-brcm-legacy-th-rpc.mk _LOAD_DOCKERS already implies build ordering dependency on the base image, consistent with docker-syncd-brcm-rpc.mk which also uses _LOAD_DOCKERS without any _AFTER directive. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: xuliping@microsoft.com <xuliping@microsoft.com>
Use the rsync_from_builder_stage() Jinja2 macro instead of the inline rsync command to apply builder stage changes. The macro also includes the --omit-dir-times flag which was missing from the raw command. Signed-off-by: xuliping@microsoft.com <xuliping@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Adds a Broadcom legacy-th (Tomahawk) variant of the syncd RPC container image so RPC-based SAI testing can be enabled on legacy-th builds.
Changes:
- Adds new docker image definition
docker-syncd-brcm-legacy-th-rpc(Makefile + Dockerfile template + supporting files). - Adds a new dpkg-cache dependency file for the new docker image.
- Wires the new image into the Broadcom platform build includes.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| platform/broadcom/rules.mk | Includes the new legacy-th RPC syncd docker make rules in the Broadcom platform build. |
| platform/broadcom/docker-syncd-brcm-legacy-th-rpc.mk | Defines the new docker-syncd-brcm-legacy-th-rpc image build/install behavior and runtime options. |
| platform/broadcom/docker-syncd-brcm-legacy-th-rpc/Dockerfile.j2 | Dockerfile template to layer RPC/test dependencies onto the legacy-th syncd base image. |
| platform/broadcom/docker-syncd-brcm-legacy-th-rpc/ptf_nn_agent.conf | Supervisor program config to run ptf_nn_agent for RPC-based testing. |
| platform/broadcom/docker-syncd-brcm-legacy-th-rpc/base_image_files/bcmcmd | Host wrapper to run bcmcmd inside the syncd container. |
| platform/broadcom/docker-syncd-brcm-legacy-th-rpc/base_image_files/bcmsh | Host wrapper to run bcmsh inside the syncd container. |
| platform/broadcom/docker-syncd-brcm-legacy-th-rpc.dep | Declares dpkg-cache dependency inputs for the new docker image. |
| include $(PLATFORM_PATH)/docker-syncd-brcm-rpc.mk | ||
| include $(PLATFORM_PATH)/docker-saiserver-brcm.mk | ||
| include $(PLATFORM_PATH)/docker-syncd-brcm-legacy-th.mk | ||
| include $(PLATFORM_PATH)/docker-syncd-brcm-legacy-th-rpc.mk |
There was a problem hiding this comment.
platform/broadcom/rules.mk includes the new docker-syncd-brcm-legacy-th-rpc.mk, but the corresponding .dep file (platform/broadcom/docker-syncd-brcm-legacy-th-rpc.dep) is not added to the platform dep include list. Other Broadcom docker additions keep rules.mk and rules.dep in sync (e.g., docker-syncd-brcm-rpc.dep is included in platform/broadcom/rules.dep). Please add an include $(PLATFORM_PATH)/docker-syncd-brcm-legacy-th-rpc.dep entry so dpkg-cache dependency tracking works for this new image.
| include $(PLATFORM_PATH)/docker-syncd-brcm-legacy-th-rpc.mk | |
| include $(PLATFORM_PATH)/docker-syncd-brcm-legacy-th-rpc.mk | |
| include $(PLATFORM_PATH)/docker-syncd-brcm-legacy-th-rpc.dep |
…rcm-legacy-th-rpc.mk Now that docker-syncd-brcm-legacy-th-rpc.mk exists (added by PR sonic-net#26340), apply the same warmboot mount fix: remove the static -v /host/warmboot:/var/warmboot in favour of the dynamic mount generated at runtime via docker_image_ctl.j2 (consistent with PR sonic-net#25071 and the companion fix in docker-syncd-brcm-legacy-th.mk). Signed-off-by: xuliping@microsoft.com <xuliping@microsoft.com>
…rcm-legacy-th.mk (#26292) * [platform/broadcom]: Remove static warmboot mount from docker-syncd-brcm-legacy-th.mk PR #25071 migrated warmboot mounts from the static -v /host/warmboot:/var/warmboot in .mk files to a dynamic -v /host/warmbootDEV:/var/warmboot generated at runtime via docker_image_ctl.j2 to support multi-ASIC devices. However, it missed updating docker-syncd-brcm-legacy-th.mk. This commit applies the same fix to align with the changes introduced in PR #25071. Note: docker-syncd-brcm-legacy-th-rpc.mk will be updated in a follow-up commit once PR #26215 is merged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: xuliping@microsoft.com <xuliping@microsoft.com> * [platform/broadcom]: Remove static warmboot mount from docker-syncd-brcm-legacy-th-rpc.mk Now that docker-syncd-brcm-legacy-th-rpc.mk exists (added by PR #26340), apply the same warmboot mount fix: remove the static -v /host/warmboot:/var/warmboot in favour of the dynamic mount generated at runtime via docker_image_ctl.j2 (consistent with PR #25071 and the companion fix in docker-syncd-brcm-legacy-th.mk). Signed-off-by: xuliping@microsoft.com <xuliping@microsoft.com> --------- Signed-off-by: xuliping@microsoft.com <xuliping@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Why I did it
The legacy-th (Tomahawk) platform requires a dedicated syncd-rpc docker to enable RPC-based SAI testing. Previously only
docker-syncd-brcm-rpcwas built for the standard broadcom image; there was no equivalent for thelegacy-thimage variant. This addsdocker-syncd-brcm-legacy-th-rpcto support RPC-based SAI testing on Tomahawk legacy platforms.Work item tracking
How I did it
platform/broadcom/docker-syncd-brcm-legacy-th-rpc.mk— Makefile for the new docker imageplatform/broadcom/docker-syncd-brcm-legacy-th-rpc/Dockerfile.j2— Dockerfile templateplatform/broadcom/docker-syncd-brcm-legacy-th-rpc/base_image_files/bcmcmd— bcmcmd scriptplatform/broadcom/docker-syncd-brcm-legacy-th-rpc/base_image_files/bcmsh— bcmsh scriptplatform/broadcom/docker-syncd-brcm-legacy-th-rpc/ptf_nn_agent.conf— PTF NN agent configplatform/broadcom/rules.mkto include the new docker in the buildHow to verify it
docker-syncd-brcm-legacy-th-rpcimage is produced alongsidedocker-syncd-brcm-rpcWhich release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Add docker-syncd-brcm-legacy-th-rpc docker to support RPC-based SAI testing on Tomahawk legacy platforms.
Link to config_db schema for YANG module changes
N/A