Actions
Bug #5523
open[Crunch] crunchstat should not report errors during normal timing races
Start date:
05/07/2015
Due date:
% Done:
50%
Estimated time:
(Total: 0.00 h)
Story points:
0.5
Description
Container stat files appear and disappear in normal operation. In the "normal" cases, such events should not be logged (let alone as an error).
We expect zero or one episode of "cannot find stats file" when cidfile != "" and we're collecting stats for the first time.- If the first collection attempt for a given statistic results in "cannot find file", we should block in OpenStatFile and poll quickly over a short interval (say, every 100ms, max 1s) because we probably just won the race with the container setup process.
- If the stat files don't show up within that max interval (~1s) it means something is wrong, and this should (still) be logged.
- The first time this occurs, we should not log anything.
- The second time this occurs, we should log "warning: stats file disappeared {duration} ago, but child has not exited".
- The third+ time this occurs, we should not log anything.
- If the stat file reappears, we should reset the "went missing" counter to zero.
Actions