Bug 1395160 - recycler pods fails on NFS with undeletable .snapshot folders [NEEDINFO]
Summary: recycler pods fails on NFS with undeletable .snapshot folders
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: RFE
Version: 3.3.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Bradley Childs
QA Contact: Xiaoli Tian
URL:
Whiteboard:
: 1397968 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-15 10:07 UTC by Javier Ramirez
Modified: 2021-08-30 13:24 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-09 16:35:24 UTC
Target Upstream Version:
erjones: needinfo? (bchilds)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 8721 0 None None None 2020-06-08 18:33:40 UTC
Red Hat Knowledge Base (Solution) 2143161 0 None None None 2017-07-27 03:03:04 UTC

Description Javier Ramirez 2016-11-15 10:07:46 UTC
Description of problem:
When PVs are mounted via NFS and the volumes have a .snapdhot dir for the smapshots of the NAS Volume the pod recycler doesnt work - because it can not delete the .snapshot file. Is it possible to exclude the .snapshot directory?

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


How reproducible:
Always

Steps to Reproduce:
1. Have an nfs PV with some .snapshot dir
2. Pod recycler will fail
3.

Actual results:
Pod recycle fails

Expected results:
1. Have a way to exclude this .snapshot directory


Additional info:
Upstream issue reported at : 
https://github.com/openshift/origin/issues/8721

Comment 2 Eric Paris 2016-11-16 13:36:14 UTC
I am calling this a feature request because the recycler, by design, deletes all of the files in a volume before it declares it ready for the next user. It does not know that on some filers or some filesystems there may be magic files or directories which do not contain user data and which might not need to be cleaned up. The recycler needs to delete everything before it can have any confidence that data is not leaking between users.

In this case there is a magic directory `.snapshot` which can be safely left from one user of the volume to another. For us to create some form of 'delete everything except' exclusion configuration is a feature request.

As we are deprecating the recycler entirely and suggest moving to dynamic provisioning with `Deleted` reclaimPolicy I'm not sure we will ever do it, however this should be a RFE to be considered and prioritized.

Alternatively I believe one should be able to create their own custom recycle pod with the necessary logic to ignore .snapshot.

Comment 3 Javier Ramirez 2016-11-16 15:23:16 UTC
(In reply to Eric Paris from comment #2)
> I am calling this a feature request because the recycler, by design, deletes
> all of the files in a volume before it declares it ready for the next user.
> It does not know that on some filers or some filesystems there may be magic
> files or directories which do not contain user data and which might not need
> to be cleaned up. The recycler needs to delete everything before it can have
> any confidence that data is not leaking between users.
> 
> In this case there is a magic directory `.snapshot` which can be safely left
> from one user of the volume to another. For us to create some form of
> 'delete everything except' exclusion configuration is a feature request.
> 
> As we are deprecating the recycler entirely and suggest moving to dynamic
> provisioning with `Deleted` reclaimPolicy I'm not sure we will ever do it,
> however this should be a RFE to be considered and prioritized.
> 
> Alternatively I believe one should be able to create their own custom
> recycle pod with the necessary logic to ignore .snapshot.

Hello Eric, where can I find information about how to do this?

Comment 4 Eric Paris 2016-11-16 20:59:15 UTC
Basically, one would to create a container, which takes as an argument the directory which needs to be cleaned and does the needful.

We do this in:
https://github.com/openshift/origin/blob/master/pkg/cmd/recycle/*.go

And create the container by:
https://github.com/openshift/origin/blob/master/images/recycler/Dockerfile

I've not seen it done...

Comment 5 Dan McPherson 2016-11-23 20:08:14 UTC
*** Bug 1397968 has been marked as a duplicate of this bug. ***

Comment 7 Steve Watt 2017-02-09 16:35:24 UTC
With the advent of dynamic provisioning, the recycler has been deprecated.


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