LC_TIME setting can break installation

Bug #1171696 reported by Jeroen T. Vermeulen
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Invalid
Undecided
Unassigned
maas (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Leaving the locale to the default en_US.UTF-8, but setting LC_TIME to e.g. "en_GB" or "en_GB.UTF-8" consistently breaks installation. So "LC_TIME=en_GB.UTF-8 apt-get install maas" will not work, but "LC_TIME=en_US.UTF-8 apt-get install maas" does. This may for instance affect people who use the en_DK locale for time display in order to get ISO date ordering.

The problem could be related to bug 1134036, which seemed to come from a missing entry in /usr/share/locale.

The installation error is:

«
Creating config file /etc/dbconfig-common/maas-region-controller.conf with new version
unable to connect to postgresql server.
error encountered creating user:
psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Configuring maas-region-controller
----------------------------------

An error occurred while installing the database:

psql: could not connect to server: No such file or directory Is the server
running locally and accepting connections on Unix domain socket
"/var/run/postgresql/.s.PGSQL.5432"?

If at this point you choose "retry", you will be prompted with all the
configuration questions once more and another attempt will be made at performing
the operation. "retry (skip questions)" will immediately attempt the operation
again, skipping all questions. If you choose "abort", the operation will fail
and you will need to downgrade, reinstall, reconfigure this package, or
otherwise manually intervene to continue using it. If you choose "ignore", the
operation will continue, ignoring further errors from dbconfig-common.

  1. abort 2. retry 3. retry (skip questions) 4. ignore
»

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Actually the problem becomes evident earlier on in installation. The first hint is repeated warnings “locale: Cannot set LC_ALL to default locale: No such file or directory.”

Then, while installing postgres, this happens:

«
Setting up postgresql-9.1 (9.1.9-0ubuntu12.04) ...
Error: The locale requested by the environment is invalid.
Error: could not create default cluster. Please create it manually with

  pg_createcluster 9.1 main --start

or a similar command (see 'man pg_createcluster').
»

This wouldn't be so much of a problem if it were merely a matter of setting up the server system badly: just don't do that then. But when you ssh into the server system to install maas, the session picks up your ssh client's locale settings.

description: updated
Changed in maas:
status: New → Invalid
Revision history for this message
Robie Basak (racb) wrote :

I think this is precisely the same issue and has the same root cause as bug 1134036 - caused by ssh-ing into a server that does not have a locale setting that you use locally configured on the server. I'll make that bug more generic.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in maas (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.