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

Default locale unset on GCE #49

Closed
dmytton opened this Issue Mar 31, 2014 · 4 comments

Comments

Projects
None yet
4 participants
@dmytton
Copy link

dmytton commented Mar 31, 2014

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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor

odyssey4me commented Mar 31, 2014

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

This comment has been minimized.

Copy link
Contributor

jkaplowitz commented Apr 2, 2014

@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

This comment has been minimized.

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 Apr 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment