forked from neuvector/neuvector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NVSHAS-8502 add TTL to installation ID cache
In this commit, a TTL is added to installation ID. In the default fresh install scenario, 3 controllers will start by determing who should be the bootstrap controller. "neuvector-svc-controller" service will be resolved during the process, and the controller that gets only one IP address and owns the IP address will be the winner/leader. The winner will use "--bootstrap" as its consul process' arguments. Check cluster.StartCluster() for detail. However, depending on CNI implementation, there is no guarantee that only one controller will meet that criteria. Therefore, two consul instances with "--bootstrap" flag could be created. Unfortunately, consul doesn't allow two instances with "--bootstrap" flag to join together. In that case, split brain will happen and installation ID can be inconsistent among these nodes. While this split-brain is fixable via an upgrade, installation ID will not be consistent until all consul nodes join. While we can wait for some time, it's hard to determine when installation ID has become consistent. By giving the cache TTL, we provide it a chance to recover from this condition.
- Loading branch information
1 parent
2c45dc5
commit 659c57d
Showing
4 changed files
with
59 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters