Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attach overlaybd device will fail if the mountpoint contains a symbol link #295

Open
1 task done
BigVan opened this issue Aug 1, 2024 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@BigVan
Copy link
Member

BigVan commented Aug 1, 2024

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

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?

  • Yes, I am willing to fix it.
@BigVan BigVan added the bug Something isn't working label Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant