Skip to content

[action] [PR:27355] [process_monitoring] Skip auto-restart processes (bmcweb/sonic-dbus-bridge) from expected alerts on BMC - #1384

Merged
mssonicbld merged 1 commit into
Azure:202608from
mssonicbld:cherry/msft-202608/27355
Aug 28, 2026
Merged

[action] [PR:27355] [process_monitoring] Skip auto-restart processes (bmcweb/sonic-dbus-bridge) from expected alerts on BMC#1384
mssonicbld merged 1 commit into
Azure:202608from
mssonicbld:cherry/msft-202608/27355

Conversation

@mssonicbld

Copy link
Copy Markdown
Collaborator

Description of PR

Summary:
Fixes #27354

test_monitoring_critical_processes fails on BMC platforms. The test kills the redfish container's critical processes (bmcweb, sonic-dbus-bridge) and expects a Process '<name>' is not running alert in syslog. But both are configured with autorestart=true in their container's supervisord.conf, so supervisord restarts them immediately after they are killed — they never stay down long enough for supervisor-proc-exit-listener to emit the alert. LogAnalyzer then reports them as missing (expected_missing_match: 2).

The otel process already had the same problem and was handled with a hardcoded skip; this PR generalizes that handling.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202608

Approach

What is the motivation for this PR?

Make test_monitoring_critical_processes pass on BMC platforms, where bmcweb and sonic-dbus-bridge auto-restart and therefore never emit "not running" syslog alerts.

How did you do it?

Added a static AUTORESTART_CRITICAL_PROCESSES map (keyed by container name: otelotel; redfishbmcweb, sonic-dbus-bridge) and a _is_autorestart_process() helper (tolerates a namespace/ASIC suffix). In get_expected_alerting_messages_supervisor, these processes are skipped from the expected alerting messages, in both the process and group loops. This folds the previously hardcoded otel skip into the same list. The processes are still killed, so the kill/restart path is still exercised.

How did you verify/test it?

  • python -m py_compile and flake8 --max-line-length=120 pass on the modified file.
  • Root cause confirmed in sonic-buildimage: bmcweb, sonic-dbus-bridge, and otel all set autorestart=true; alerting processes lldpd/lldpmgrd set autorestart=false.

Any platform specific information?

The redfish container (bmcweb, sonic-dbus-bridge) only exists on BMC platforms.

Supported testbed topology if it's a new test case?

N/A — existing test, bmc/any topology.

Documentation

N/A

Signed-off-by: Sonic Build Admin sonicbld@microsoft.com

…ridge) from expected alerts on BMC

### Description of PR
Summary:
Fixes #27354

`test_monitoring_critical_processes` fails on BMC platforms. The test kills the `redfish` container's critical processes (`bmcweb`, `sonic-dbus-bridge`) and expects a `Process '<name>' is not running` alert in syslog. But both are configured with `autorestart=true` in their container's `supervisord.conf`, so supervisord restarts them immediately after they are killed — they never stay down long enough for `supervisor-proc-exit-listener` to emit the alert. LogAnalyzer then reports them as missing (`expected_missing_match: 2`).

The `otel` process already had the same problem and was handled with a hardcoded skip; this PR generalizes that handling.

### Type of change
- [x] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [ ] New Test case
    - [ ] Skipped for non-supported platforms
- [ ] Test case improvement

### Back port request
- [ ] 202205
- [ ] 202305
- [ ] 202311
- [ ] 202405
- [ ] 202411
- [ ] 202505
- [ ] 202511
- [x] 202608

### Approach
#### What is the motivation for this PR?
Make `test_monitoring_critical_processes` pass on BMC platforms, where `bmcweb` and `sonic-dbus-bridge` auto-restart and therefore never emit "not running" syslog alerts.

#### How did you do it?
Added a static `AUTORESTART_CRITICAL_PROCESSES` map (keyed by container name: `otel` → `otel`; `redfish` → `bmcweb`, `sonic-dbus-bridge`) and a `_is_autorestart_process()` helper (tolerates a namespace/ASIC suffix). In `get_expected_alerting_messages_supervisor`, these processes are skipped from the expected alerting messages, in both the process and group loops. This folds the previously hardcoded `otel` skip into the same list. The processes are still killed, so the kill/restart path is still exercised.

#### How did you verify/test it?
- `python -m py_compile` and `flake8 --max-line-length=120` pass on the modified file.
- Root cause confirmed in sonic-buildimage: `bmcweb`, `sonic-dbus-bridge`, and `otel` all set `autorestart=true`; alerting processes `lldpd`/`lldpmgrd` set `autorestart=false`.

#### Any platform specific information?
The `redfish` container (bmcweb, sonic-dbus-bridge) only exists on BMC platforms.

#### Supported testbed topology if it's a new test case?
N/A — existing test, `bmc`/`any` topology.

### Documentation
N/A

Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator Author

Original PR: sonic-net/sonic-mgmt#27355

@azure-pipelines

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

@mssonicbld

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

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

@mssonicbld
mssonicbld merged commit 6970952 into Azure:202608 Aug 28, 2026
5 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