open-consul/agent/ae
Hans Hasselberg 107e8523a8
agent: ensure node info sync and full sync. (#7189)
This fixes #7020.

There are two problems this PR solves:
  * if the node info changes it is highly likely to get service and check registration permission errors unless those service tokens have node:write. Hopefully services you register don’t have this permission.
  * the timer for a full sync gets reset for every partial sync which means that many partial syncs are preventing a full sync from happening

Instead of syncing node info last, after services and checks, and possibly saving one RPC because it is included in every service sync, I am syncing node info first. It is only ever going to be a single RPC that we are only doing when node info has changed. This way we are guaranteed to sync node info even when something goes wrong with services or checks which is more likely because there are more syncs happening for them.
2020-02-06 15:30:58 +01:00
..
ae.go agent: ensure node info sync and full sync. (#7189) 2020-02-06 15:30:58 +01:00
ae_test.go agent: ensure node info sync and full sync. (#7189) 2020-02-06 15:30:58 +01:00
trigger.go local state: address review comments 2017-10-23 10:56:04 +02:00