Skip to content

Add an inline platform check for ExecCondition of gnoi-shutdown.service#395

Merged
BYGX-wcr merged 3 commits into
sonic-net:masterfrom
BYGX-wcr:add-exec-condition-for-gnoi-service
Jun 19, 2026
Merged

Add an inline platform check for ExecCondition of gnoi-shutdown.service#395
BYGX-wcr merged 3 commits into
sonic-net:masterfrom
BYGX-wcr:add-exec-condition-for-gnoi-service

Conversation

@BYGX-wcr

@BYGX-wcr BYGX-wcr commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Add an inline platform check for ExecCondition of gnoi-shutdown.service so that the gnoi-shutdown.service is skipped on non-smartswitch NPU platforms.

Fix issue: #27975

@mssonicbld

Copy link
Copy Markdown

/azp run

@BYGX-wcr BYGX-wcr requested a review from vvolam June 18, 2026 20:35
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

[Service]
Type=simple
ExecStart=/usr/bin/python3 /usr/local/bin/gnoi_shutdown_daemon.py
ExecCondition=/usr/bin/python3 -c "import sys; from sonic_py_common import device_info; from utilities_common.chassis import is_dpu; sys.exit(0 if (device_info.is_smartswitch() and not is_dpu()) else 1)"

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.

is_dpu is also available in device_info

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

changed

Signed-off-by: BYGX-wcr <wcr@live.cn>
@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@BYGX-wcr BYGX-wcr merged commit 233cd59 into sonic-net:master Jun 19, 2026
6 checks passed
@BYGX-wcr BYGX-wcr deleted the add-exec-condition-for-gnoi-service branch June 19, 2026 16:07
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.

4 participants