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

aznfs does not read entry in/etc/hosts #115

Open
Abbott-fu opened this issue Apr 30, 2024 · 3 comments
Open

aznfs does not read entry in/etc/hosts #115

Abbott-fu opened this issue Apr 30, 2024 · 3 comments

Comments

@Abbott-fu
Copy link

Abbott-fu commented Apr 30, 2024

We use aznfs to mount a storage blob and we enabled private endpoint for the storage account, we hope to use the private endpoint. Then we add an entry (private end point IP -> stroage blob FQDN ) in /etc/hosts . But aznfs still uses DNS to lookup ip of the storage account, aznfs does not read entry in /etc/hosts. Is it by design.

@linuxsmiths
Copy link
Contributor

Thanks for reporting @Abbott-fu!
Yes, this is deliberate. Note that the primary task of the aznfs mount helper is to detect IP changes due to migration. If it were to query fqdn->ip mapping from a static source like /etc/hosts it won't be able to detect the change in IP due to migration (etc) and hence won't work correctly.
Hope this helps!

@coconutservices
Copy link

We also have this issue, our DNS structure and hybrid architecture pose a lot of DNS challenges enterprise wide.

When using blobfuse, i use a script to do a nslooklup against another DNS and have it update the hosts file to accommodate the IP address, and then start the mount with blobfuse.

We would like to start using this tool, would it be possible to either give a parameter to disable the lookup or an override parameter of some type? We are definitely not the only organization in this situation, it can be very crippling.

Thanks!

@linuxsmiths
Copy link
Contributor

If you cannot use realtime DNS for detecting IP address changes, you can use private endpoint which provides a stable IP across migrations.
Unfortunately, NFS clients are different from REST clients like blobfuse. While REST clients use the endpoint FQDN (which is stable), NFS clients do the DNS lookup only on mount and after that use the IP for reconnect. So, we either need a stable IP (that private endpoint provides) or we monitor IP address change and let NFS client know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants