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
9597ea11
Commit
9597ea11
authored
Oct 13, 2023
by
Brad Davidson
Committed by
Brad Davidson
Oct 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start etcd client before ensuring self removal
Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
parent
2291d6d0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
etcd.go
pkg/etcd/etcd.go
+10
-1
No files found.
pkg/etcd/etcd.go
View file @
9597ea11
...
...
@@ -1372,8 +1372,17 @@ func (e *ETCD) GetMembersNames(ctx context.Context) ([]string, error) {
return
memberNames
,
nil
}
// RemoveSelf will remove the member if it exists in the cluster
// RemoveSelf will remove the member if it exists in the cluster. This should
// only be called on a node that may have previously run etcd, but will not
// currently run etcd, to ensure that it is not a member of the cluster.
// This is also called by tests to do cleanup between runs.
func
(
e
*
ETCD
)
RemoveSelf
(
ctx
context
.
Context
)
error
{
if
e
.
client
==
nil
{
if
err
:=
e
.
startClient
(
ctx
);
err
!=
nil
{
return
err
}
}
if
err
:=
e
.
RemovePeer
(
ctx
,
e
.
name
,
e
.
address
,
true
);
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