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
2ba93472
Commit
2ba93472
authored
Jan 14, 2017
by
bruceauyeung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resetting cluster should check whether docker service is active
Signed-off-by:
bruceauyeung
<
ouyang.qinhua@zte.com.cn
>
parent
52a6ad0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
reset.go
cmd/kubeadm/app/cmd/reset.go
+1
-1
No files found.
cmd/kubeadm/app/cmd/reset.go
View file @
2ba93472
...
...
@@ -108,7 +108,7 @@ func (r *Reset) Run(out io.Writer) error {
fmt
.
Printf
(
"[reset] Failed to unmount mounted directories in /var/lib/kubelet: %s
\n
"
,
string
(
umountOutputBytes
))
}
dockerCheck
:=
preflight
.
ServiceCheck
{
Service
:
"docker"
}
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
{
...
...
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