Frank Schroeder
018b8d66d6
config: document telemetry options
2017-10-23 08:04:03 +02:00
Frank Schroeder
39dddd433e
local state: remove stale comment
2017-10-23 08:03:18 +02:00
Frank Schroeder
779bf04aa3
local state: make test more robust
2017-10-23 08:03:18 +02:00
Frank Schroeder
e16c8f3982
local state: clone check to avoid side effect
2017-10-23 08:03:18 +02:00
Frank Schroeder
f1028d2486
local state: use synchronized access to internal maps
2017-10-23 08:03:18 +02:00
Frank Schroeder
606e13a569
ae: do not trigger on Resume while holding the lock
2017-10-23 08:03:18 +02:00
Frank Schroeder
82e9494f7f
ae: add remaining test cases
2017-10-23 08:03:18 +02:00
Frank Schroeder
cf6e6c72ac
ae: refactor StateSyncer to state machine for better testing
2017-10-23 08:03:18 +02:00
Frank Schroeder
ba8cb5e3d0
ae: add test that we run a full before a partial sync
2017-10-23 08:03:18 +02:00
Frank Schroeder
0d73333c8e
ae: make control flow more explicit
2017-10-23 08:03:18 +02:00
Frank Schroeder
0cfe0a42f1
ae: fix typo in constructor name
2017-10-23 08:03:18 +02:00
Frank Schroeder
25ee03e165
ae: add test for resume triggering SyncChanges
2017-10-23 08:03:18 +02:00
Frank Schroeder
f61ad4efcd
ae: add test for ifNotPausedRun
2017-10-23 08:03:18 +02:00
Frank Schroeder
c2ab582d47
ae: make stagger function pluggable for testing
2017-10-23 08:03:18 +02:00
Frank Schroeder
f352952fb3
ae: restore previous pause/resume behavior
2017-10-23 08:03:18 +02:00
Frank Schroeder
c1badf1034
ae: ensure that syncs are blocked when paused
2017-10-23 08:03:18 +02:00
Frank Schroeder
a4d03797ae
local state: rename Add{Check,Service}State to Set{Check,Service}State
2017-10-23 08:03:18 +02:00
Frank Schroeder
7414fe0a2a
local state: move Metadata methods together
2017-10-23 08:03:18 +02:00
Frank Schroeder
3e953f67da
local state: update documentation of updateSyncState
2017-10-23 08:03:18 +02:00
Frank Schroeder
ecea35d955
local state: update comments
2017-10-23 08:03:18 +02:00
Frank Schroeder
40e17f9f01
local state: address review comments
...
* move non-blocking notification mechanism into ae.Trigger
* move Pause/Resume into separate type
2017-10-23 08:03:18 +02:00
Frank Schroeder
cfc8bd092f
local state: refactor TestAgentAntiEntropy_EnableTagOverride
...
Make intent clearer by being more explicit and adding some comments.
Use verify.Values to compare service entries.
2017-10-23 08:03:18 +02:00
Frank Schroeder
b288c1eb9b
local state: fix TestAgentAntiEntropy_EnableTagOverride
...
The test had a race condition where it relied on the first service to be
synced to the remote catalog which sometimes failed.
2017-10-23 08:03:18 +02:00
Frank Schroeder
71e4d7cd1c
local state: rename tests
2017-10-23 08:03:18 +02:00
Frank Schroeder
f43972fdc2
local state: drop retry loops from tests
...
Since the tests are now using synchronous calls for state syncing
we no longer need to use retry loops to wait for the changes to
propagate.
2017-10-23 08:03:18 +02:00
Frank Schroeder
3d10312cd6
agent: skip non-sensical TestCatalogRegister
...
It is not clear what this test is supposed to verify.
2017-10-23 08:03:18 +02:00
Frank Schroeder
2bef1d4d51
local state: fix anti-entropy state tests
...
The anti-entropy tests relied on the side-effect of the StartSync()
method to perform a full sync instead of a partial sync. This lead to
multiple anti-entropy go routines being started unnecessary retry loops.
This change changes the behavior to perform synchronous full syncs when
necessary removing the need for all of the time.Sleep and most of the
retry loops.
2017-10-23 08:03:18 +02:00
Frank Schroeder
36677bc90d
local state: fix test with updated error message
2017-10-23 08:03:18 +02:00
Frank Schroeder
37c8492e5e
local state: fix failing tests
2017-10-23 08:03:18 +02:00
Frank Schroeder
884f98f8aa
local state: tests compile
2017-10-23 08:03:18 +02:00
Frank Schroeder
60095484c4
local state: replace multi-map state with structs
...
The state of the service and health check records was spread out over
multiple maps guarded by a single lock. Access to the maps has to happen
in a coordinated effort and the tests often violated this which made
them brittle and racy.
This patch replaces the multiple maps with a single one for both checks
and services to make the code less fragile.
This is also necessary since moving the local state into its own package
creates circular dependencies for the tests. To avoid this the tests can
no longer access internal data structures which they should not be doing
in the first place.
The tests still don't compile but this is a ncessary step in that
direction.
2017-10-23 08:03:18 +02:00
Frank Schroeder
ef9aa6b3b6
local state: move to separate package
...
This patch moves the local state to a separate package to further
decouple it from the agent code.
The code compiles but the tests do not yet.
2017-10-23 08:03:18 +02:00
Frank Schroeder
c03eba91d0
agent: simplify some loops
2017-10-23 08:03:18 +02:00
Frank Schroeder
98e5dc86fb
agent: refactor sync loop to linear flow of control
2017-10-23 08:03:18 +02:00
Frank Schroeder
5302479ad5
agent: cleanup StateSyncer
...
This patch cleans up the state syncer code by renaming fields, adding
helpers and documentation.
2017-10-23 08:03:18 +02:00
Frank Schroeder
034ee43cef
agent: decouple anti-entropy from local state
...
The anti-entropy code manages background synchronizations of the local
state on a regular basis or on demand when either the state has changed
or a new consul server has been added.
This patch moves the anti-entropy code into its own package and
decouples it from the local state code since they are performing
two different functions.
To simplify code-review this revision does not make any optimizations,
renames or refactorings. This will happen in subsequent commits.
2017-10-23 08:03:18 +02:00
James Phillips
7a002aa047
Changes "ip" to "IP".
2017-10-23 08:01:25 +02:00
Frank Schroeder
6cbae33076
doc: address review comment
2017-10-23 08:01:25 +02:00
Frank Schroeder
6df6ac03b7
config: do not allow an ANY address as DNS recursor
2017-10-23 08:01:25 +02:00
Frank Schroeder
19cc7db779
doc: update docs for dns recursor go-sockaddr templates
2017-10-23 08:01:25 +02:00
Frank Schroeder
3b13290144
config: add support for go-sockaddr templates for DNS recursors
...
DNS recursors can be added through go-sockaddr templates. Entries
are deduplicated while the order is maintained.
Originally proposed by @taylorchu
See #2932
2017-10-23 08:01:25 +02:00
James Phillips
89f47d82fc
Tweaks watch docs.
2017-10-21 20:09:37 -07:00
James Phillips
2e7d048345
Cleans up import sorting.
2017-10-21 20:08:11 -07:00
James Phillips
e38d53f3c2
Update CHANGELOG.md
2017-10-21 20:03:58 -07:00
preetapan
164baa853e
Update CHANGELOG.md
2017-10-21 21:30:04 -05:00
preetapan
75b02e3baf
Update CHANGELOG.md
2017-10-21 21:28:58 -05:00
Preetha Appan
ad8b9171d6
Update serf library to pick up coordinate persistence fix
2017-10-21 21:19:43 -05:00
preetapan
669c109d27
Update CHANGELOG.md
2017-10-21 21:08:34 -05:00
preetapan
3ef628387a
Update CHANGELOG.md
2017-10-21 21:07:30 -05:00
preetapan
68d8cd16b7
Update watches.html.md
2017-10-21 20:59:47 -05:00