RDKB-64864: [Sprint][Automation] syscfg_recover.sh is not present in crontab - #415
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Ensure the recovery entry is added to existing crontabs without duplication.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds a five-minute resource_monitor_recover.sh cron job to improve recovery monitoring.
Changes:
- Adds the recovery script to the generated crontab.
- Keeps the existing recovery scheduling configuration.
File summaries
| File | Summary |
|---|---|
source/scripts/init/service.d/service_crond.sh |
The cron entry may not be added when the existing crontab setup bypasses the initialization guard. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
08359ae to
1a089bd
Compare
1a089bd to
cbdc556
Compare
…crontab Reason for change: Made changes to ensure resource_monitor_recover.sh is added to crontab Test Procedure: Verification of resource_monitor_recover script entry in CRONTAB. Tested in both cron and non-cron mode. Risks: Low Priority: P1 Signed-off-by: jmathe064 <Jestin_Mathew@comcast.com>
cbdc556 to
865a3e4
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
Recovery entries do not reliably repair existing crontabs, and the syscfg recovery requirement is not implemented.
Review details
Suppressed comments (2)
source/scripts/init/service.d/service_crond.sh:196
- This
fistill leaves both recovery entries inside the outer initialization guard at line 66. If$CRONTAB_FILEalready exists—which is precisely the case for devices whose existing crontab is missing this entry—the body containing theseechocommands is skipped, so the change never repairs that crontab. Add the recovery rules through an idempotent path that runs for existing crontabs as well (without duplicating them).
fi
source/scripts/init/service.d/service_crond.sh:196
- The
syscfg_recover.shecho at line 204 is outside the self-heal conditional in both versions and is unchanged; moving thisfionly changes whetherresource_monitor_recover.shis emitted. If the PR title's syscfg-recovery issue is the intended requirement, this diff does not implement that behavior.
fi
- Files reviewed: 1/1 changed files
- Comments generated: 0 new
- Review effort level: Lite
There was a problem hiding this comment.
🟡 Changes recommended
Existing crontabs may still not receive the recovery entry because the code remains behind the one-time initialization guard.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (1)
source/scripts/init/service.d/service_crond.sh:196
- This relocation still leaves the recovery-job echo inside the one-time initialization guard at line 66 (
if [ ! -e $CRONTAB_FILE ] || [ ! -e /etc/cron/cron.monthly ]). On an existing device whose crontab lacks this entry, that guard is false, so this code is skipped and the missing job is never added. Please make the entry (and the syscfg entry) idempotently ensured on every start, or extend the guard to detect missing entries.
fi
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
|
|
||
| else | ||
| echo_t "Selfheal cron is disabled" | ||
| fi |
…crontab (#244) RDKB-64864: [Sprint][Automation] syscfg_recover.sh is not present in crontab Reason for change: Made changes to ensure resource_monitor_recover.sh is added to crontab Test Procedure: Verification of resource_monitor_recover script entry in CRONTAB. Risks: Low Priority: P1 Corresponding changes in PR rdkcentral/utopia#415 Signed-off-by: jmathe064 <Jestin_Mathew@comcast.com> Co-authored-by: jmathe064 <Jestin_Mathew@comcast.com> Co-authored-by: Santosh Nayak <70348540+snayak002c@users.noreply.github.com>
RDKB-64864: [Sprint][Automation] syscfg_recover.sh is not present in crontab
Reason for change: Made changes to ensure resource_monitor_recover.sh is added to crontab
Test Procedure:
Verification of resource_monitor_recover script entry in CRONTAB.
Risks: Low
Priority: P1
Corresponding changes in PR rdkcentral/test-and-diagnostic#244