-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic Server Lists/Client Bootstrapping #1201
Conversation
return 16384 | ||
} | ||
|
||
func testManager() (m *servers.Manager) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a number of objects in the tests that need to be renamed.
0a99ea4
to
6f7379d
Compare
Addr string `mapstructure:"address"` | ||
|
||
// Timeout is used by Consul HTTP Client | ||
Timeout time.Duration `mapstructure:"timeout"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verify that specification timeout: "5s"
works as intended
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed, works with a weak types decoder.
// will begin polling Consul for a list of Nomad Servers. When Nomad | ||
// Clients are heartbeating successfully with Nomad Servers, Nomad | ||
// Clients do not poll Consul for a backup server list. | ||
backupServerDeadline time.Time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consulPullHeartbeatDeadline
|
||
services := make(map[string]struct{}) | ||
// Get the existing allocs | ||
c.allocLock.RLock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getAllocRunners returns a copy. Can you check that all accessors of c.allocs
are using the c.allocLock
This logic was already present elsewhere and was missed in this one place.
…the existing server (vs nil when the server already exists).
…ewServerEndpoint()`
Executors can `Shutdown()` before calling `SyncServices()`.
return mErr.ErrorOrNil() | ||
} | ||
|
||
for i := range dcs { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can probably get rid of this and just use something like: https://play.golang.org/p/BnIufB8mJu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I explicitly did this so that each element is quoted: "foo", "bar"
vs foo, bar
because I wanted to make sure any spaces or non-ascii characters are quoted and escaped. But, good point, I forgot the +
format verb modifier %+q
:
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
This PR includes both the dynamic rebalancing and bootstrap recovery. This is a WIP, tests and docs still need to be worked on.