Commit 261dffe
committed
fix: retry pending report_status instead of forcing re-download
When report_status fails due to a transient server error (e.g., HTTP
502 during server maintenance), the agent previously deleted its local
checksums, forcing a full re-download and re-apply on the next cycle.
This is wasteful since the configuration was already applied
successfully.
Instead, save the pending status to a marker file and retry
report_status on the next polling cycle without re-downloading.
This ensures the controller receives the status update as soon as the
server recovers, without unnecessary network traffic or config
re-application.
Backward compatible: older controllers will simply receive the
delayed report_status and update their status accordingly.1 parent d3b6ae1 commit 261dffe
1 file changed
Lines changed: 25 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| |||
825 | 826 | | |
826 | 827 | | |
827 | 828 | | |
| 829 | + | |
828 | 830 | | |
829 | 831 | | |
830 | 832 | | |
| |||
833 | 835 | | |
834 | 836 | | |
835 | 837 | | |
| 838 | + | |
836 | 839 | | |
837 | 840 | | |
| 841 | + | |
838 | 842 | | |
839 | 843 | | |
840 | | - | |
| 844 | + | |
| 845 | + | |
841 | 846 | | |
842 | 847 | | |
843 | | - | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
844 | 854 | | |
845 | 855 | | |
846 | 856 | | |
| |||
987 | 997 | | |
988 | 998 | | |
989 | 999 | | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
990 | 1013 | | |
991 | 1014 | | |
992 | 1015 | | |
| |||
0 commit comments