Bug 1330648 - Pods tmpfs mounts are never removed
Summary: Pods tmpfs mounts are never removed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 3.1.0
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: Seth Jennings
QA Contact: DeShuai Ma
URL:
Whiteboard:
: 1331998 (view as bug list)
Depends On:
Blocks: 1267746
TreeView+ depends on / blocked
 
Reported: 2016-04-26 16:23 UTC by Ivan
Modified: 2020-02-14 17:45 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-18 12:40:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0066 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.4 RPM Release Advisory 2017-01-18 17:23:26 UTC

Description Ivan 2016-04-26 16:23:44 UTC
Description of problem:
Pod tmpfs mounts are not removed after the the pod has shut down. for example the default secret or docker login configs used by builds 


Version-Release number of selected component (if applicable):
3.1.1.-6-33-g81eabcc

How reproducible:
Starting a build. Jump onto the node and performing a mount 

Steps to Reproduce:
1.
2.
3.

Actual results:
- Performing a  mount shows that the tmpfs still exist 


Expected results:
The tmpfs mounts are unmounted

Additional info:

Comment 1 Ivan 2016-04-27 09:42:12 UTC
I was able to reproduce this locally. 

Create a BC and instantiate a build. 

  - These tempfs are owned builders(majority but cannot confirm on customer side just yet )
  - They only get removed when the build is canceled or deleted mid build
  - They never get removed if a build is successful or completed but failed 
  - The only way to remove these "oprhaned" mounted tmpfs to delete the pods that use these secrets. 
  - The kublet will then start umounting them automatically 


Has anyone come across this behaviour before?

Comment 2 Andy Goldstein 2016-04-27 15:35:02 UTC
This is working as designed / has been working this way forever afaik. Paul, can you confirm?

We may need to consider unmounting volumes from pods once they're no longer running, but that would need to be part of the bigger attach/detach refactoring most likely.

Comment 3 Eric Jones 2016-05-03 14:28:02 UTC
*** Bug 1331998 has been marked as a duplicate of this bug. ***

Comment 4 Andy Goldstein 2016-08-10 20:56:26 UTC
Volumes are not unmounted until the pod is deleted. Any possible change to this behavior would come in Kubernetes 1.5 at the earliest.

Comment 5 Paul Morie 2016-10-25 16:53:56 UTC
This is working as designed.

Comment 6 Derek Carr 2016-10-26 18:05:47 UTC
This is working as currently designed, but there is upstream discussion to modify the behavior here:

https://github.com/kubernetes/kubernetes/issues/35406#issuecomment-256101016 

I have asked for all memory backed volumes to be removed when a pod is terminated (and not just removed from apiserver) in order to ensure the memory is actually reclaimed.

Seth is driving this change in Kubernetes 1.5, and we can assess cherry-picking earlier than OCP 3.5 when the fix is identified.

Comment 7 Seth Jennings 2016-11-21 14:53:19 UTC
Upstream Origin PR to fix this:
https://github.com/openshift/origin/pull/11939

Comment 8 Derek Carr 2016-11-28 22:26:15 UTC
Upstream Origin PR for release-1.4:
https://github.com/openshift/origin/pull/12003

Comment 9 Troy Dawson 2016-12-16 21:31:46 UTC
This has been merged into ocp and is in OCP v3.4.0.37 or newer.

Comment 11 DeShuai Ma 2016-12-20 08:34:21 UTC
Verify on openshift v3.4.0.38

Steps:
1. Create pod with emptyDir(medium=Memory),secret,configmap

2. When pod become complete/failed, make sure emptyDir(medium=Memory),secret,configmap volume are removed on node.

Detail step ref cases: https://url.corp.redhat.com/f76d0c7

Comment 12 Takayoshi Tanaka 2016-12-22 01:24:50 UTC
Hi,

Will OpenShift v3.4.0.38 with this fix be released as OpenShift v3.4 planned at Winter 2016  (End of Q4 Start of Q1)? The customer behind this Bugzilla wants to confirm it.

Comment 13 Troy Dawson 2016-12-22 14:34:39 UTC
I cannot verify the date, but it will be in the first release of OpenShift v3.4.

Comment 15 errata-xmlrpc 2017-01-18 12:40:13 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:0066


Note You need to log in before you can comment on or make changes to this bug.