locale problem

Bug #1493953 reported by Andreas Flick
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
maas-deployer
New
Undecided
Unassigned

Bug Description

2015-09-09 20:04:32,935 DEBUG Executing: 'ssh -i /root/.ssh/id_maas -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=quiet user@172.27.3.240 maas login maas http://172.27.3.240/MAAS/api/1.0 HpzqyChLBe2gGeA7Rt:J...' stdin=None
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.7/dist-packages/maascli/__main__.py", line 20, in <module>
    main()
  File "/usr/lib/python2.7/dist-packages/maascli/__init__.py", line 29, in main
    locale.setlocale(locale.LC_ALL, "")
  File "/usr/lib/python2.7/locale.py", line 579, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

Traceback (most recent call last):
  File "/usr/bin/maas-deployer", line 9, in <module>
    load_entry_point('maas-deployer==0.0.1', 'console_scripts', 'maas-deployer')()
  File "/usr/lib/python2.7/dist-packages/maas_deployer/cli.py", line 88, in main
    engine.deploy(target)
  File "/usr/lib/python2.7/dist-packages/maas_deployer/vmaas/engine.py", line 72, in deploy
    ssh_user=maas_config['user'])
  File "/usr/lib/python2.7/dist-packages/maas_deployer/vmaas/maasclient/__init__.py", line 29, in __init__
    self.driver = self._get_driver(api_url, api_key, **kwargs)
  File "/usr/lib/python2.7/dist-packages/maas_deployer/vmaas/maasclient/__init__.py", line 33, in _get_driver
    return SSHDriver(api_url, api_key, ssh_user=kwargs['ssh_user'])
  File "/usr/lib/python2.7/dist-packages/maas_deployer/vmaas/maasclient/clidriver.py", line 321, in __init__
    self._login(api_url, api_key)
  File "/usr/lib/python2.7/dist-packages/maas_deployer/vmaas/maasclient/clidriver.py", line 330, in _login
    execc(cmd)
  File "/usr/lib/python2.7/dist-packages/maas_deployer/vmaas/util.py", line 89, in execc
    output=stderr)
subprocess.CalledProcessError: Command 'ssh -i /root/.ssh/id_maas -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=quiet user@172.27.3.240 maas login maas http://172.27.3.240/MAAS/api/1.0 Hp...' returned non-zero exit status 1

Revision history for this message
Andreas Flick (a-flick) wrote :

Kind of a solution an the maas node...

user@localhost:~$ locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME="en_US.UTF-8"
LC_COLLATE=en_US.UTF-8
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=

user@localhost:~$ maas login maas http://172.27.3.240/MAAS/api/1.0 FOOBAR
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.7/dist-packages/maascli/__main__.py", line 20, in <module>
    main()
  File "/usr/lib/python2.7/dist-packages/maascli/__init__.py", line 29, in main
    locale.setlocale(locale.LC_ALL, "")
  File "/usr/lib/python2.7/locale.py", line 579, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

user@localhost:~$ sudo locale-gen de_DE.UTF-8
Generating locales...
  de_DE.UTF-8... done
Generation complete.

user@localhost:~$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME="en_US.UTF-8"
LC_COLLATE=en_US.UTF-8
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=
user@localhost:~$

user@localhost:~$ maas login maas http://172.27.3.240/MAAS/api/1.0 FOOBAR
You are now logged in to the MAAS server at
http://172.27.3.240/MAAS/api/1.0/ with the profile name 'maas'.

For help with the available commands, try:

  maas maas --help

user@localhost:~$

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.