Commit c3c98319 authored by Brad Davidson's avatar Brad Davidson Committed by Brad Davidson

Add temporary fix for issue with interrupted etcd promote

parent 373449ec
...@@ -53,6 +53,12 @@ func (c *Cluster) shouldBootstrapLoad(ctx context.Context) (bool, error) { ...@@ -53,6 +53,12 @@ func (c *Cluster) shouldBootstrapLoad(ctx context.Context) (bool, error) {
// If the database is initialized we skip bootstrapping; if the user wants to rejoin a // If the database is initialized we skip bootstrapping; if the user wants to rejoin a
// cluster they need to delete the database. // cluster they need to delete the database.
logrus.Infof("Managed %s cluster bootstrap already complete and initialized", c.managedDB.EndpointName()) logrus.Infof("Managed %s cluster bootstrap already complete and initialized", c.managedDB.EndpointName())
// This is a workaround for an issue that can be caused by terminating the cluster bootstrap before
// etcd is promoted from learner. Odds are we won't need this info, and we don't want to fail startup
// due to failure to retrieve it as this will break cold cluster restart, so we ignore any errors.
if c.config.JoinURL != "" && c.config.Token != "" {
c.clientAccessInfo, _ = clientaccess.ParseAndValidateTokenForUser(c.config.JoinURL, c.config.Token, "server")
}
return false, nil return false, nil
} else if c.config.JoinURL == "" { } else if c.config.JoinURL == "" {
// Not initialized, not joining - must be initializing (cluster-init) // Not initialized, not joining - must be initializing (cluster-init)
......
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