-
Notifications
You must be signed in to change notification settings - Fork 930
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
Bridge creation fail with error 'Error: Can't parse a version' #11902
Comments
This sounds very similar to https://github.com/lxc/lxd/issues/6109 which was fixed by https://github.com/lxc/lxd/pull/6111 in 2019. This runs the append(os.Environ(), "LANG=C.UTF-8", "LANGUAGE=en") So LXD is already overriding the locale when invoking dnsmasq apparently. Can you confirm what you get if you run please:
|
Also can you try:
|
Hello, both return the correct English version:
|
Hrm, strange, I wonder if that fix somehow is missing from LXD 5.0.2, although I doubt it. I'll check... |
Yes it is in LXD 5.0.2 |
Are you running snap or deb package? |
Hello, I'm using debian package. here are the the result of
|
https://www.gnu.org/savannah-checkouts/gnu/gettext/manual/html_node/Locale-Environment-Variables.html: > LC_ALL is an environment variable that overrides all of the LC_*. > It is typically used in scripts that run particular programs. This *might* help with canonical#11902 Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
Hopefully @simondeziel change will fix this issue, but we can reopen if it doesn't. |
https://www.gnu.org/savannah-checkouts/gnu/gettext/manual/html_node/Locale-Environment-Variables.html: > LC_ALL is an environment variable that overrides all of the LC_*. > It is typically used in scripts that run particular programs. This *might* help with canonical#11902 Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
Required information
Issue description
When the system have a locale different than 'en', the creation of bridge fail. It's because of dnsmasq version parsing issue.
After trying to understand what is happening in the code it's related to theses following part of code: https://github.com/lxc/lxd/blob/master/lxd/dnsmasq/dnsmasq.go#L114-L115
The issue is that with
english
locales the result of the commanddnsmasq --version
return this:But in french the result is different:
And in others language it's could be also different. But in the code it's expected that are always the same spaces between the version and the start of string.
Steps to reproduce
lxc network create lxcbr0 --type=bridge
Error: Can't parse a version
.Workaround
For now unitl the issue is fixed the issue could be fixed by adding this line in the systemd unit of
lxd.service
:By this dnsmasq will be called with the "english" language.
The text was updated successfully, but these errors were encountered: