"locale.Error: unsupported locale setting" error on target hosts and containers

Bug #1572859 reported by Mustafa Çelik
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Undecided
Jean-Philippe Evrard

Bug Description

Ansible throws "locale.Error: unsupported locale setting" while running lxc-containers-create.yml at this step: [1],
when the locale setting is not English (in this case Turkish).

[1] http://docs.openstack.org/developer/openstack-ansible/liberty/install-guide/install-foundation-run.html

Solution will be reported as comment.

And here is my servers' locale settings:

LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=tr_TR.UTF-8
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=tr_TR.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=tr_TR.UTF-8
LC_NAME=tr_TR.UTF-8
LC_ADDRESS=tr_TR.UTF-8
LC_TELEPHONE=tr_TR.UTF-8
LC_MEASUREMENT=tr_TR.UTF-8
LC_IDENTIFICATION=tr_TR.UTF-8
LC_ALL=

And here is the error that is thrown by ansible at the lxc-containers-create.yml step:

TASK: [lxc_hosts | Install pip packages] **************************************
<172.29.236.16> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.11> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.14> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.13> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.12> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.11> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.16> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.12> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.13> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.14> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
Result from run 1 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 1, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
Result from run 1 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 1, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
Result from run 1 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 1, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
Result from run 1 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 1, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
Result from run 1 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 1, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
<172.29.236.11> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.16> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.13> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.12> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.14> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
Result from run 2 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 2, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
Result from run 2 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 2, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
Result from run 2 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 2, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
Result from run 2 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 2, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
Result from run 2 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 2, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
<172.29.236.11> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.12> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.13> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.16> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.14> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
Result from run 3 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 3, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
Result from run 3 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 3, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
Result from run 3 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 3, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
Result from run 3 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 3, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
Result from run 3 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 3, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
<172.29.236.11> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.12> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.13> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.14> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.16> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
Result from run 4 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 4, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
Result from run 4 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 4, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
Result from run 4 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 4, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
Result from run 4 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 4, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
Result from run 4 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 4, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
<172.29.236.11> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.12> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.13> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.16> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.14> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
Result from run 5 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 5, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
failed: [ansible01] => (item=lxc-python2) => {"attempts": 5, "cmd": "/usr/local/bin/pip install lxc-python2", "failed": true, "item": "lxc-python2"}
msg: Task failed as maximum retries was encountered
Result from run 5 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 5, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
failed: [ansible02] => (item=lxc-python2) => {"attempts": 5, "cmd": "/usr/local/bin/pip install lxc-python2", "failed": true, "item": "lxc-python2"}
msg: Task failed as maximum retries was encountered
<172.29.236.15> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.17> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
Result from run 5 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 5, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
failed: [ansible03] => (item=lxc-python2) => {"attempts": 5, "cmd": "/usr/local/bin/pip install lxc-python2", "failed": true, "item": "lxc-python2"}
msg: Task failed as maximum retries was encountered
Result from run 5 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 5, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
failed: [ansible06] => (item=lxc-python2) => {"attempts": 5, "cmd": "/usr/local/bin/pip install lxc-python2", "failed": true, "item": "lxc-python2"}
msg: Task failed as maximum retries was encountered
Result from run 5 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 5, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
failed: [ansible04] => (item=lxc-python2) => {"attempts": 5, "cmd": "/usr/local/bin/pip install lxc-python2", "failed": true, "item": "lxc-python2"}
msg: Task failed as maximum retries was encountered
<172.29.236.15> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.17> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
Result from run 1 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 1, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
Result from run 1 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 1, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
<172.29.236.15> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.17> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
Result from run 2 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 2, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
Result from run 2 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 2, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
<172.29.236.15> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.17> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
Result from run 3 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 3, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
Result from run 3 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 3, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
<172.29.236.15> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.17> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
Result from run 4 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 4, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
Result from run 4 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 4, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
<172.29.236.15> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
<172.29.236.17> REMOTE_MODULE pip name=lxc-python2 state=present extra_args=''
Result from run 5 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 5, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
failed: [ansible05] => (item=lxc-python2) => {"attempts": 5, "cmd": "/usr/local/bin/pip install lxc-python2", "failed": true, "item": "lxc-python2"}
msg: Task failed as maximum retries was encountered
Result from run 5 is: {u'msg': u'\n:stderr: Traceback (most recent call last):\n File "/usr/local/bin/pip", line 11, in <module>\n sys.exit(main())\n File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main\n locale.setlocale(locale.LC_ALL, \'\')\n File "/usr/lib/python2.7/locale.py", line 579, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n', u'failed': True, 'attempts': 5, u'cmd': u'/usr/local/bin/pip install lxc-python2'}
failed: [b3lab_haproxy] => (item=lxc-python2) => {"attempts": 5, "cmd": "/usr/local/bin/pip install lxc-python2", "failed": true, "item": "lxc-python2"}
msg: Task failed as maximum retries was encountered
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/root/setup-hosts.retry
ansible01 : ok=29 changed=3 unreachable=0 failed=1
ansible02 : ok=29 changed=3 unreachable=0 failed=1
ansible03 : ok=29 changed=3 unreachable=0 failed=1
ansible04 : ok=29 changed=3 unreachable=0 failed=1
ansible05 : ok=29 changed=3 unreachable=0 failed=1
ansible06 : ok=29 changed=3 unreachable=0 failed=1
b3lab_haproxy : ok=29 changed=3 unreachable=0 failed=1

Revision history for this message
Mustafa Çelik (celikmustafa89) wrote :

I have found a solution that says "default installation of os contains only limited number of locales, and other locales should be generated from command line".
And I ran the following commands which solved locale settings problem:

    sudo ln -s /usr/share/i18n/SUPPORTED /var/lib/locales/supported.d/all
    sudo locale-gen
    dpkg-reconfigure locales

Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :

Considering that the locale setting affects multiple components in the environment - Ansible's ssh connectivity to the hosts, the contents of the container (we don't put anything in the container except the defaults), the spice/novnc locale settings, and perhaps more - it may be best that we document in the pre-requisites that the deployment and target hosts must make use of the en_US.UTF-8 locale. To support multiple locales we would have to do a deep dive investigation into the components affected and ensure full support for all components across the board.

Changed in openstack-ansible:
assignee: nobody → Jean-Philippe Evrard (jean-philippe-evrard)
Changed in openstack-ansible:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible (master)

Reviewed: https://review.openstack.org/311058
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=9a2df7cf879b539f466536cf834fd02e969d99ae
Submitter: Jenkins
Branch: master

commit 9a2df7cf879b539f466536cf834fd02e969d99ae
Author: Jean-Philippe Evrard <email address hidden>
Date: Fri Apr 29 09:35:46 2016 +0100

    Mention of the supported locales in the documentation

    We current only support en_US.UTF-8 at the moment in openstack-ansible.
    While people can try other locales, we should tell in the documentation
    that it's not supported.

    This commit explains that.

    We could extend the documentation when proper testing of different
    locales will be implemented.

    Closes-Bug: #1572859
    Change-Id: I97ca85174a3ab203f25f96104d97ef139f3011d6

Changed in openstack-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/314030

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible (stable/mitaka)

Reviewed: https://review.openstack.org/314030
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=a0ca948f933d485e342d9b1d32649110b821c1eb
Submitter: Jenkins
Branch: stable/mitaka

commit a0ca948f933d485e342d9b1d32649110b821c1eb
Author: Jean-Philippe Evrard <email address hidden>
Date: Fri Apr 29 09:35:46 2016 +0100

    Mention of the supported locales in the documentation

    We current only support en_US.UTF-8 at the moment in openstack-ansible.
    While people can try other locales, we should tell in the documentation
    that it's not supported.

    This commit explains that.

    We could extend the documentation when proper testing of different
    locales will be implemented.

    Closes-Bug: #1572859
    Change-Id: I97ca85174a3ab203f25f96104d97ef139f3011d6
    (cherry picked from commit 9a2df7cf879b539f466536cf834fd02e969d99ae)

tags: added: in-stable-mitaka
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/openstack-ansible 13.1.1

This issue was fixed in the openstack/openstack-ansible 13.1.1 release.

Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/openstack-ansible 14.0.0.0b1

This issue was fixed in the openstack/openstack-ansible 14.0.0.0b1 development milestone.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/openstack-ansible 14.0.0.0b2

This issue was fixed in the openstack/openstack-ansible 14.0.0.0b2 development milestone.

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.