Skip to content

Commit dba49fb

Browse files
authored
Merge pull request kubernetes-sigs#563 from jiazhang0/fix-force-rm
Fix removal of container forcibly
2 parents a9996ab + caa52af commit dba49fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/crictl/container.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ var removeContainerCommand = cli.Command{
304304
}
305305
if resp.GetStatus().GetState() == pb.ContainerState_CONTAINER_RUNNING {
306306
if ctx.Bool("force") {
307-
if err := RemoveContainer(runtimeClient, id); err != nil {
307+
if err := StopContainer(runtimeClient, id, 0); err != nil {
308308
logrus.Errorf("stopping the container %q failed: %v", id, err)
309309
errored = true
310310
continue

0 commit comments

Comments
 (0)