lxc-create fails if LANG is not valid
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
If LANG is not 'en_GB.UTF-8', lxc-create fails:
$ echo $LANG
fr_CA.UTF8
$ sudo lxc-create -n foo -t ubuntu -- raring
lxc-create: No config file specified, using the default config /etc/lxc/
Checking cache download in /var/cache/
Copy /var/cache/
Copying rootfs to /var/lib/
lxc-create: failed to execute template 'ubuntu'
lxc-create: aborted
$ export LANG=C
$ sudo lxc-create -n foo -t ubuntu -- raring
lxc-create: No config file specified, using the default config /etc/lxc/
Checking cache download in /var/cache/
Copy /var/cache/
Copying rootfs to /var/lib/
lxc-create: failed to execute template 'ubuntu'
lxc-create: aborted
$ export LANG=en_GB.UTF-8
lxc-create: No config file specified, using the default config /etc/lxc/
Checking cache download in /var/cache/
Copy /var/cache/
Copying rootfs to /var/lib/
Generating locales...
en_GB.UTF-8... done
Generation complete.
##
# The default user is 'ubuntu' with password 'ubuntu'!
# Use the 'sudo' command to run tasks as root in the container.
##
'ubuntu' template installed
'raring' created
Changed in lxc (Ubuntu): | |
status: | Invalid → Triaged |
summary: |
- lxc-create fails if LANG != en_GB.UTF-8 + lxc-create fails if LANG is not valid |
Changed in lxc (Ubuntu): | |
status: | Fix Committed → Fix Released |
Adding '-x' to the ubuntu template the problem is with locale-gen:
+ configure_ubuntu /var/lib/ lxc/raring/ rootfs raring raring /var/lib/ lxc/raring/ rootfs lxc/raring/ rootfs/ etc/init/ container- detect. conf ']' lxc/raring/ rootfs useradd --create-home -s /bin/bash ubuntu lxc/raring/ rootfs chpasswd lxc/raring/ rootfs locale-gen fr_CA.UTF8
+ rootfs=
+ hostname=raring
+ release=raring
+ cat
+ cat
+ cat
+ '[' '!' -f /var/lib/
+ '[' -z '' ']'
+ chroot /var/lib/
+ echo ubuntu:ubuntu
+ chroot /var/lib/
+ '[' -z fr_CA.UTF8 ']'
+ chroot /var/lib/
lxc-create: failed to execute template 'ubuntu'
lxc-create: aborted