@@ -27,6 +27,7 @@ import (
27
27
"strings"
28
28
29
29
"github.com/onsi/ginkgo/v2"
30
+
30
31
v1 "k8s.io/api/core/v1"
31
32
"k8s.io/apimachinery/pkg/util/uuid"
32
33
"k8s.io/kubernetes/test/e2e/framework"
@@ -215,7 +216,7 @@ func (l *ltrMgr) cleanupLocalVolumeDirectory(ctx context.Context, ltr *LocalTest
215
216
func (l * ltrMgr ) setupLocalVolumeDirectoryLink (ctx context.Context , node * v1.Node , parameters map [string ]string ) * LocalTestResource {
216
217
hostDir := l .getTestDir ()
217
218
hostDirBackend := hostDir + "-backend"
218
- cmd := fmt .Sprintf ("mkdir %s && ln -s %s %s" , hostDirBackend , hostDirBackend , hostDir )
219
+ cmd := fmt .Sprintf ("mkdir -p %s && ln -s %s %s" , hostDirBackend , hostDirBackend , hostDir )
219
220
err := l .hostExec .IssueCommand (ctx , cmd , node )
220
221
framework .ExpectNoError (err )
221
222
return & LocalTestResource {
@@ -235,7 +236,7 @@ func (l *ltrMgr) cleanupLocalVolumeDirectoryLink(ctx context.Context, ltr *Local
235
236
236
237
func (l * ltrMgr ) setupLocalVolumeDirectoryBindMounted (ctx context.Context , node * v1.Node , parameters map [string ]string ) * LocalTestResource {
237
238
hostDir := l .getTestDir ()
238
- cmd := fmt .Sprintf ("mkdir %s && mount --bind %s %s" , hostDir , hostDir , hostDir )
239
+ cmd := fmt .Sprintf ("mkdir -p %s && mount --bind %s %s" , hostDir , hostDir , hostDir )
239
240
err := l .hostExec .IssueCommand (ctx , cmd , node )
240
241
framework .ExpectNoError (err )
241
242
return & LocalTestResource {
@@ -255,7 +256,7 @@ func (l *ltrMgr) cleanupLocalVolumeDirectoryBindMounted(ctx context.Context, ltr
255
256
func (l * ltrMgr ) setupLocalVolumeDirectoryLinkBindMounted (ctx context.Context , node * v1.Node , parameters map [string ]string ) * LocalTestResource {
256
257
hostDir := l .getTestDir ()
257
258
hostDirBackend := hostDir + "-backend"
258
- cmd := fmt .Sprintf ("mkdir %s && mount --bind %s %s && ln -s %s %s" , hostDirBackend , hostDirBackend , hostDirBackend , hostDirBackend , hostDir )
259
+ cmd := fmt .Sprintf ("mkdir -p %s && mount --bind %s %s && ln -s %s %s" , hostDirBackend , hostDirBackend , hostDirBackend , hostDirBackend , hostDir )
259
260
err := l .hostExec .IssueCommand (ctx , cmd , node )
260
261
framework .ExpectNoError (err )
261
262
return & LocalTestResource {
0 commit comments