mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-04-24 04:55:42 +00:00
Disable healthchecks failing on report errors
State report errors contribute to the supervisor failing healthchecks and being restarted by the engine. There is not evidence of this improving the connectivity situation and it is likely to make things worst for the API as the first report is much more expensive than subsequent partial reports. Change-type: patch Closes: #1986
This commit is contained in:
parent
86112e59bf
commit
0c4e6ce421
@ -20,6 +20,12 @@ import { shallowDiff, prune, empty } from '../lib/json';
|
||||
|
||||
let lastReport: DeviceState = {};
|
||||
let lastReportTime: number = -Infinity;
|
||||
|
||||
// TODO: This counter is read by the healthcheck to see if the
|
||||
// supervisor is having issues to connect. We have removed the
|
||||
// lines of code to increase the counter on network error as
|
||||
// we suspect that is really making things worst. This will
|
||||
// most likely get removed in the future.
|
||||
export let stateReportErrors = 0;
|
||||
|
||||
type StateReportOpts = {
|
||||
@ -119,10 +125,6 @@ function handleRetry(retryInfo: OnFailureInfo) {
|
||||
eventTracker.track('Device state report failure', {
|
||||
error: retryInfo.error?.message ?? retryInfo.error,
|
||||
});
|
||||
|
||||
// Increase the counter so the healthcheck gets triggered
|
||||
// if too many connectivity errors occur
|
||||
stateReportErrors++;
|
||||
}
|
||||
log.info(
|
||||
`Retrying current state report in ${retryInfo.delay / 1000} seconds`,
|
||||
|
Loading…
x
Reference in New Issue
Block a user