Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
7ecd5874
Commit
7ecd5874
authored
Nov 15, 2023
by
Brad Davidson
Committed by
Brad Davidson
Nov 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip initial datastore reconcile during cluster-reset
Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
parent
2088218c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
bootstrap.go
pkg/cluster/bootstrap.go
+2
-2
server.go
pkg/daemons/control/server.go
+1
-1
No files found.
pkg/cluster/bootstrap.go
View file @
7ecd5874
...
...
@@ -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
,
snapsho
t
bool
)
error
{
func
(
c
*
Cluster
)
Bootstrap
(
ctx
context
.
Context
,
clusterRese
t
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
!
snapsho
t
{
if
!
clusterRese
t
{
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
...
...
pkg/daemons/control/server.go
View file @
7ecd5874
...
...
@@ -262,7 +262,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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment