OpenStack create service keystone fail, due to LOCALE variable missing

Bug #1453113 reported by Igor Khapov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Confirmed
Low
Steve Martinelli

Bug Description

I installed OpenStack kilo on empty Ubuntu. During identity service configuration I had to create the service entity but I got following:
-----------
root@bm:~# openstack service create --type identity --description "OpenStack Identity" keystone
Traceback (most recent call last):
  File "/usr/bin/openstack", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py", line 349, in main
    return OpenStackShell().run(argv)
  File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py", line 81, in __init__
    command_manager=commandmanager.CommandManager('openstack.cli'))
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 74, in __init__
    self._set_streams(stdin, stdout, stderr)
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 82, in _set_streams
    locale.setlocale(locale.LC_ALL, '')
  File "/usr/lib/python2.7/locale.py", line 579, in setlocale
    return _setlocale(category, locale)
-----------

It was a problem of missing LOCALE, LC_CTYPE and LC_ALL environment variables. After adding variables to the /root/.bashrc the command return successful result:
root@bm:~# openstack service create --type identity --description "OpenStack Identity" keystone
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Identity |
| enabled | True |
| id | d96f45dbf04d478882369debc9f117f9 |
| name | keystone |
| type | identity |
+-------------+----------------------------------+

I suppose need to add Note to the documentation that LOCALE, LC_CTYPE and LC_ALL variables should be set.

Revision history for this message
Steve Martinelli (stevemar) wrote :

This is the second time we've seen this issue now. The first time we closed it as invalid since there wasn't much we could do, but yes... you have a point, let's document it.

Changed in python-openstackclient:
status: New → Incomplete
status: Incomplete → Confirmed
importance: Undecided → Low
assignee: nobody → Steve Martinelli (stevemar)
Revision history for this message
Terry Howe (thowe-g) wrote :

This is a duplicate of https://bugs.launchpad.net/python-cliff/+bug/1445760

Fix is released for cliff 1.11, but kilo is capped at 1.10.

Changed in python-openstackclient:
assignee: Steve Martinelli (stevemar) → nobody
assignee: nobody → Steve Martinelli (stevemar)
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.