Skip to content

Fix loganalyzer failures on non-smartswitch platforms triggered by #255#322

Merged
qiluo-msft merged 1 commit intosonic-net:masterfrom
rameshraghupathy:fix-log-anlzyr-due-to-255
Nov 25, 2025
Merged

Fix loganalyzer failures on non-smartswitch platforms triggered by #255#322
qiluo-msft merged 1 commit intosonic-net:masterfrom
rameshraghupathy:fix-log-anlzyr-due-to-255

Conversation

@rameshraghupathy
Copy link
Copy Markdown
Contributor

@rameshraghupathy rameshraghupathy commented Nov 25, 2025

Why I did it

The gNOI shutdown daemon service was causing loganalyzer test failures on non-SmartSwitch platforms (e.g., vlab-01). The service attempted to start via ExecStartPre=/usr/local/bin/check_platform.py, which exited with code 1 on incompatible platforms. This caused systemd to log ERROR messages like:
ERR systemd[1]: Failed to start gnoi-shutdown.service - gNOI based DPU Graceful Shutdown Daemon
These errors blocked CI/CD submodule updates due to loganalyzer failures.

How I did it
Changed the service file to use ExecCondition= instead of ExecStartPre= for platform checking:

ExecCondition=/usr/bin/python3 /usr/local/bin/check_platform.py runs before service start
When check_platform.py returns exit code 1 on non-SmartSwitch platforms, systemd treats this as a condition not met rather than a failure
Service is gracefully skipped without error logs on incompatible platforms
Changed Restart=always to Restart=on-failure to avoid unnecessary restart attempts when conditions aren't met

How to verify it
On SmartSwitch NPU platform: Service starts normally and handles DPU graceful shutdown
sonic-net/sonic-buildimage#24609 is run with this change

Which release branch to backport
[x]202511

@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@qiluo-msft qiluo-msft merged commit 3492186 into sonic-net:master Nov 25, 2025
5 checks passed
@qiluo-msft
Copy link
Copy Markdown
Contributor

Why I did it

The gNOI shutdown daemon service was causing loganalyzer test failures on non-SmartSwitch platforms (e.g., vlab-01). The service attempted to start via ExecStartPre=/usr/local/bin/check_platform.py, which exited with code 1 on incompatible platforms. This caused systemd to log ERROR messages like: ERR systemd[1]: Failed to start gnoi-shutdown.service - gNOI based DPU Graceful Shutdown Daemon These errors blocked CI/CD submodule updates due to loganalyzer failures.

How I did it Changed the service file to use ExecCondition= instead of ExecStartPre= for platform checking:

ExecCondition=/usr/bin/python3 /usr/local/bin/check_platform.py runs before service start When check_platform.py returns exit code 1 on non-SmartSwitch platforms, systemd treats this as a condition not met rather than a failure Service is gracefully skipped without error logs on incompatible platforms Changed Restart=always to Restart=on-failure to avoid unnecessary restart attempts when conditions aren't met

How to verify it On SmartSwitch NPU platform: Service starts normally and handles DPU graceful shutdown sonic-net/sonic-buildimage#24609 is run with this change

Which release branch to backport [x]202506 [x]202511

there is no 202506 branch in this repo. Do you mean 202505?

@rameshraghupathy
Copy link
Copy Markdown
Contributor Author

Which release branch to backport [x]202506 [x]202511
there is no 202506 branch in this repo. Do you mean 202505?
@qiluo-msft We need it only in 202511. We don't need it in with 202505 or 202506. Fixed the description.

@vmittal-msft
Copy link
Copy Markdown

@rameshraghupathy please help raise pr for 202511

@mssonicbld
Copy link
Copy Markdown

Cherry-pick PR to 202511: #333

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.

5 participants