Failure when using ssh with a locale that is not configured on the server
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
base-files (Ubuntu) |
Fix Released
|
Medium
|
Michael Hudson-Doyle | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
maas (Ubuntu) |
Invalid
|
Medium
|
Unassigned | ||
Bionic |
Invalid
|
Undecided
|
Unassigned |
Bug Description
[impact]
The setup:
1) The user has LC_ALL set to a locale on their machine (or some other LC_* variable but it's usually LC_ALL).
2) This locale does not exist on an Ubuntu server.
3) The user sshes into the server.
ssh (at least with the settings that are default on Debian and Ubuntu and Fedora) send the value of LC_ALL to the remote server, where the default settings on Ubuntu allow this to be set in the environment of the process it launches.
Because we are now in a situation where LC_ALL is set to a value that is not valid for the system, various undesirable things happen, including ugly messages from cloud-init and perl complaining every time a perl process starts and the bug that the original description below describes.
[test case]
Configure the setup as described above. Ssh into the server and run "perl < /dev/null" and check for warnings.
[regression potential]
This adds a step to the startup of every login shell, which obviously is not entirely trivial. However, the new executable being invoked is very simple and even if it fails, the startup of the shell should not be inhibited.
[original description]
If LC_ALL is not set (which seems to be the default on a few server installations I've done now), mid way through installing, you get this backtrace and then the installation just hangs. You can ctrl-c out of it but the package is left half configured.
Traceback (most recent call last):
File "/usr/bin/
management.
File "/usr/lib/
utility.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
output = self.handle(*args, **options)
File "/usr/lib/
return self.handle_
File "/usr/lib/
syncdb.
File "/usr/lib/
output = self.handle(*args, **options)
File "/usr/lib/
return self.handle_
File "/usr/lib/
cursor = connection.cursor()
File "/usr/lib/
cursor = util.CursorWrap
File "/usr/lib/
self.connection = Database.
File "/usr/lib/
connection_
psycopg2.
FATAL: password authentication failed for user "maas"
Related bugs:
* bug 969462: [postgres] fails to start after install if invalid locale is set
* LP: #1916935 Major changes in sorting method upgrade 18.04->18.04.5 due to base-files change
Related branches
- Scott Moser: Needs Information
- Server Team CI bot: Approve (continuous-integration)
-
Diff: 133 lines (+32/-66)1 file modifiedtools/Z99-cloud-locale-test.sh (+32/-66)
- Steve Langasek (community): Needs Fixing
- Server Team CI bot: Approve (continuous-integration)
- cloud-init Commiters: Pending requested
-
Diff: 92 lines (+19/-32)1 file modifiedtools/Z99-cloud-locale-test.sh (+19/-32)
Changed in maas (Ubuntu): | |
importance: | Undecided → Medium |
summary: |
- Package install hangs if LC_ALL is not set + Package install hangs if LC_ALL set to a locale that is not configured |
Changed in cloud-init (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Confirmed |
tags: | added: id-5b21b1006874c4e4159dea3f |
tags: | added: patch |
Changed in maas (Ubuntu Bionic): | |
status: | New → Invalid |
description: | updated |
Can you tell us with which package you're getting this?
I installed successfully the daily packages on quantal and raring canonistack instances (http:// paste.ubuntu. com/5570250/ / http:// paste.ubuntu. com/5570252/).