Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
Description
If the file name contains a utf8 character, then drift correction
fails on ubuntu 1604 and windows (2012r2 and 2016).
To see for yourself:
Run puppet apply with this manifest to create a file with
a utf8 non ascii character in its name.
manifest_file_utf8_title.pp:
file { "/tmp/file_utf8_title_€" :
|
ensure => file,
|
mode => "0644",
|
content => "This is the file content.
|
",
|
}
|
(The windows version of this manifest names the file
"C:/cygwin64/tmp/file_utf8_title_€")
Change the file (drift).
Run puppet apply again to correct the drift.
See this error.
Notice: Compiled catalog for qj5xhpzxp03l1d1.delivery.puppetlabs.net in environment production in 0.08 seconds
|
Error: Could not back up /tmp/file_utf8_title_€: U+20AC from UTF-8 to ISO-8859-1
|
Error: Could not back up /tmp/file_utf8_title_€: U+20AC from UTF-8 to ISO-8859-1
|
Error: /Stage[main]/Main/File[/tmp/file_utf8_title_€]/content: change from {md5}d41d8cd98f00b204e9800998ecf8427e to {md5}12c5472e7479836c84093162660f2a7b failed: Could not back up /tmp/file_utf8_title_€: U+20AC from UTF-8 to ISO-8859-1
|
Notice: Applied catalog in 0.04 seconds
|
root@qj5xhpzxp03l1d1:/tmp# puppet apply manifest_file_utf8_title.pp
|
Notice: Compiled catalog for qj5xhpzxp03l1d1.delivery.puppetlabs.net in environment production in 0.08 seconds
|
Notice: /Stage[main]/Main/File[/tmp/file_utf8_title_€]/ensure: defined content as '{md5}12c5472e7479836c84093162660f2a7b'
|
Notice: Applied catalog in 0.20 seconds
|
root@qj5xhpzxp03l1d1:/tmp# cat file_utf8_title_€
|
This is the file content.
|
root@qj5xhpzxp03l1d1:/tmp# > file_utf8_title_€
|
root@qj5xhpzxp03l1d1:/tmp# cat file_utf8_title_€
|
root@qj5xhpzxp03l1d1:/tmp# puppet apply manifest_file_utf8_title.pp
|
Notice: Compiled catalog for qj5xhpzxp03l1d1.delivery.puppetlabs.net in environment production in 0.08 seconds
|
Error: Could not back up /tmp/file_utf8_title_€: U+20AC from UTF-8 to ISO-8859-1
|
Error: Could not back up /tmp/file_utf8_title_€: U+20AC from UTF-8 to ISO-8859-1
|
Error: /Stage[main]/Main/File[/tmp/file_utf8_title_€]/content: change from {md5}d41d8cd98f00b204e9800998ecf8427e to {md5}12c5472e7479836c84093162660f2a7b failed: Could not back up /tmp/file_utf8_title_€: U+20AC from UTF-8 to ISO-8859-1
|
Notice: Applied catalog in 0.04 seconds
|
root@qj5xhpzxp03l1d1:/tmp# echo $?
|
0
|
root@qj5xhpzxp03l1d1:/tmp# cat file_utf8_title_€
|
root@qj5xhpzxp03l1d1:/tmp#
|
puppet apply exited with exit status 0, and the file is not corrected.
This error does not occur when we do this on any of the following platforms:
ubuntu1404-64
centos6-64
centos7-64
redhat6-64
redhat7-64
Puppet agent suite version: 1.8.1.252.gbdcd028
root@qj5xhpzxp03l1d1:~# puppet --version
|
4.8.2
|
root@qj5xhpzxp03l1d1:~#
|
Attachments
Issue Links
- is blocked by
-
PUP-7063 Handle incompatible encodings in Puppet::Util::Log when rendering to console
-
- Closed
-
- relates to
-
PUP-7146 on arista-4-i386: File resource drift correction fails on file named with utf-8 characters
-
- Closed
-
-
PUP-7147 cumulus-vx-25-x86_64: File resource drift correction fails on file named with utf-8 characters
-
- Closed
-
-
PUP-7150 on cisco_ios_xr-6-x86_64: File resource drift correction fails on file named with utf-8 characters
-
- Closed
-
-
IMAGES-498 ubuntu1604 does not default to UTF-8 encoding
-
- Resolved
-