Skip to content

Topic/rdkb 63981#107

Open
Lasya-Prakarsha-D-V wants to merge 6 commits intodevelopfrom
topic/RDKB-63981
Open

Topic/rdkb 63981#107
Lasya-Prakarsha-D-V wants to merge 6 commits intodevelopfrom
topic/RDKB-63981

Conversation

@Lasya-Prakarsha-D-V
Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings April 20, 2026 08:04
@Lasya-Prakarsha-D-V Lasya-Prakarsha-D-V requested review from a team as code owners April 20, 2026 08:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the rfc.service systemd unit to add timestamped logging around the pre-start delay and RFC service startup, improving observability during boot/service bring-up.

Changes:

  • Add START/END timestamp logging to ExecStartPre around the existing 300s sleep.
  • Add timestamped logging when appending “Enable RFC feature” to ${PARODUS_START_LOG_FILE}.
  • Add START/END timestamp logging around spawning /lib/rdk/rfc.service.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread systemd_units/rfc.service Outdated
ExecStart=/bin/sh -c 'echo "Enable RFC feature" >> ${PARODUS_START_LOG_FILE}'
ExecStart=/bin/sh -c '/lib/rdk/rfc.service &'
ExecStart=/bin/sh -c 'echo " $(date) Enable RFC feature" >> ${PARODUS_START_LOG_FILE}'
ExecStart=/bin/sh -c 'echo "RFC execStart START: $(date)"; sleep 60; echo "RFC execStart END: $(date)"'
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

This ExecStart command will always exit with the status of the final echo, which effectively masks failures starting /lib/rdk/rfc.service (e.g., exec permission/path issues). Also, the "END" log is emitted immediately after spawning the background job, which can be misleading. Consider preserving/propagating the start command’s exit status (or removing the trailing echo), and rename the message to reflect that the process was spawned rather than completed if it remains backgrounded.

Suggested change
ExecStart=/bin/sh -c 'echo "RFC execStart START: $(date)"; sleep 60; echo "RFC execStart END: $(date)"'
ExecStart=/bin/sh -ec 'echo "RFC execStart START: $(date)"; sleep 60; echo "RFC execStart END: $(date)"'

Copilot uses AI. Check for mistakes.
Comment thread systemd_units/rfc.service
EnvironmentFile=/etc/device.properties
ExecStart=/bin/sh -c 'echo "Enable RFC feature" >> ${PARODUS_START_LOG_FILE}'
ExecStart=/bin/sh -c '/lib/rdk/rfc.service &'
ExecStart=/bin/sh -c 'echo " $(date) Enable RFC feature" >> ${PARODUS_START_LOG_FILE}'
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

The log line being appended includes a leading space before the timestamp (" $(date) ..."), which makes log parsing/grepping inconsistent and looks accidental. Trim the leading space (and consider matching the repository’s common date: log format used in other unit scripts).

Suggested change
ExecStart=/bin/sh -c 'echo " $(date) Enable RFC feature" >> ${PARODUS_START_LOG_FILE}'
ExecStart=/bin/sh -c 'echo "$(date) Enable RFC feature" >> ${PARODUS_START_LOG_FILE}'

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings April 21, 2026 06:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings April 21, 2026 10:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread systemd_units/rfc.service
[Service]
Type=oneshot
ExecStartPre=/bin/sh -c 'sleep 300'
ExecStartPre=/bin/sh -c 'echo "RFC execPre START: $(date)"; sleep 300; echo "RFC execPre END: $(date)"'
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

ExecStartPre is doing three actions (log, sleep, log) via a shell -c string. For systemd units this is harder to reason about and makes it difficult to adjust timeouts/ordering later. Consider splitting this into multiple ExecStartPre= directives (systemd runs them sequentially) and/or using native commands (e.g., ExecStartPre=/bin/sleep 300) so each step is separately visible and failure behavior is clearer.

Suggested change
ExecStartPre=/bin/sh -c 'echo "RFC execPre START: $(date)"; sleep 300; echo "RFC execPre END: $(date)"'
ExecStartPre=/bin/sh -c 'echo "RFC execPre START: $(date)"'
ExecStartPre=/bin/sleep 300
ExecStartPre=/bin/sh -c 'echo "RFC execPre END: $(date)"'

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings April 22, 2026 07:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread systemd_units/rfc.service
ExecStart=/bin/sh -c '/lib/rdk/rfc.service &'
ExecStart=/bin/sh -c 'echo " $(date) Enable RFC feature" >> ${PARODUS_START_LOG_FILE}'
ExecStart=/bin/sh -c 'echo "SYSTEMD CALL $(date)" >> /rdklogs/logs/rfc_trace.log'
ExecStart=/bin/sh -c 'echo "RFC execStart START: $(date)"; /lib/rdk/rfc.service &'
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

Running the main service script in the background ('&') under Type=oneshot means systemd won’t reliably track the long-running process, and the unit can report success even if /lib/rdk/rfc.service fails immediately. Prefer letting systemd manage the process directly (e.g., Type=simple with ExecStart=/lib/rdk/rfc.service, or Type=forking with a PIDFile if it daemonizes) so restarts/status reflect the real process state.

Copilot uses AI. Check for mistakes.
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