Skip to content
This repository has been archived by the owner on Jun 10, 2019. It is now read-only.
This repository has been archived by the owner on Jun 10, 2019. It is now read-only.

Default locale unset on GCE #49

Closed
davidmytton opened this issue Mar 31, 2014 · 4 comments
Closed

Default locale unset on GCE #49

davidmytton opened this issue Mar 31, 2014 · 4 comments
Labels

Comments

@davidmytton
Copy link

The default locale is not set on Debian builds on Google Compute Engine, tested in backports-debian-7-wheezy-v20140318. This causes warnings with apt e.g.

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

And causes some applications, like MongoDB, to fail to start. The workaround is to set export LC_ALL=C in the MongoDB init script and/or to set the default locale system wide:

sudo locale-gen en_US.UTF-8
sudo locale-gen en_IE.UTF-8
sudo dpkg-reconfigure locales

However, this should be set by default.

@andsens
Copy link
Owner

andsens commented Mar 31, 2014

Huh, that's puzzling. I can see Tomasz has included the locale taskset here. The default locale is set using update-locale here.

That should be enough. But apparently it isn't, I'll look into it.

@andsens andsens added the bug label Mar 31, 2014
@odyssey4me
Copy link
Contributor

Yeah, when using the kvm provider I'm seeing a similar issue:

    LANGUAGE = (unset)
    LC_ALL = (unset)

This is with the following set in the manifest:

        "system": {
                "release":        "wheezy",
                "architecture":   "amd64",
                "bootloader":     "grub",
                "timezone":       "Africa/Johannesburg",
                "locale":         "en_ZA",
                "charmap":        "UTF-8",
                "virtio_modules": [ "virtio_pci", "virtio_blk", "virtio_balloon" ]
        }

In my case it appears that cloud-init is overwriting the default locale. A simple workaround for me is to:

sed -i 's/^# en_US.UTF8 UTF8$'/en_US.UTF8 UTF8/' /etc/locale.gen
locale-gen

@jkaplowitz
Copy link
Contributor

@andsens The published images on GCE haven't been switched from build-debian-cloud to bootstrap-vz as of yet. Once the gce branch gets merged into bootstrap-vz master, we'd love to start working with Debian on switching the processes etc. Though, from what @odyssey4me said, it seems to be more general than just the gce provider.

@andsens
Copy link
Owner

andsens commented Apr 2, 2014

Ah, I see. This is actually a mix of two different bugs. One in the legacy build-debian-cloud bootstrapper (the one @dmytton is experiencing) and one in the cloud-init plugin for bootstrap-vz (which is what @odyssey4me is reporting).

Regarding the build-debian-cloud bug: I am sorry to say that I simply do not have the time provide legacy support to that project. However the gce branch will soon be merged, which means this won't be a problem for long.

Regarding bootstrap-vz bug: I have created #58 to track this bug, so that we can discuss it over there @odyssey4me. I wrote down what I think is the problem, so please correct me if I am mistaken.

Closing this issue, since it was really only affecting build-debian-cloud in the described form.

@andsens andsens closed this as completed Apr 2, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants