containerd / containerd/accelerated-container-image
Attach overlaybd device will fail if the mountpoint contains a symbol link
- Dominant language
- Go
- Stars
- 470
- Forks
- 87
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 5
Description
### What happened in your environment?
ubuntu/centos
### What did you expect to happen?
_No response_
### How can we reproduce it?
create a symbol link for snapshotter's root
it will cause a failure when attaching a device
```go
func lookup(dir string) error {
dir = filepath.Clean(dir)
m, err := mountinfo.GetMounts(mountinfo.SingleEntryFilter(dir))
if err != nil {
return errors.Wrapf(err, "failed to get mount info for %q", dir)
}
if len(m) == 0 {
return errors.Errorf("failed to find the mount point for %q", dir)
}
return nil
}
```
mountinfo.GetMounts can not find the matched mountpoint if the 'dir' contains a symbol link in its path
### What is the version of your Accelerated Container Image?
latest
### What is your OS environment?
ubuntu 22.04
### Are you willing to submit PRs to fix it?
- [X] Yes, I am willing to fix it.
Contributor guide
Assessment
This issue has not been assessed yet.