From 4eefdbea7b5bf27fe5cec06da898864d3a27b1e2 Mon Sep 17 00:00:00 2001 From: wulonghui Date: Tue, 3 Nov 2015 17:34:25 +0800 Subject: [PATCH] Delete all files and all hidden files without . & .. error for PV recycler --- pkg/volume/plugins.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/volume/plugins.go b/pkg/volume/plugins.go index 1c8b1d48230f..f0c04945c9d4 100644 --- a/pkg/volume/plugins.go +++ b/pkg/volume/plugins.go @@ -405,7 +405,7 @@ func NewPersistentVolumeRecyclerPodTemplate() *api.Pod { Name: "pv-recycler", Image: "gcr.io/google_containers/busybox", Command: []string{"/bin/sh"}, - Args: []string{"-c", "test -e /scrub && echo $(date) > /scrub/trash.txt && rm -rf /scrub/* /scrub/.* && test -z \"$(ls -A /scrub)\" || exit 1"}, + Args: []string{"-c", "test -e /scrub && echo $(date) > /scrub/trash.txt && find /scrub -mindepth 1 -maxdepth 1 -delete && test -z \"$(ls -A /scrub)\" || exit 1"}, VolumeMounts: []api.VolumeMount{ { Name: "vol",