Bug 1285702
| Summary: | "--grace-period" option does not take effect for oc replace | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Xingxing Xia <xxia> |
| Component: | Node | Assignee: | Jan Chaloupka <jchaloup> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Jianwei Hou <jhou> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | unspecified | CC: | aos-bugs, ccoleman, gblomqui, jokerman, mmccomas, xxia |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-07-03 14:54:23 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: | |||
|
Description
Xingxing Xia
2015-11-26 10:09:49 UTC
Is your expectation that 'oc replace' should wait for the deleted resource to actually be deleted (respecting grace period) before it should attempt to create the replacement resource? Is this still happening in the latest version of Origin? (In reply to Andy Goldstein from comment #1) > Is your expectation that 'oc replace' should wait for the deleted resource > to actually be deleted (respecting grace period) before it should attempt to > create the replacement resource? > > Is this still happening in the latest version of Origin? Yes, that is my expectation. This bug still reproduces when testing with: $ openshift version openshift v1.3.0-alpha.0-586-gcd9ea84 kubernetes v1.3.0-alpha.1-331-g0522e63 etcd 2.3.0 Clayton, any insight on the behavior here? # oc version oc v1.3.0-alpha.2-260-g1b04cb2 kubernetes v1.3.0-alpha.3-599-g2746284 Still reproducible with. On debugging. Will have to dig more into the request builder. However, 1) the replace first deletes the pod 2) the replace does not wait for pod to be deleted (if the grace-period is set) 3) the replace wants to create a pod with the same name which is not possible is the name is still used Still, what should be the default behaviour of the replace command? If you set the grace period to 5s, the replace command can wait for 5 second and then request for a pod to be created. However, if you choose the period 1h, the replace command will hang for an hour before it sends a request for a new pod. I don't think the replace command was designed to work with grace period. Any thoughts? IIRC, in the earlier times of k8s, the pod was deleted right away (just guessing). Anyway, the is not related to --grace-period at all. You will end up in the same situation just with ``oc replace -f mypod.json --force``. pod "mypod" deleted Error from server: pods "mypod" already exists occurs only when you use the --force option. Reproducible in the master HEAD of kubernetes as well. Upstream issue reported [1]. This bug consists of two parts: 1). make the --force option work again 2). make the --force option work with --grace-period [1] https://github.com/kubernetes/kubernetes/issues/28115 Fixed upstream. PR from comment #11 merged ~3 years ago The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days |