Skip to content

[code sync] Merge code from sonic-net/sonic-utilities:202511 to 202603#298

Merged
mssonicbld merged 2 commits into
Azure:202603from
mssonicbld:sonicbld/202603-merge
Apr 1, 2026
Merged

[code sync] Merge code from sonic-net/sonic-utilities:202511 to 202603#298
mssonicbld merged 2 commits into
Azure:202603from
mssonicbld:sonicbld/202603-merge

Conversation

@mssonicbld

Copy link
Copy Markdown
Collaborator
* 8fd05d5c - (origin/202511) [config reload] Skip routeCheck monit calls on DPU platforms (#4410) (2026-04-01) [mssonicbld]<br>```

mssonicbld and others added 2 commits April 1, 2026 09:41
#### What I did

On DPU platforms (pensando, nvidia-bluefield), the `routeCheck` monit service is removed from the monit config (sonic-net/sonic-buildimage#26214) since route checking is not applicable on DPUs. However, `config reload` unconditionally tries to `monit unmonitor/monitor routeCheck`, causing:
```
Disabling container and routeCheck monitoring ...
There is no service named "routeCheck"
```

Added a `_monit_service_exists()` helper and guarded `routeCheck` monit calls in `_stop_services()` and `_restart_services()` so they only execute when the service is present in monit.

#### How I did it

- Added `_monit_service_exists(service)` helper that runs `sudo monit summary <service>` and returns `True`/`False` based on exit code.
- In `_stop_services()`: only call `monit unmonitor routeCheck` if `_monit_service_exists("routeCheck")` returns `True`.
- In `_restart_services()`: only call `monit monitor routeCheck` and `_wait_for_monit_service_monitored("routeCheck")` if the service exists.

#### How to verify it

1. On a DPU platform (nvidia-bluefield / pensando) with routeCheck removed from monit config:
 - Run `config reload -y` — should complete without `"There is no service named routeCheck"` error
2. On a non-DPU platform where routeCheck exists in monit:
 - Run `config reload -y` — routeCheck monitoring should still be disabled/re-enabled as before

#### Previous command output (if the output of a command-line utility has changed)

On DPU with routeCheck removed from monit:
```
root@sonic-dpu-3:/home/admin# config reload -y
Acquired lock on /etc/sonic/reload.lock
Disabling container and routeCheck monitoring ...
There is no service named "routeCheck"
Released lock on /etc/sonic/reload.lock
```

#### New command output (if the output of a command-line utility has changed)

On DPU with routeCheck removed from monit:
```
root@sonic-dpu-3:/home/admin# config reload -y
Acquired lock on /etc/sonic/reload.lock
Disabling container monitoring ...
...
Enabling container monitoring ...
Released lock on /etc/sonic/reload.lock
```

Companion PR: sonic-net/sonic-buildimage#26214
Fixes: sonic-net/sonic-buildimage#26225

Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>
@mssonicbld mssonicbld merged commit 4f331ff into Azure:202603 Apr 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant