deis / router

Edge router for Deis Workflow

Home Page:https://deis.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: "known" model shouldn't be refreshed if Nginx reload failed

krancour opened this issue · comments

See following lines:

router/router.go

Lines 53 to 54 in b33c18c

nginx.Reload()
known = routerConfig

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.

cc @monaka @ultimateboy