Bug: "known" model shouldn't be refreshed if Nginx reload failed
krancour opened this issue · comments
Kent Rancourt commented
See following lines:
Lines 53 to 54 in b33c18c
We should be capturing the error here and setting known = routerConfig
only if reload succeeded (i.e. err != nil
).
Because we're not doing this, what can happen is that Nginx continues serving requests using old configuration (unless reload triggered a fatal error). While Nginx continues serving requests using old config, Router believes Nginx is up to date with config based on the model the router now considers current. This disagreement over current state would continue until some new change results in an updated model.