Skip to content

Commit

Permalink
splat trial
Browse files Browse the repository at this point in the history
  • Loading branch information
bdevcich committed Jan 25, 2024
1 parent 47e1bd8 commit 0a47221
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions daemons/compute/server/servers/server_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down

0 comments on commit 0a47221

Please sign in to comment.