Skip to content

Revert PR #26724 "docker-sonic-vs: add _INCLUDE_DOCKER feature composition and cSONiC enhancements"#28054

Closed
theasianpianist wants to merge 1 commit into
sonic-net:masterfrom
theasianpianist:revert-pr-26724
Closed

Revert PR #26724 "docker-sonic-vs: add _INCLUDE_DOCKER feature composition and cSONiC enhancements"#28054
theasianpianist wants to merge 1 commit into
sonic-net:masterfrom
theasianpianist:revert-pr-26724

Conversation

@theasianpianist

Copy link
Copy Markdown
Contributor

Why I did it

Revert #26724.

PR #26724 ("docker-sonic-vs: add _INCLUDE_DOCKER feature composition and cSONiC enhancements") was merged with rebase-and-merge instead of squash, landing all 15 of its commits individually on master. We need to revert the entire PR.

Work item tracking
  • Microsoft ADO (number only):

How I did it

Reverted the full 15-commit range that PR #26724 introduced on master (220b4d8f26..9f48af924c) as a single revert commit.

Reverted commits (master order):

  • docker-sonic-vs: load config_db.json from /var/sonic at startup
  • Fix show version: add debian_version at build time, kernel_version at runtime
  • Fix build_version: use SONIC_IMAGE_VERSION instead of undefined SONIC_GET_VERSION
  • Add lldpd and _DOCKER += feature composition to docker-sonic-vs
  • docker-sonic-vs: install sudo package
  • docker-sonic-vs: use _INCLUDE_DOCKER for FRR (docker-fpm-frr)
  • docker-sonic-vs: use _INCLUDE_DOCKER for teamd (docker-teamd)
  • docker-sonic-vs: copy constants.yml into image for bgpcfgd
  • docker-sonic-vs: use _INCLUDE_DOCKER for NAT (docker-nat)
  • docker-sonic-vs: use _INCLUDE_DOCKER for sflow (docker-sflow)
  • docker-sonic-vs: use _INCLUDE_DOCKER for swss (docker-orchagent)
  • docker-sonic-vs: use _INCLUDE_DOCKER for database (docker-database)
  • Fix orchagent watchdog: add stdout_capture_maxbytes for heartbeat detection
  • docker-sonic-vs: create /zmq_swss directory for P4Orch ZMQ sockets
  • slave.mk: fix package name detection for pyproject.toml-based packages

The unrelated PROCESS_STATE_FATAL addition from PR #27943 to the supervisor-proc-exit-listener event subscriptions (docker-fpm-frr, docker-lldp, docker-orchagent, docker-teamd) is preserved — it is not part of #26724.

How to verify it

Which release branch to backport (provide reason below if selected)

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202605

Tested branch (Please provide the tested image version)

  • [ ]

Description for the changelog

Revert PR #26724 (docker-sonic-vs _INCLUDE_DOCKER feature composition and cSONiC enhancements)

…re composition and cSONiC enhancements"

PR sonic-net#26724 (sonic-net#26724) was
merged with rebase-and-merge instead of squash, landing all 15 of its
commits individually on master. This reverts the entire PR.

The following commits are reverted (in master order):
  - docker-sonic-vs: load config_db.json from /var/sonic at startup
  - Fix show version: add debian_version at build time, kernel_version at runtime
  - Fix build_version: use SONIC_IMAGE_VERSION instead of undefined SONIC_GET_VERSION
  - Add lldpd and _DOCKER += feature composition to docker-sonic-vs
  - docker-sonic-vs: install sudo package
  - docker-sonic-vs: use _INCLUDE_DOCKER for FRR (docker-fpm-frr)
  - docker-sonic-vs: use _INCLUDE_DOCKER for teamd (docker-teamd)
  - docker-sonic-vs: copy constants.yml into image for bgpcfgd
  - docker-sonic-vs: use _INCLUDE_DOCKER for NAT (docker-nat)
  - docker-sonic-vs: use _INCLUDE_DOCKER for sflow (docker-sflow)
  - docker-sonic-vs: use _INCLUDE_DOCKER for swss (docker-orchagent)
  - docker-sonic-vs: use _INCLUDE_DOCKER for database (docker-database)
  - Fix orchagent watchdog: add stdout_capture_maxbytes for heartbeat detection
  - docker-sonic-vs: create /zmq_swss directory for P4Orch ZMQ sockets
  - slave.mk: fix package name detection for pyproject.toml-based packages

The unrelated PROCESS_STATE_FATAL addition from PR sonic-net#27943 to the
supervisor-proc-exit-listener event subscriptions in docker-fpm-frr,
docker-lldp, docker-orchagent and docker-teamd supervisord configs is
preserved.

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
Copilot AI review requested due to automatic review settings June 24, 2026 00:57
@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).

