Repository navigation
Closed
Labels
P4Priority 4PlatformRelates to OS, containers, platform-based utilities like FS, system based appsbugbroken, incorrect, or confusing behaviorfixed-pls-verifyfix is linked, bug author to confirm fixseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone
Description
Salt state method locale.system fails, if (on Ubuntu/Debian) /etc/default/locale is missing.
This file is not existent after a fresh deboostrap installation (xen guest system).
So my state
de_locale:
locale.present:
- name: de_DE.UTF-8
default_locale:
locale.system:
- name: de_DE.UTF-8
- require:
- locale: de_locale
fails with
2015-05-15 14:26:52,910 [salt.loaded.int.module.cmdmod][ERROR ][2206] Command 'grep "^LANG=" /etc/default/locale' failed with return code: 2
2015-05-15 14:26:52,911 [salt.loaded.int.module.cmdmod][ERROR ][2206] output: grep: /etc/default/locale: No such file or directory
2015-05-15 14:26:52,914 [salt.state ][ERROR ][2206] An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1563, in call
**cdata['kwargs'])
File "/usr/lib/python2.7/dist-packages/salt/states/locale.py", line 40, in system
if __salt__['locale.set_locale'](name):
File "/usr/lib/python2.7/dist-packages/salt/modules/localemod.py", line 140, in set_locale
'/etc/default/locale', '^LANG=.*', 'LANG="{0}"'.format(locale)
File "/usr/lib/python2.7/dist-packages/salt/modules/file.py", line 1225, in replace
raise SaltInvocationError('File not found: {0}'.format(path))
SaltInvocationError: File not found: /etc/default/locale
used version on server:
salt --versions-report
Salt: 2014.7.5
Python: 2.7.3 (default, Dec 18 2014, 19:10:20)
Jinja2: 2.6
M2Crypto: 0.21.1
msgpack-python: 0.1.10
msgpack-pure: Not Installed
pycrypto: 2.4.1
libnacl: Not Installed
PyYAML: 3.10
ioflo: Not Installed
PyZMQ: 14.0.1
RAET: Not Installed
ZMQ: 4.0.4
Mako: Not Installed
Debian source package: 2014.7.5+ds-1precise1
Metadata
Metadata
Assignees
Labels
P4Priority 4PlatformRelates to OS, containers, platform-based utilities like FS, system based appsbugbroken, incorrect, or confusing behaviorfixed-pls-verifyfix is linked, bug author to confirm fixseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Activity
(re)generate /etc/default/locale
jfindlay commentedon May 18, 2015
@chrimi, thanks for the report; the fix I have made will be available in 2015.5.1.