Skip to content

Migrate sonic-mgmt-framework container to Debian Trixie#26548

Open
amrutasali wants to merge 12 commits intosonic-net:masterfrom
amrutasali:trixie_migration_for_sonic_mgmt_framework
Open

Migrate sonic-mgmt-framework container to Debian Trixie#26548
amrutasali wants to merge 12 commits intosonic-net:masterfrom
amrutasali:trixie_migration_for_sonic_mgmt_framework

Conversation

@amrutasali
Copy link
Copy Markdown
Contributor

@amrutasali amrutasali commented Apr 3, 2026

Why I did it - Required for sonic-net/SONiC#2169

How I did it - Updated the Docker build files to build for Debian Trixie. The dependency packages are updated accordingly.

How to verify it - The sonic-mgmt-framework container builds successfully under BLDENV=trixie. Installed it on a recent SONiC image and verified that the docker os distribution shows Trixie and basic curl test on REST server hosted within the docker works fine.

Note: The sonic-mgmt-framework build for trixie has a dependency on below PRs and then a submodule update for the 2 repos :
sonic-net/sonic-mgmt-common#211
sonic-net/sonic-mgmt-framework#158

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Amruta Sali <amruta_sali@dell.com>
@amrutasali amrutasali force-pushed the trixie_migration_for_sonic_mgmt_framework branch from 75b8c91 to 8cd8fab Compare April 3, 2026 21:58
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@amrutasali
Copy link
Copy Markdown
Contributor Author

@saiarcot895 Please add this to tracker - sonic-net/SONiC#2169 .
Note : sonic-gnmi(bump Golang to 1.24.4) repo PR will be opened next week

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the docker-sonic-mgmt-framework container to build on the Debian Trixie base (via docker-config-engine-trixie), aligning the container’s build/runtime environment with the newer BLDENV=trixie build flow.

Changes:

  • Switch docker-sonic-mgmt-framework build dependencies/load base from docker-config-engine-bookworm to docker-config-engine-trixie.
  • Update the container Dockerfile base image to docker-config-engine-trixie-* and adjust installed Debian packages accordingly.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
rules/docker-sonic-mgmt-framework.mk Moves the mgmt-framework docker image’s base/load/debug dependency wiring from bookworm config-engine to trixie config-engine, and reclassifies it under “trixie” docker lists.
dockers/docker-sonic-mgmt-framework/Dockerfile.j2 Switches the Docker build ARG base image to docker-config-engine-trixie-* and updates apt dependencies for Trixie.

Comment thread rules/docker-sonic-mgmt-framework.mk
@saiarcot895
Copy link
Copy Markdown
Contributor

@saiarcot895 Please add this to tracker - sonic-net/SONiC#2169 . Note : sonic-gnmi(bump Golang to 1.24.4) repo PR will be opened next week

@amrutasali Please note #26499.

@amrutasali
Copy link
Copy Markdown
Contributor Author

amrutasali commented Apr 3, 2026

@saiarcot895 Please add this to tracker - sonic-net/SONiC#2169 . Note : sonic-gnmi(bump Golang to 1.24.4) repo PR will be opened next week

@amrutasali Please note #26499.

@saiarcot895 yes I'm aware and got it confirmed - #25959 (comment) .So will just bump Golang version for soni-gnmi repository.

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

…mpiled against cjson headers inside the container

Signed-off-by: Amruta Sali <amruta_sali@dell.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

saiarcot895 pushed a commit to sonic-net/sonic-mgmt-framework that referenced this pull request Apr 14, 2026
#### Why I did it - 
Required for sonic-net/SONiC#2169 

#### How I did it - 
Updated Azure Pipelines to use sonic-slave-trixie container
Added libpcre3 dependencies (not available in Trixie repos)
Bumped Go version to 1.24.4 to align with Trixie's provided version
Updated dependency paths to use Trixie-specific packages and Python wheels

#### How to verify it - 
The sonic-mgmt-framework container  builds successfully under BLDENV=trixie. Installed it on a recent SONiC image and verified that the docker os distribution shows Trixie and basic curl test on REST server hosted within the docker works fine. Also executed the pipeline tests locally.

**Note:**
Dependent/Related  PRs:
sonic-net/sonic-buildimage#26548
sonic-net/sonic-mgmt-common#211

* Debian Trixie migration for sonic-mgmt-framework

Signed-off-by: Amruta Sali <amruta_sali@dell.com>

* modified azure-pipelines.yml for pip install to use wildcard for filename (sonic_yang_models-1.0-py3-none-any.whl)

Signed-off-by: Amruta Sali <amruta_sali@dell.com>

---------

Signed-off-by: Amruta Sali <amruta_sali@dell.com>
@yxieca
Copy link
Copy Markdown
Contributor

yxieca commented Apr 14, 2026

/azpw ms_conflict

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@yxieca
Copy link
Copy Markdown
Contributor

yxieca commented Apr 14, 2026

/azpw ms_conflict

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@yxieca
Copy link
Copy Markdown
Contributor

yxieca commented Apr 15, 2026

/azpw ms_conflict

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

…o 1.24.4 (trixie-only) and are only used by trixie-specific docker images. Add BLDENV=trixie conditionals following the libpcre3 pattern to avoid bookworm build failures.

Signed-off-by: Amruta Sali <amruta_sali@dell.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@amrutasali
Copy link
Copy Markdown
Contributor Author

@saiarcot895 this is ready to be merged

$(SONIC_MGMT_COMMON)_DEPENDS = $(LIBYANG_DEV) $(LIBYANG)
$(SONIC_MGMT_COMMON)_RDEPENDS = $(LIBYANG)
$(SONIC_MGMT_COMMON)_WHEEL_DEPENDS = $(SONIC_YANG_MODELS_PY3)
ifeq ($(BLDENV),trixie)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does ifeq ($(BLDENV),trixie) need to be added to these files?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From this submodule PR pipeline failure it seems like the CI pipeline build has two separate phases:

  • Package build phase: Builds debian packages (in both bookworm and trixie)
  • Docker build phase: Builds docker images using packages from their respective DEBS_PATH

So the build system builds packages in both bookworm and trixie environments. The sonic-mgmt-common package with go 1.24.4 requirement cannot be built in bookworm (Go 1.19.8), but can be built in trixie (Go 1.24.4).
This PR #26548 migrates docker-sonic-mgmt-framework to use trixie base, which means the framework will use the trixie-built sonic-mgmt-common package instead of the bookworm one.
However, the build still tries to build sonic-mgmt-common in bookworm first and fails.

Hence the conditional.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saiarcot895 let me know if the understanding of CI pipeline is correct, else i can remove the the conditional .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants