Locale issue on fresh install of Fuel 7.0

Bug #1483597 reported by Sebastian Kalinowski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Invalid
Medium
Ihor Kalnytskyi

Bug Description

 When calling fuel2 and some error occur (like invalid command name) traceback is printed:

[root@nailgun ~]# fuel2 invalid-command-name
DEPRECATION WARNING: /etc/fuel/client/config.yaml exists and will be used as the source for settings. This behavior is deprecated. Please specify the path to your custom settings file in the FUELCLIENT_CUSTOM_SETTINGS environment variable.
Traceback (most recent call last):
  File "/usr/bin/fuel2", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.6/site-packages/fuelclient/cli/error.py", line 98, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/fuelclient/main.py", line 75, in main
    command_manager=CommandManager('fuelclient', convert_underscores=True)
  File "/usr/lib/python2.6/site-packages/cliff/app.py", line 73, in __init__
    self._set_streams(stdin, stdout, stderr)
  File "/usr/lib/python2.6/site-packages/cliff/app.py", line 80, in _set_streams
    locale.setlocale(locale.LC_ALL, '')
  File "/usr/lib64/python2.6/locale.py", line 513, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

After setting LC_ALL variable it works again.

custom ISO:

VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "7.0"
  openstack_version: "2015.1.0-7.0"
  api: "1.0"
  build_number: "891"
  build_id: "2015-08-10_11-42-06"
  nailgun_sha: "ee00c45985ed05a4b246ae5966fb7e8f44f1095d"
  python-fuelclient_sha: "e965951d94014920831499197e07a0e1a7c52f37"
  fuel-agent_sha: "57145b1d8804389304cd04322ba0fb3dc9d30327"
  fuel-nailgun-agent_sha: "e01693992d7a0304d926b922b43f3b747c35964c"
  astute_sha: "e1d3a435e5df5b40cbfb1a3acf80b4176d15a2dc"
  fuel-library_sha: "38a188ebf4142744edf9c00e99dc9d97666bd724"
  fuel-ostf_sha: "c7f745431aa3c147f2491c865e029e0ffea91c47"
  fuelmain_sha: "b87de67f15317bea2fa826d0b367e6f29b798813"

Revision history for this message
Roman Prykhodchenko (romcheg) wrote :

Apart from proposing a patch to Cliff it's also a must to set LC_ALL for root and in /etc/skell: that will resolve the issue faster. Unset LC_ALL will cause failures not only in Fuel Client.

Changed in fuel:
status: New → Confirmed
tags: added: module-client
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Alexander Bochkarev (abochkarev)
Revision history for this message
Bartłomiej Piotrowski (bpiotrowski) wrote :

Still, cliff should try to fall back to C locales if LC_* is unset.

Revision history for this message
Alexander Bochkarev (abochkarev) wrote :

I've just found the bug https://bugs.launchpad.net/fuel/+bug/1458361 that describes the same behavior. From the discussion it became clear that this is known-issue which doesn't affect deployment process. Was decided to move it to 8.0.

Revision history for this message
Alexander Bochkarev (abochkarev) wrote :

Forgot to add.

VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "7.0"
  openstack_version: "2015.1.0-7.0"
  api: "1.0"
  build_number: "164"
  build_id: "2015-08-12_15-16-47"
  nailgun_sha: "fff6bda090fac15c48b27cca7832a70f8e381101"
  python-fuelclient_sha: "26fc025e0fc5791b62e5ed8561a6016bf8a406bc"
  fuel-agent_sha: "57145b1d8804389304cd04322ba0fb3dc9d30327"
  fuel-nailgun-agent_sha: "e01693992d7a0304d926b922b43f3b747c35964c"
  astute_sha: "e1d3a435e5df5b40cbfb1a3acf80b4176d15a2dc"
  fuel-library_sha: "22f848670e49d89fc04aaed4d8efd1b07360cbe7"
  fuel-ostf_sha: "58220583f10fa47f12291488ef77854809c68310"
  fuelmain_sha: "67e5214c0dc5d4ba6da4ae651cef9934800459a9"

[root@fuel ~]# fuel2 invaild-command-name
DEPRECATION WARNING: /etc/fuel/client/config.yaml exists and will be used as the source for settings. This behavior is deprecated. Please specify the path to your custom settings file in the FUELCLIENT_CUSTOM_SETTINGS environment variable.
Unknown command ['invalid-command-name']

There are no errors. Only deprecation warning.

Revision history for this message
Ihor Kalnytskyi (ikalnytskyi) wrote :

The problem's solved. Sebastian has wrong LC_ALL setup on his system -

LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=

and ssh by default sends LC_* settings to the remote server -

$ cat /etc/ssh/ssh_config | grep LC
   SendEnv LANG LC_*

move it it Invalid.

Changed in fuel:
status: Confirmed → Invalid
assignee: Alexander Bochkarev (abochkarev) → Igor Kalnitsky (ikalnitsky)
Revision history for this message
Sebastian Kalinowski (prmtl) wrote :

It's because missing LC_ALL on the host from the host we are connecting to the master node (I know it thansk to Igor Kalnitsky ;)). and when ssh connection is sending this empty LC_ALL to session on our mater node.

We can safely decrease priority and move to 8.0

Changed in fuel:
milestone: 7.0 → 8.0
importance: High → Medium
Dmitry Pyzhov (dpyzhov)
tags: added: area-python
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.