Commit 57ed39a4 authored by Brad Davidson's avatar Brad Davidson Committed by Brad Davidson

Skip initial datastore reconcile during cluster-reset

Signed-off-by: 's avatarBrad Davidson <brad.davidson@rancher.com> (cherry picked from commit 7ecd5874) Signed-off-by: 's avatarBrad Davidson <brad.davidson@rancher.com>
parent c62308b7
......@@ -31,7 +31,7 @@ import (
// Bootstrap attempts to load a managed database driver, if one has been initialized or should be created/joined.
// It then checks to see if the cluster needs to load bootstrap data, and if so, loads data into the
// ControlRuntimeBoostrap struct, either via HTTP or from the datastore.
func (c *Cluster) Bootstrap(ctx context.Context, snapshot bool) error {
func (c *Cluster) Bootstrap(ctx context.Context, clusterReset bool) error {
if err := c.assignManagedDriver(ctx); err != nil {
return err
}
......@@ -43,7 +43,7 @@ func (c *Cluster) Bootstrap(ctx context.Context, snapshot bool) error {
c.shouldBootstrap = shouldBootstrap
if c.managedDB != nil {
if !snapshot {
if !clusterReset {
isHTTP := c.config.JoinURL != "" && c.config.Token != ""
// For secondary servers, we attempt to connect and reconcile with the datastore.
// If that fails we fallback to the local etcd cluster start
......
......@@ -251,7 +251,7 @@ func prepare(ctx context.Context, config *config.Control) error {
cluster := cluster.New(config)
if err := cluster.Bootstrap(ctx, false); err != nil {
if err := cluster.Bootstrap(ctx, config.ClusterReset); err != nil {
return err
}
......
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