Skip to content

stp: Fix docker-stp image and build templates for PVST - #28624

Open
rdhegde wants to merge 1 commit into
sonic-net:masterfrom
rdhegde:rdhegde-pvst-buildimage
Open

stp: Fix docker-stp image and build templates for PVST#28624
rdhegde wants to merge 1 commit into
sonic-net:masterfrom
rdhegde:rdhegde-pvst-buildimage

Conversation

@rdhegde

@rdhegde rdhegde commented Jul 25, 2026

Copy link
Copy Markdown

Summary

  • Update docker-stp to use nftables instead of ebtables (required
    functionality no longer available in ebtables).
  • Modernize supervisord.conf to the current format.
  • Fix STP build/service integration: disable STP on boot via init_cfg.json.j2,
    use config-setup.service instead of unsupported updategraph.service in
    stp.service.j2, and add STP CoPP punt rules in copp_cfg.j2.

Motivation

PVST configuration fails when the STP docker image, service startup, and build
templates are out of date. This PR aligns sonic-buildimage with the STP/STPMGR
and utilities fixes so PVST can be configured and packets are handled correctly
on the control plane.

Changes

docker-stp

  • Replace ebtables with nftables in the image apt install path
  • Update supervisord.conf to current supervisord format

Build / config templates

  • init_cfg.json.j2: disable STP feature on start when the build includes STP
  • stp.service.j2: depend on config-setup.service instead of
    updategraph.service (no longer supported)
  • copp_cfg.j2: add STP entries to punt STP packets to the control plane

Related PRs

Repo PR
sonic-stp sonic-net/sonic-stp#97
sonic-swss sonic-net/sonic-swss#4790
sonic-utilities sonic-net/sonic-utilities#4716

Verification

  • Built sonic-vs image with this change set
  • 3-node PVST topology in GNS3 (sonic-vs): PVST config applied, state
    reached STP daemon, protocol converged
  • Marvell Prestera switches: same PVST config/convergence validation

Notes for reviewers

  • This PR is the buildimage piece of a multi-repo PVST fix; review together
    with linked PRs above.
  • docker-stp nftables change is driven by loss of required ebtables support.

@rdhegde
rdhegde requested a review from lguohan as a code owner July 25, 2026 13:36
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Did the following changes for docker-stp
* Updated the apt-get path to install nftables instead of ebtables
  since the functionality needed from ebtables in STP docker is not
  supported anymore
* Updated the supervisord.conf to the current format.

Did the following build changes
* Updated init_cfg.json.j2 to disable STP feature on start when the
  build includes this feature
* Updated stp.service.j2 to use config-setup.service instead of
  currently unsupported updategraph.service
* Added entries for STP in copp_cfg.j2 to punt the packet to control
  plane.

Signed-off-by: Ram Hegde <rhegde@marvell.com>
@rdhegde
rdhegde force-pushed the rdhegde-pvst-buildimage branch from df81d30 to ca2dffa Compare July 25, 2026 14:05
@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).

@rdhegde rdhegde changed the title PVST bug fixes stp: Fix docker-stp image and build templates for PVST Jul 28, 2026
@rdhegde

rdhegde commented Aug 3, 2026

Copy link
Copy Markdown
Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.

@rdhegde

rdhegde commented Aug 4, 2026

Copy link
Copy Markdown
Author

@lguohan the CI for this PR is failing since the PR updates the protected file files/build_templates/init_cfg.json.j2 .
This update is needed to add a default FEATURE table entry so that STP is disabled by default. Could you please let me know how to proceed further.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants