Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Done
-
PUP 3.4.2
-
None
-
Debian wheezy (7.x)
-
2
-
Week 2014-2-5 to 2014-2-12, Week 2014-2-12 to 2014-2-19
Description
Setting the gecos/comment field in a local user on debian wheezy with puppet 3.4.2-1puppetlabs1 fails with an ugly error about utf-8 encodings.
As this system is completely utf-8 there is no reason that this should be an invalid value, as can be seen by "puppet resource" and "getent passwd" displaying the value without problems.
root@puppetmaster:~# echo ΓΌ | od -ab
|
0000000 C < nl
|
303 274 012
|
0000003
|
root@puppetmaster:~# getent passwd david | od -ab
|
0000000 d a v i d : x : 1 0 0 1 : 1 0 0
|
144 141 166 151 144 072 170 072 061 060 060 061 072 061 060 060
|
0000020 2 : D a v i d sp S c h m i t t sp
|
062 072 104 141 166 151 144 040 123 143 150 155 151 164 164 040
|
0000040 w i t h sp C < : / h o m e / d a
|
167 151 164 150 040 303 274 072 057 150 157 155 145 057 144 141
|
0000060 v i d : / b i n / b a s h nl
|
166 151 144 072 057 142 151 156 057 142 141 163 150 012
|
0000076
|
root@puppetmaster:~# puppet resource user david | grep comment | od -ab
|
0000000 sp sp c o m m e n t sp sp sp sp sp sp sp
|
040 040 143 157 155 155 145 156 164 040 040 040 040 040 040 040
|
0000020 sp sp sp = > sp ' D a v i d sp S c h
|
040 040 040 075 076 040 047 104 141 166 151 144 040 123 143 150
|
0000040 m i t t sp w i t h sp C < ' , nl
|
155 151 164 164 040 167 151 164 150 040 303 274 047 054 012
|
0000057
|
root@puppetmaster:~# echo 'user {foo: comment => "ΓΌ"}' | od -ab
|
0000000 u s e r sp { f o o : sp c o m m e
|
165 163 145 162 040 173 146 157 157 072 040 143 157 155 155 145
|
0000020 n t sp = > sp " C < " } nl
|
156 164 040 075 076 040 042 303 274 042 175 012
|
0000034
|
root@puppetmaster:~# echo 'user {foo: comment => "ΓΌ"}' | puppet apply
|
Notice: Compiled catalog for puppetmaster.example.org in environment production in 0.07 seconds
|
Error: Parameter comment failed on User[foo]: Munging failed for value "ΓΌ" in class comment: U+00FC from UTF-8 to ASCII-8BIT at line 1
|
Wrapped exception:
|
Munging failed for value "ΓΌ" in class comment: U+00FC from UTF-8 to ASCII-8BIT
|
root@puppetmaster:~# locale
|
LANG=en_US.UTF-8
|
LANGUAGE=en_US:en
|
LC_CTYPE="en_US.UTF-8"
|
LC_NUMERIC="en_US.UTF-8"
|
LC_TIME="en_US.UTF-8"
|
LC_COLLATE="en_US.UTF-8"
|
LC_MONETARY="en_US.UTF-8"
|
LC_MESSAGES="en_US.UTF-8"
|
LC_PAPER="en_US.UTF-8"
|
LC_NAME="en_US.UTF-8"
|
LC_ADDRESS="en_US.UTF-8"
|
LC_TELEPHONE="en_US.UTF-8"
|
LC_MEASUREMENT="en_US.UTF-8"
|
LC_IDENTIFICATION="en_US.UTF-8"
|
LC_ALL=
|
root@puppetmaster:~#
|