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
58d2d9ad
Commit
58d2d9ad
authored
Mar 29, 2017
by
Kubernetes Submit Queue
Committed by
GitHub
Mar 29, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #43836 from yujuhong/kubeadm-cleanup
Automatic merge from submit-queue (batch tested with PRs 43508, 43836) kubeadm: clean up exited containers and network checkpoints
parents
05cd33b2
434fba9e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
reset.go
cmd/kubeadm/app/cmd/reset.go
+2
-2
No files found.
cmd/kubeadm/app/cmd/reset.go
View file @
58d2d9ad
...
...
@@ -107,14 +107,14 @@ func (r *Reset) Run(out io.Writer) error {
dockerCheck
:=
preflight
.
ServiceCheck
{
Service
:
"docker"
,
CheckIfActive
:
true
}
if
warnings
,
errors
:=
dockerCheck
.
Check
();
len
(
warnings
)
==
0
&&
len
(
errors
)
==
0
{
fmt
.
Println
(
"[reset] Removing kubernetes-managed containers"
)
if
err
:=
exec
.
Command
(
"sh"
,
"-c"
,
"docker ps
| grep 'k8s_' | awk '{print $1}'
| xargs -r docker rm --force --volumes"
)
.
Run
();
err
!=
nil
{
if
err
:=
exec
.
Command
(
"sh"
,
"-c"
,
"docker ps
-a --filter name=k8s_ -q
| xargs -r docker rm --force --volumes"
)
.
Run
();
err
!=
nil
{
fmt
.
Println
(
"[reset] Failed to stop the running containers"
)
}
}
else
{
fmt
.
Println
(
"[reset] docker doesn't seem to be running, skipping the removal of running kubernetes containers"
)
}
dirsToClean
:=
[]
string
{
"/var/lib/kubelet"
,
"/etc/cni/net.d"
}
dirsToClean
:=
[]
string
{
"/var/lib/kubelet"
,
"/etc/cni/net.d"
,
"/var/lib/dockershim"
}
// Only clear etcd data when the etcd manifest is found. In case it is not found, we must assume that the user
// provided external etcd endpoints. In that case, it is his own responsibility to reset etcd
...
...
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