Bug 1557306

Summary: 'oc delete pods <pod_name> --grace-period=0 --force' does not delete pods in 'unknown' or 'terminating' state
Product: OpenShift Container Platform Reporter: David Caldwell <dcaldwel>
Component: kube-controller-managerAssignee: Stefan Schimanski <sttts>
Status: CLOSED DEFERRED QA Contact: Wang Haoran <haowang>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.7.0CC: aos-bugs, atripath, dcaldwel, decarr, dmoessne, dsulliva, ivanov, jmalde, jokerman, jupierce, mfojtik, mmccomas, nagrawal, openshift-bugs-escalate, rekhan, rkant, rkrawitz, sreber, sychen, zhuchkov.alex
Target Milestone: ---   
Target Release: 3.7.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1599747 1623539 (view as bug list) Environment:
Last Closed: 2019-11-20 18:58:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1599747, 1623539    

Description David Caldwell 2018-03-16 12:09:02 UTC
Description of problem:
Customer found two pods in 'unknown' and 'terminating' state. Tried deleting with oc delete but pods remained. 

Nodes that hosted these pods were evacuated and deleted from the cluster with 'oc delete node <node-name>' and 'usr/share/ansible/openshift-ansible/playbooks/adhoc/uninstall.yml' playbook was run afterwards.

The two pods in terminating and unknown state still appeared in output of oc get pods.

Tried 'oc delete pods <pod_name> --grace-period=0 --force' but pods still listed in oc get pods command as terminating and unknown (see attached screenshot).

In the output of 'oc delete pods <pod_name> --grace-period=0 --force --loglevel=8', the following failure message appears:

'"status":{"phase":"Failed","message":"Node oscp-node1.redacted.com which was running pod keycloak-27-deploy is unresponsive","reason":"NodeLost","startTime":"2018-02-19T19:15:25Z"}}'

Version-Release number of selected component (if applicable):
3.7

How reproducible:
Delete nodes that pods in 'terminating' or 'unknown' state reside on and then try to delete those pods.

Actual results:
Pods not deleted.

Expected results:
Pods deleted.

Additional info:
Attachments in separate comment.

Comment 7 Seth Jennings 2018-04-10 03:45:28 UTC
*** Bug 1535748 has been marked as a duplicate of this bug. ***

Comment 29 Dave Sullivan 2018-04-26 22:11:58 UTC
We had similar problem in 3.6 and used this command to get rid of unruly pods

oc delete po/$pod -n $namespace --grace-period=0 --force=true --ignore-not-found=true

Comment 50 Robert Krawitz 2018-05-08 15:16:35 UTC
Reference bug 1505687

Comment 71 Stephen Cuppett 2019-11-20 18:58:25 UTC
OCP 3.6-3.10 is no longer on full support [1]. Marking CLOSED DEFERRED. If you have a customer case with a support exception or have reproduced on 3.11+, please reopen and include those details. When reopening, please set the Target Release to the appropriate version where needed.

[1]: https://access.redhat.com/support/policy/updates/openshift