Package: lxc-templates
Version: 3.0.3-1
Severity: critical
Justification: breaks postgresql installation

To reproduce, install debian buster using debian installer or live installer and select English India as language.

Create an lxc container with
lxc-create -n gitlab -t debian -- -r unstable

Run dpkg-reconfigure locales inside container

Generating locales (this might take a while)...
en_IN.en_IN...[error] character map file `en_IN' not found: No such file or directory [error] not all characters used in `outdigit' are available in the charmap
done
Generation complete.

It works in the host buster system but fails in lxc.

On host machine,
Generating locales (this might take a while)...
 en_IN.UTF-8... done
Generation complete.

Inside lxc, somehow it is trying to use en_IN.en_IN instead of en_IN.UTF-8, this also breaks postgresql installation.

Creating new PostgreSQL cluster 12/main ...
/usr/lib/postgresql/12/bin/initdb -D /var/lib/postgresql/12/main --auth-local peer --auth-host md5 WARNING: 01000: could not determine encoding for locale "en_IN": codeset is "ANSI_X3.4-1968"
LOCATION:  pg_get_encoding_from_locale, chklocale.c:414
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_IN".
could not determine encoding for locale "en_IN": codeset is "ANSI_X3.4-1968"
initdb: error: could not find suitable encoding for locale "en_IN"
Rerun initdb with the -E option.
Try "initdb --help" for more information.
Error: initdb failed
Error: could not create default cluster. Please create it manually with

 pg_createcluster 12 main --start

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

Even though host machine has a UTF-8 enabled locale, the configured locale inside container is wrong.


Reply via email to