diff --git a/daemons/compute/server/servers/server_default.go b/daemons/compute/server/servers/server_default.go index a842c70d..92a5ff77 100644 --- a/daemons/compute/server/servers/server_default.go +++ b/daemons/compute/server/servers/server_default.go @@ -803,14 +803,25 @@ func (s *defaultServer) findRabbitRelativeSource(ctx context.Context, computeMou for _, clientMount := range clientMounts.Items { for _, mount := range clientMount.Spec.Mounts { if *computeMountInfo.Device.DeviceReference == *mount.Device.DeviceReference { + var path string + log.Println("BLAKE ---------------------------------------") log.Println("mount.MountPath: " + mount.MountPath) log.Println("req.Source: " + req.Source) log.Println("computeMountInfo.MountPath: " + computeMountInfo.MountPath) - ret := mount.MountPath + strings.TrimPrefix(req.Source, computeMountInfo.MountPath) - log.Println("ret: " + ret) + + // If these match, then the user is asking for the entire NNF directory. In that + // case, dcp will copy over the index mount directory (e.g. /mnt/nnf/.../0/) for + // that compute node. We do not want to copy over the index mount directories. + if req.Source == computeMountInfo.MountPath { + path = filepath.Join(mount.MountPath, "*") + } else { + path = filepath.Join(mount.MountPath, strings.TrimPrefix(req.Source, computeMountInfo.MountPath)) + } + + log.Println("path: " + path) log.Println("---------------------------------------------") - return ret, nil + return path, nil } } }