Bug 1390963

Summary: [infrastructure_public_371]EmptyDir can't be removed when pod become evicted
Product: OpenShift Container Platform Reporter: DeShuai Ma <dma>
Component: NodeAssignee: Seth Jennings <sjenning>
Status: CLOSED ERRATA QA Contact: DeShuai Ma <dma>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.4.0CC: aos-bugs, decarr, jokerman, mmccomas, tdawson, wmeng
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Resolves an issue where pod eviction due to disk pressure did not resolve until the pod was deleted from the API server. This fix causes local storage to be freed on pod termination (i.e. eviction) rather than pod deletion.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-12 19:15:35 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 DeShuai Ma 2016-11-02 10:06:31 UTC
Description of problem:
Trace upstream issue in bugzilla for ocp-3.4
Upstream issue: https://github.com/kubernetes/kubernetes/issues/35406

Version-Release number of selected component (if applicable):
openshift v3.4.0.18+ada983f
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0

How reproducible:
Alwyas

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 DeShuai Ma 2016-11-02 10:07:04 UTC
This will be fixed by https://github.com/kubernetes/kubernetes/pull/35727

Comment 3 Seth Jennings 2017-01-04 19:11:11 UTC
If emptydir is memory backed this will handle it
https://github.com/kubernetes/kubernetes/pull/36779

PR in flight upstream to remove all volume for pods in a terminated state
https://github.com/kubernetes/kubernetes/pull/37228

Comment 5 Seth Jennings 2017-01-25 21:14:33 UTC
Upstream PR has merged
https://github.com/kubernetes/kubernetes/pull/37228

Origin PR
https://github.com/openshift/origin/pull/12669

Comment 6 Troy Dawson 2017-01-31 20:15:28 UTC
This has been merged into ocp and is in OCP v3.5.0.12 or newer.

Comment 7 DeShuai Ma 2017-02-03 09:33:32 UTC
Verified on openshift v3.5.0.14+20b49d0
When pod is terminated, kubelet should remove disk backed emptydir volume.

Steps:
1. Create Failed/Succeeded pods with host disk backed emptyDir volume
$ oc create -f https://raw.githubusercontent.com/mdshuai/testfile-openshift/master/k8s/terminatedpods/emtydir-host.yaml

2. On node, Make sure disk backed emptyDir volume removed when pod become Failed/Succeeded
# ls /var/lib/origin/openshift.local.volumes/pods/${pod.uid}/volumes/kubernetes.io~empty-dir/${volumeName}

Comment 9 errata-xmlrpc 2017-04-12 19:15:35 UTC
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-2017:0884