fix: prevent liveness probes from preventing scaling to zero#123
fix: prevent liveness probes from preventing scaling to zero#123eznix86 wants to merge 1 commit intoctrox:mainfrom
Conversation
|
I don't really understand how this would fix liveness probes preventing scaledown. The referenced issue was most likely already fixed in #89, it's just that I never heard back from the reporter. If the checkpoint is successful it will set the state to scaled down, in all other cases not. If we set it to scaled down before the checkpoint is done, we are changing the state too early and even if we roll back it will lead to a flapping state on failed checkpoints. |
| beforeCheckpoint := time.Now() | ||
| c.setScaledDownFlag(true) | ||
| defer func() { | ||
| if retErr != nil { |
There was a problem hiding this comment.
retErr is always nil or am I missing something?
There was a problem hiding this comment.
sorry i was testing something forgot to remove it.
Actually the problem appeared when i tested nginx with a liveness probe, when the nginx was scaled down, it was on crashbackloop. Then i tried to look for the problem and ended here. (At least thats the reason of the fix) |
fixes #86 . The shim now flips its scaledDown flag before calling CRIU