-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Simplify cluster startup for scripting and deployment #5602
Merged
Conversation
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
corylanou
force-pushed
the
cluster-startup
branch
2 times, most recently
from
February 10, 2016 21:35
1c31896
to
bb7d548
Compare
corylanou
changed the title
WIP - Cluster startup
Simplify cluster startup for scripting and deployment
Feb 11, 2016
corylanou
force-pushed
the
cluster-startup
branch
from
February 11, 2016 14:15
a181a7e
to
fbf0696
Compare
@@ -645,13 +652,16 @@ func (s *Server) initializeMetaClient() error { | |||
if err := s.MetaClient.Open(); err != nil { | |||
return err | |||
} | |||
|
|||
if s.TSDBStore != nil { | |||
for { |
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.
Not sure if this is preferable or not, but an alternative to the break
/continue
stuff could be:
n, err := s.MetaClient.CreateDataNode(s.httpAPIAddr, s.tcpAddr)
for ; err != nil; n, err = s.MetaClient.CreateDataNode(s.httpAPIAddr, s.tcpAddr) {
log.Printf("Unable to create data node. retry in 1s: %s", err.Error())
time.Sleep(time.Second)
}
s.Node.ID = n.ID
or even:
n, err := s.MetaClient.CreateDataNode(s.httpAPIAddr, s.tcpAddr)
for err != nil {
log.Printf("Unable to create data node. retry in 1s: %s", err.Error())
time.Sleep(time.Second)
n, err = s.MetaClient.CreateDataNode(s.httpAPIAddr, s.tcpAddr)
}
s.Node.ID = n.ID
corylanou
force-pushed
the
cluster-startup
branch
from
February 12, 2016 14:08
fbf0696
to
a0282c5
Compare
👍 Maybe squash the WIP commit of mine though? |
corylanou
force-pushed
the
cluster-startup
branch
2 times, most recently
from
February 12, 2016 17:54
6c1f87f
to
7b357da
Compare
LGTM 👍 |
jwilder
force-pushed
the
cluster-startup
branch
from
February 12, 2016 18:31
7b357da
to
3c25b67
Compare
…ned to the available pool
No longer needed now that peers are pull from the meta nodes.
jwilder
force-pushed
the
cluster-startup
branch
from
February 12, 2016 18:35
3c25b67
to
7ad31fa
Compare
jwilder
added a commit
that referenced
this pull request
Feb 12, 2016
Simplify cluster startup for scripting and deployment
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR will allow the specifying of the meta nodes with the
-join
argument. It will require that you specify all current nodes for restart. These arguments no longer need to change between restarts.Example of starting a 3 node meta/data cluster:
Will result in this server configuration:
This has also been tested with bringing up a cluster, and then having a new node join.
Wait for the cluster to be healthy:
Join new node. Notice you need to specify all nodes in the
-join
argumentAlso, to restart nodes 1 and 2, you now need to pass all three nodes. This is typically done via scripted automation.