Bug 1562961
Summary: | Unable to force delete of zombie resources (including projects) | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Thom Carlin <tcarlin> |
Component: | oc | Assignee: | Maciej Szulik <maszulik> |
Status: | CLOSED ERRATA | QA Contact: | Xingxing Xia <xxia> |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 3.7.1 | CC: | aos-bugs, cshereme, grodrigu, jokerman, maszulik, mmccomas, tcarlin |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | 3.10.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
Cause:
Force delete was not properly passed to the server.
Consequence:
Some resources could not be removed.
Fix:
Properly pass force deletion option to the server when removing an object.
Result:
Force delete is working as expected.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2019-03-14 02:15:34 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: | 1724792 |
Description
Thom Carlin
2018-04-02 19:09:32 UTC
cc'ing Jordan for advice Possible workaround: * oc project <<project_name>> * oc delete <<resource_type>> <<resource_name>> --grace-period=0 --force Can you provide the full yaml of the pod which is stuck in unknown state? Sorry, not atm - the workaround in comment 2 removed it You can see the source at https://github.com/jbossdemocentral/coolstore-microservice but it a bit of a slog to find the underlying yaml. If it reoccurs, I'll update this bz. Lowering severity per workaround from comment 2. Will investigate this a bit more once it is able to be reproduced again. My mistake, there are multiple KCS articles (now attached) and related bzs. Since we have valid ways of accomplishing the reported case, closing this bz. Added the pod yaml in private attachment from a similar situation. In this case, trying a node upgrade resulted in the "Drain Node" hanging overnight on a 3.6 system. As with the above, following comment 2 to delete the offending pod allowed the Ansible script to continue. Reopening --force on its own won't do anything, there's a PR upstream [1] that updates the information so that it's clear that for forceful deletion you need to specify both --force and --grace-period=0 otherwise this deletion is nothing more than a regular oc delete call. [1] https://github.com/kubernetes/kubernetes/pull/61378 Picked PR from comment 9 into Origin [1]. Adds additional warnings to the `delete` command when using --force with a non-zero grace period. 1. https://github.com/openshift/origin/pull/19213 Verified in oc v3.10.0-0.54.0, --force only, or --force --grace-period non-zero have warning $ oc delete --force pod mydc-1-jh6pv warning: --force is ignored because --grace-period is not 0 pod "mydc-1-jh6pv" deleted $ oc delete --force --grace-period=5 pod mydc-1-jh6pv warning: --force is ignored because --grace-period is not 0. pod "mydc-1-jh6pv" deleted $ oc get pod NAME READY STATUS RESTARTS AGE mydc-1-jh6pv 1/1 Terminating 0 9m $ oc delete --force --grace-period=0 pod mydc-1-jh6pv warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely. pod "mydc-1-jh6pv" force deleted $ oc get pod | grep mydc-1-jh6pv # none Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:0405 |