Skip to content

Commit bb95a91

Browse files
MichaelUrayclaude
andcommitted
[fix] Retry pending report_status instead of forcing re-download openwisp#251
When report_status fails after a configuration apply (e.g. due to a transient HTTP 502 from the controller), the agent previously deleted the local checksum files to trigger a full re-download on the next cycle. That worked but wasted bandwidth and caused the controller to stay stuck on "modified" until the next real config change. Instead persist the unreported status in a pending_report marker file and retry just report_status on the next polling cycle. Key details addressed from the review: - Define retry_pending_report as a shell function so "local" is valid on BusyBox ash, where "local" outside a function is a parse error that silently crashes the script mid-loop. - Persist the marker BEFORE calling retry_with_backoff report_status so a crash or reboot between the retry attempt and the PENDING_REPORT write does not lose the status. - Validate the marker contents against the known-good status set (applied/error) and discard a malformed marker rather than retrying forever. - Only remove the marker after a successful report_status. Closes openwisp#251 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d3b6ae1 commit bb95a91

2 files changed

Lines changed: 287 additions & 236 deletions

File tree

0 commit comments

Comments
 (0)