Skip to content

Commit

Permalink
Fix for router with dynamic config changes not reloading - need to
Browse files Browse the repository at this point in the history
simulate an actual change otherwise router commit doesn't call reload.
And address @mfojtik review comments.
fixes bugz #1612019
  • Loading branch information
ramr committed Aug 7, 2018
1 parent 90695a9 commit 7ad74e0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/router/template/configmanager/haproxy/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -658,11 +658,12 @@ func (cm *haproxyConfigManager) commitRouterConfig() {
cm.commitTimer = nil
cm.lock.Unlock()

// [Re]Adding a blueprint pool route triggers a router state change.
// And calling Commit ensures that the config gets written out.
// Adding (+removing) a new blueprint pool route triggers a router state
// change. And calling Commit ensures that the config gets written out.
route := createBlueprintRoute(routeapi.TLSTerminationEdge)
route.Name = fmt.Sprintf("%v-1", route.Name)
route.Name = fmt.Sprintf("%s-temp-%d", route.Name, time.Now().Unix())
cm.router.AddRoute(route)
cm.router.RemoveRoute(route)

glog.V(4).Infof("Committing associated template router ... ")
cm.router.Commit()
Expand Down

0 comments on commit 7ad74e0

Please sign in to comment.