Copilot AI left a comment

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.

Pull request overview

This pull request reverts PR #26724, removing the _INCLUDE_DOCKER feature-composition machinery and restoring the prior docker-sonic-vs / related container build & runtime behavior, while keeping the unrelated PROCESS_STATE_FATAL listener subscription improvements.

Changes:

  • Revert _INCLUDE_DOCKER feature composition support (Make functions, build-context usage, shared Jinja fragments, and the j2_include.py wrapper).
  • Restore prior docker-sonic-vs implementation by inlining previously-shared snippets back into Dockerfiles/supervisord configs and undoing cSONiC enhancements from #26724.
  • Restore pre-#26724 version-generation and wheel-build behaviors for the affected VS and container build scripts.

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
slave.mk Removes _INCLUDE_DOCKER processing, drops build-context passing, and returns to plain j2 rendering for Dockerfile.j2.
scripts/j2_include.py Deletes the j2cli wrapper that extended Jinja include search paths.
rules/functions Removes add_docker_feature / process_include_dockers Make helpers.
platform/vs/sonic-version/build_sonic_version.sh Reverts VS sonic_version env exports (drops debian_version).
platform/vs/sonic-version.mk Reverts VS sonic_version Make variable selection.
platform/vs/docker-sonic-vs/supervisord.conf.j2 Reverts docker-sonic-vs supervisord composition back to a single template with explicit programs.
platform/vs/docker-sonic-vs/start.sh Reverts cSONiC startup behavior (config_db + version runtime fields) and restores explicit supervisorctl startup sequence.
platform/vs/docker-sonic-vs/Dockerfile.j2 Removes feature build-context COPYs/includes and restores direct COPY/config steps.
platform/vs/docker-sonic-vs/.gitignore Removes ignore rule for generated/copied constants.yml.
platform/vs/docker-sonic-vs.mk Removes _INCLUDE_DOCKER usage and associated build-context/copy plumbing for constants.
dockers/docker-teamd/supervisord.conf.common.j2 Removes shared teamd common supervisord fragment.
dockers/docker-teamd/supervisord.conf Inlines teamd supervisord programs instead of including a common fragment.
dockers/docker-teamd/Dockerfile.j2 Restores older build/entrypoint wiring (copies static supervisord.conf, drops init renderer).
dockers/docker-teamd/docker-teamd-init.sh Removes init-time Jinja rendering helper script.
dockers/docker-sflow/supervisord.conf.common.j2 Removes shared sFlow supervisord fragment.
dockers/docker-orchagent/supervisord.conf.j2 Inlines swss supervisord program definitions (removes include of common fragment).
dockers/docker-orchagent/supervisord.conf.common.j2 Removes shared swss supervisord fragment.
dockers/docker-orchagent/Dockerfile.j2 Inlines common Dockerfile fragment content directly into Dockerfile.j2.
dockers/docker-orchagent/Dockerfile.common.j2 Removes shared swss Dockerfile fragment.
dockers/docker-nat/supervisord.conf.common.j2 Removes shared NAT supervisord fragment.
dockers/docker-lldp/supervisord.conf.j2 Inlines LLDP supervisord program definitions (removes include of common fragment).
dockers/docker-lldp/supervisord.conf.common.j2 Removes shared LLDP supervisord fragment.
dockers/docker-lldp/Dockerfile.j2 Inlines LLDP common Dockerfile fragment content directly into Dockerfile.j2.
dockers/docker-lldp/Dockerfile.common.j2 Removes shared LLDP Dockerfile fragment.
dockers/docker-fpm-frr/frr/supervisord/supervisord.conf.j2 Inlines FRR supervisord program definitions (removes include of common fragment).
dockers/docker-fpm-frr/frr/supervisord/supervisord.conf.common.j2 Removes shared FRR supervisord fragment.
dockers/docker-fpm-frr/Dockerfile.j2 Inlines FRR common Dockerfile fragment content directly into Dockerfile.j2.
dockers/docker-fpm-frr/Dockerfile.common.j2 Removes shared FRR Dockerfile fragment.
dockers/docker-database/Dockerfile.j2 Inlines database common Dockerfile fragment content directly into Dockerfile.j2.
dockers/docker-database/Dockerfile.common.j2 Removes shared database Dockerfile fragment.

Comment on lines 1 to 4
# sonic version yml file

sonic_version=$(SONIC_IMAGE_VERSION)
sonic_version=$(SONIC_GET_VERSION)
sonic_asic_platform=$(CONFIGURED_PLATFORM)
Comment on lines +147 to +151
supervisorctl start teamsyncd

supervisorctl start fpmsyncd

supervisorctl start teammgrd
@theasianpianist

Copy link
Copy Markdown
Contributor Author

No longer needed since DVS has been fixed: #28108

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.

3 participants