Commit c09142a3 authored by Brian Downs's avatar Brian Downs

put etcd bootstrap save call in goroutine and update comment

parent 62839b30
...@@ -96,13 +96,18 @@ func (c *Cluster) Start(ctx context.Context) (<-chan struct{}, error) { ...@@ -96,13 +96,18 @@ func (c *Cluster) Start(ctx context.Context) (<-chan struct{}, error) {
return nil, err return nil, err
} }
// at this point, if etcd is in use, it's up, ready, // at this point, if etcd is in use, it's bootstrapping is complete
// and bootstrapping is complete so save the bootstrap // so save the bootstrap data. We will need for etcd to be up. If
// data // the save call returns an error, we panic since subsequent etcd
// snapshots will be empty.
if c.managedDB != nil { if c.managedDB != nil {
if err := c.save(ctx); err != nil { go func() {
return nil, err for range ready {
} if err := c.save(ctx); err != nil {
panic(err)
}
}
}()
} }
return ready, nil return ready, nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment