Skip to content

RDKEMW-28023: Remove ExecStop from update-device-details.service - #640

Open
fzahir786 wants to merge 4 commits into
developfrom
topic/RDKEMW-28023
Open

fzahir786 wants to merge 4 commits into
developfrom
topic/RDKEMW-28023

Conversation

@fzahir786

Copy link
Copy Markdown
Contributor

Reason for change: With default KillMode=control-group, systemctl stop already SIGTERMs (then SIGKILLs after TimeoutStopSec) any process still in the cgroup — so no ExecStop is needed. $MAINPID is returned as 0, so it is empty.
Test Procedure: Check for service failure after stopping the service
Priority: P1
Risks: None

Signed-off-by: Faizal Hasan.Z <faizalhasan_zahirhussain@comcast.com

Reason for change: With default KillMode=control-group, systemctl stop already SIGTERMs (then SIGKILLs after TimeoutStopSec) any process still in the cgroup — so no ExecStop is needed. $MAINPID is returned as 0, so it is empty
Test Procedure: Check for service failure after stopping the service
Priority: P1
Risks: None
 
Signed-off-by: Faizal Hasan.Z <faizalhasan_zahirhussain@comcast.com
@fzahir786
fzahir786 requested a review from a team as a code owner November 4, 2026 07:33
Copilot AI balanced review requested due to automatic review settings November 4, 2026 07:33

Copilot AI left a comment

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.

🟡 Changes recommended

The SIGTERM handler only releases the lock without exiting, so discovery can continue past TimeoutStopSec=3, forcing systemd to kill the process and mark the service failed.

1 open issue
What changed in this PR

This PR removes the explicit stop command from the device-details cache service, relying on systemd’s default process-group termination to avoid failures caused by an unavailable $MAINPID.

Changes:

  • Removes ExecStop=/bin/kill -9 $MAINPID.
  • Retains the three-second stop timeout.
File Description
systemd_units/​update-device-details.service Removes the explicit kill command and delegates termination to systemd.

Review effort: Balanced

SyslogIdentifier="getDeviceDetails"
ExecStart=/bin/sh -c '/lib/rdk/getDeviceDetails.sh "" "" "true" &'
ExecStop=/bin/kill -9 $MAINPID
TimeoutStopSec=3
Copilot AI balanced review requested due to automatic review settings November 4, 2026 09:50

Copilot AI left a comment

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.

🟡 Changes recommended

The SIGTERM handler releases the lock twice, potentially deleting another invocation’s lock and allowing concurrent cache updates.

2 open issues

Review effort: Balanced

Comment thread lib/rdk/getDeviceDetails.sh Resolved
…ck twice on SIGTERM'

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 4, 2026 13:45

Copilot AI left a comment

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.

🟢 Approval recommended

The review reports no active issues with the systemd-managed shutdown change.

1 open issue
1 resolved since last review

Review effort: Balanced

Copilot AI left a comment

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.

🟢 Approval recommended

There are no active review issues for the shutdown-handling changes.

1 open issue

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 5, 2026 05:47

Copilot AI left a comment

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.

🟢 Approval recommended

No active review issues are recorded for the shutdown-handling changes.

1 open issue

Review effort: Balanced

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.

2 participants