On Fri, Aug 18, 2017 at 3:57 PM, Scott Moser <email address hidden> wrote:
> Review: Needs Information
>
> The distro can already override the default locale by simply providing
> /etc/cloud/cloud.cfg.d/ entries with 'locale: C.UTF-8'. So I don't know
> that there is a reason to have the added complexity of looking this up in
> the distro object. Arguably we should support configuring locale under
> "system_info" as it is OS configuration similar to "default_user".
>
In general, I think default locale is something only the distro can
provide; I don;t think it's something that should be in the datasource (the
default value)
A distro can tell cloud-init what the current settings are:
(read LANG from env)
See what's available:
locale -a
And possible generate new locales
(locale-gen)
If anything, it would be better to remove the "Default" value from
Datasource base-class and leave it to the distro (to determine default).
>
> The bigger issue with this is that it changes the default locale for any
> instance with cloud-initnit from en_US.UTF-8 to C.UTF_8. That is a
> behavior change that we'd then have to revert in Ubuntu stable releases.
> Admittedly, I'm not sure of the real-world affect of that change other than
> having 'locale' mention it, but I think that change was generally not
> intended or thought out.
>
Yes, that's true; I don't think we can change this in previous stable
releases.
>
>
> The one other comment I have is that it'd be best if we chose to not
> regenerate any locale that was already generated. Currently what we do is
> simply not generate (or regenerate) the locale if it is configured to be
> the system default locale.
>
Yes, I was hoping to avoid more exec'ing but with some thought, I probably
makes sense to
1) determine the current LANG setting
2) check if there's a system configured LANG setting (/etc/default/locale)
3) check what's available (locale -a)
compare that to what's being requested
And only locale-gen if the requested locale isn't already available (1, 2)
If the requested locale is available (whether we regen or not) we should
update
the system_conf file with the requested locale.
On Fri, Aug 18, 2017 at 3:57 PM, Scott Moser <email address hidden> wrote:
> Review: Needs Information cloud.cfg. d/ entries with 'locale: C.UTF-8'. So I don't know
>
> The distro can already override the default locale by simply providing
> /etc/cloud/
> that there is a reason to have the added complexity of looking this up in
> the distro object. Arguably we should support configuring locale under
> "system_info" as it is OS configuration similar to "default_user".
>
In general, I think default locale is something only the distro can
provide; I don;t think it's something that should be in the datasource (the
default value)
A distro can tell cloud-init what the current settings are:
(read LANG from env)
See what's available:
locale -a
And possible generate new locales
(locale-gen)
If anything, it would be better to remove the "Default" value from
Datasource base-class and leave it to the distro (to determine default).
>
> The bigger issue with this is that it changes the default locale for any
> instance with cloud-initnit from en_US.UTF-8 to C.UTF_8. That is a
> behavior change that we'd then have to revert in Ubuntu stable releases.
> Admittedly, I'm not sure of the real-world affect of that change other than
> having 'locale' mention it, but I think that change was generally not
> intended or thought out.
>
Yes, that's true; I don't think we can change this in previous stable
releases.
>
>
> The one other comment I have is that it'd be best if we chose to not
> regenerate any locale that was already generated. Currently what we do is
> simply not generate (or regenerate) the locale if it is configured to be
> the system default locale.
>
Yes, I was hoping to avoid more exec'ing but with some thought, I probably
makes sense to
1) determine the current LANG setting locale)
2) check if there's a system configured LANG setting (/etc/default/
3) check what's available (locale -a)
compare that to what's being requested
And only locale-gen if the requested locale isn't already available (1, 2)
If the requested locale is available (whether we regen or not) we should
update
the system_conf file with the requested locale.
Does that make sense?
> /code.launchpad .net/~raharper/ cloud-init/ +git/ +merge/ 329152 cloud-init: default- lang-c- utf8.
> --
> https:/
> cloud-init/
> You are the owner of ~raharper/
>