From 65f872332896ca4e684c5fae7b84c43ffb9e4507 Mon Sep 17 00:00:00 2001 From: bjwswang Date: Tue, 9 Jan 2024 07:54:58 +0000 Subject: [PATCH] fix: remove slash in hostpath when using datasource rdma Signed-off-by: bjwswang --- pkg/worker/worker.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/worker/worker.go b/pkg/worker/worker.go index 43403c704..dc42f92f1 100644 --- a/pkg/worker/worker.go +++ b/pkg/worker/worker.go @@ -160,7 +160,8 @@ func NewPodWorker(ctx context.Context, c client.Client, s *runtime.Scheme, w *ar VolumeSource: corev1.VolumeSource{ HostPath: &corev1.HostPathVolumeSource{ // /rdma/abc/uid -> /data/models - Path: fmt.Sprintf("%s/%s", d.Spec.RDMA.Path, w.GetUID()), + // The path has been restricted to contain a suffix `/` + Path: fmt.Sprintf("%s%s", d.Spec.RDMA.Path, w.GetUID()), }, }, }