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

configs file is loaded after VersionCheck(), so proxy settings are not used when calling beginDetectNewVersion() #1002

Closed
sebgir opened this issue Dec 13, 2022 · 8 comments · Fixed by #1001
Labels
Milestone

Comments

@sebgir
Copy link

sebgir commented Dec 13, 2022

Which version of blobfuse was used?

version 2.0.1

Which OS distribution and version are you using?

Ubuntu 18.04

If relevant, please share your mount command.

n/a

What was the issue encountered?

Using the mount command :

Proxy settings are not used when doing the new version detection (they are loaded from yaml file only at line 226) and the resultings errors in the http GETs will interupt the mount command. It's not easy to debug since only one line will be visible in log saying : dial tcp: lookup blobfuse2.blob.core.windows.net: no such host

VersionCheck should be an optionnal step or proxy settings should be used when calling blobfuse2.blob.core.windows.net

Have you found a mitigation/solution?

use --disable-version-check=true will fix issue, but versionCheck will be disabled.

@gapra-msft
Copy link
Member

Thanks @sebgir for this find.

We will plan to get a fix around for this as soon as we can.

Until then, the --disable-version-check flag should help mitigate the problem until then.

@gapra-msft gapra-msft added the bug label Dec 13, 2022
@vibhansa-msft vibhansa-msft added this to the V2-2.0.2 milestone Dec 14, 2022
@vibhansa-msft
Copy link
Member

Are you configuring proxy in blobfuse2 config or environment variable. Try exporting proxy config in standard Linux env variables "https_proxy". If Linux env variable is configured properly then there is no need to mention the same in blobfuse config file.

@sebgir
Copy link
Author

sebgir commented Dec 14, 2022

Are you configuring proxy in blobfuse2 config or environment variable. Try exporting proxy config in standard Linux env variables "https_proxy". If Linux env variable is configured properly then there is no need to mention the same in blobfuse config file.

Thank you Vikas for the other great workaround.

I will disable version check until V2.0.2 or so. The solution is working perfectly this way.

@vibhansa-msft
Copy link
Member

@sebgir : can you confirm setting linux environment variables worked for you. As it's not a workaround rather a solution for proxy based environments. We can update our documentation saying if env variable is set no need to provide config parameter to blobfuse.

@sebgir
Copy link
Author

sebgir commented Dec 15, 2022

@sebgir : can you confirm setting linux environment variables worked for you. As it's not a workaround rather a solution for proxy based environments. We can update our documentation saying if env variable is set no need to provide config parameter to blobfuse.

I will only be able to test it in a few days.

We generaly avoid using enviroment variables when we can use configs files for maintainability and deployment. The VersionCheck() method should at least be non fatal when exceptions are raised inside IMHO. A warning about setting that environment variable or --disable-version-check should be shown if possible. I'm not a huge fan of documentation reading ;)

Thank you all for your support

@gapra-msft gapra-msft added the V2 label Dec 15, 2022
@vibhansa-msft
Copy link
Member

Config parsing is happening in parallel to the version check and hence it's not possible for this flow to take dependency on the config options. Changing the order/flow will need some code churn and good testing cycles, which we are not prioritizing at this moment. Best option here is to either disable the version check (which does not impact any functionality) or provide the proxy settings in environment variables.

@vibhansa-msft
Copy link
Member

To add to my above comment, there are commands which do not take any config file as input like "blobfuse2 version --check" which execute the same flow of version check.

@vibhansa-msft
Copy link
Member

"VersionCheck() method should at least be non-fatal when exceptions are raised inside IMHO": as per code its non-fatal only and it just spits out a log saying host is not reachable, but the mount continues. Are you observing something else here?

@vibhansa-msft vibhansa-msft linked a pull request Dec 22, 2022 that will close this issue
vibhansa-msft added a commit that referenced this issue Dec 23, 2022
#999 Upgrade dependencies to resolve known CVEs.
#1002 In case version check fails to connect to public container, dump a log to check network and proxy settings.
#1006 Remove user and group config from logrotate file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants