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

Consider using low-level systems API instead of Linux tools for primitive operations #201

Open
timoreimann opened this issue Nov 4, 2019 · 2 comments
Labels
good first issue Good for newcomers

Comments

@timoreimann
Copy link
Collaborator

The CSI driver currently leverages several Linux tools to implement certain low-level features, like mount for mounting / unmounting or blkid to determine if a path / file system is mounted.

We should consider moving to the Go syscall package instead which provides as least some of the functionality needed in a programmatic fashion. The benefits are that we do not depend on the availability of certain tools, and that we don't need to shell out (which complicates matters like putting together CLI parameters and properly reporting errors).

@kainz
Copy link

kainz commented Aug 4, 2021

In your opinion are tools built on the Go syscall implementation regularly maintained enough to keep pace with filesystems that need mount helpers, or can you envision an implementation that maintains a similar interface as mount(8) when mount helpers should be invoked?

@timoreimann
Copy link
Collaborator Author

As an intermediate step towards being less dependent on specific tools, we can increase our adoption of Kubernetes-provided utilities like https://github.com/kubernetes/mount-utils. We already use it to ease unmounting and should start looking into the mounting counterpart as well (and possibly more depending on what other functionality the library provides).

In addition to studying the library code, I have found Google's PersistentDisk CSI driver to be good source of inspiration to understand how these utilities might be best used.

@timoreimann timoreimann added the good first issue Good for newcomers label Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants