Skip to content

[SmartSwitch] Mask dash-ha service when dash-ha is not enabled#5

Closed
croos12 wants to merge 2 commits intomasterfrom
dash-ha-disable
Closed

[SmartSwitch] Mask dash-ha service when dash-ha is not enabled#5
croos12 wants to merge 2 commits intomasterfrom
dash-ha-disable

Conversation

@croos12
Copy link
Owner

@croos12 croos12 commented Dec 19, 2025

Why I did it

The dash-ha container is always built and included in the image. However, when the dash-ha feature is not explicitly enabled/configured, the services create nuisance error messages when they attempt to start:

ERR container: docker get image version for dash-hadpu3 failed with 404 Client Error for http+docker://localhost/v1.50/containers/dash-hadpu3/json: Not Found ("No such container: dash-hadpu3")

This change sets the dash-ha feature to be disabled by default. The service is masked so it won't attempt to run automatically. Users who want to use the dash-ha feature can enable it explicitly at runtime.

Work item tracking
  • Microsoft ADO (number only):

How I did it

I explicitly set to service to track the same flag as the build.

How to verify it

○ dash-ha.service
     Loaded: masked (Reason: Unit dash-ha.service is masked.)
     Active: inactive (dead)

root@sonic-dpu:/var/log# systemctl status dash-ha
○ dash-ha.service
     Loaded: masked (Reason: Unit dash-ha.service is masked.)
     Active: inactive (dead)```

#### Tested branch (Please provide the tested image version)

<!--
- Please provide tested image version
- e.g.
- [x] 20201231.100
-->

- [x] 202511_RC 

#### Description for the changelog
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in the changelog:
-->


#### A picture of a cute animal (not mandatory but encouraged)

@croos12 croos12 marked this pull request as ready for review December 30, 2025 23:10
Copy link

@vivekrnv vivekrnv left a comment

Choose a reason for hiding this comment

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

LGTM, Please verify if HA is not started in NPU or DPU by default.

@tirupatihemanth Please review

@croos12 croos12 changed the title Add check for dash-ha service [SmartSwitch} Mask dash-ha service when HA is not enabled Dec 31, 2025
@croos12 croos12 changed the title [SmartSwitch} Mask dash-ha service when HA is not enabled [SmartSwitch] Mask dash-ha service when dash-ha is not enabled Dec 31, 2025
@croos12
Copy link
Owner Author

croos12 commented Jan 1, 2026

LGTM, Please verify if HA is not started in NPU or DPU by default.

@tirupatihemanth Please review

I added to the comment that the service is now masked by default, so it can't even be started manually if it was not built with dash-ha

@vivekrnv
Copy link

vivekrnv commented Jan 1, 2026

dash-ha is always enabled during the build by default, https://github.com/sonic-net/sonic-buildimage/blob/6733121c6148eaa8f566c1bfe8e64c7a14534e70/rules/config#L179

Even for NPU or DPU, the container is always built and is part of image

For eg: output in a bookworm image
root@sonic:/home/admin# docker image ls
docker-dash-ha              202511_RC.29-c3419dedd_Internal   23683df8fccc   2 weeks ago    463MB
docker-dash-ha              latest                            23683df8fccc   2 weeks ago    463MB

Change you are trying to make would set the feature status to be disabled (and masked because of that) by default even when the container is included in the image. Please update the description.

@tirupatihemanth
Copy link
Collaborator

Agree with @vivekrnv, The dash ha container is always part of the image. With these changes it is always disabled by default. Users who would like to use the feature can enable it explicitly during runtime.

@tirupatihemanth tirupatihemanth self-requested a review January 2, 2026 22:19
@croos12 croos12 closed this Jan 8, 2026
croos12 pushed a commit that referenced this pull request Mar 19, 2026
…net#25643)

* [build] Add build timing report and dependency analysis tools

Add three scripts for build performance instrumentation:

- scripts/build-timing-report.sh: Parse per-package timing from build
  logs (HEADER/FOOTER timestamps), generate sorted duration table,
  phase breakdown, parallelism timeline, and CSV export.

- scripts/build-dep-graph.py: Parse rules/*.mk dependency graph,
  compute critical path, fan-out/fan-in bottleneck analysis, and
  generate DOT/JSON output for visualization.

- scripts/build-resource-monitor.sh: Sample CPU, memory, disk I/O,
  and Docker container count during builds for resource utilization
  analysis.

Add "make build-report" target to slave.mk that runs the timing
report and dependency analysis after a build completes.

Example output from a VS build on 24-core/30GB machine:
- 210 packages built in 53m wall time (173m CPU)
- Max concurrency: 5 (with SONIC_CONFIG_BUILD_JOBS=4)
- Critical path: 14 packages deep (libnl -> libswsscommon -> utilities)
- Top bottleneck: LIBSWSSCOMMON with 48 downstream dependents

Signed-off-by: Rustiqly <[email protected]>

* Address Copilot review: fix 17 bugs in build analysis scripts

- Use free -m with division instead of free -g to avoid rounding (#1)
- Add = and ?= to Makefile dependency regex patterns (#2, #7)
- CPU calculation now uses /proc/stat delta (two reads) (#3, sonic-net#14)
- Fix misleading 'critical path estimate' comment (#4)
- Fix parallelism timeline comment (60s not 10s) (#5)
- Include after-relationship packages in fan stats (#6)
- Guard disk I/O division by zero when INTERVAL<=1 (#8)
- Remove unused elapsed_line variable (#9)
- Remove redundant LIBSWSSCOMMON_DBG check (#10)
- Remove active_make_jobs from CSV header comment (#11)
- Wire up _RDEPENDS parsing to build reverse deps (#12)
- Remove unnecessary 'if v' filter on rdeps JSON (#13)
- Remove unused REPORT_FORMAT parameter (sonic-net#15)
- Add cycle detection to critical path algorithm (sonic-net#16)
- Add execute permission check for companion scripts (sonic-net#17)

Signed-off-by: Rustiqly <[email protected]>

---------

Signed-off-by: Rustiqly <[email protected]>
Co-authored-by: Rustiqly <[email protected]>
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