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
879150d1
Commit
879150d1
authored
Sep 30, 2020
by
Brad Davidson
Committed by
Brad Davidson
Oct 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add temporary fix for issue with interrupted etcd promote
This is a minimal fix for
https://github.com/rancher/rke2/issues/392
Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
parent
64bfc7c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
bootstrap.go
pkg/cluster/bootstrap.go
+6
-0
No files found.
pkg/cluster/bootstrap.go
View file @
879150d1
...
@@ -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)
...
...
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