Project

General

Profile

Bug #14473

invalid byte sequence in US-ASCII on UTF-8 manifests under C locale

Added by Dominic Cleal over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

When foreman-installer RPMs are built, the build runs with LANG=C and calls kafo-export-params to parse the manifests. For manifests that contain UTF-8 on Ruby 1.9.3+ OSes, the step is failing with:

** Execute /builddir/build/BUILD/foreman-installer-1.12.0/_build/options.asciidoc
/usr/bin/kafo-export-params -c config/foreman.yaml -f asciidoc > /builddir/build/BUILD/foreman-installer-1.12.0/_build/options.asciidoc
/usr/share/ruby/vendor_ruby/puppet/parser/parser_support.rb:175:in `rescue in parse': invalid byte sequence in US-ASCII at /builddir/build/BUILD/foreman-installer-1.12.0/_build/modules/puppet/manifests/init.pp:1 (Puppet::ParseError)
    from /usr/share/ruby/vendor_ruby/puppet/parser/parser_support.rb:166:in `parse'
    from /usr/share/ruby/vendor_ruby/puppet/parser/type_loader.rb:87:in `parse_file'
    from /usr/share/ruby/vendor_ruby/puppet/parser/type_loader.rb:126:in `block in load_files'
    from /usr/share/ruby/vendor_ruby/puppet/parser/type_loader.rb:108:in `each'
    from /usr/share/ruby/vendor_ruby/puppet/parser/type_loader.rb:108:in `load_files'
    from /usr/share/ruby/vendor_ruby/puppet/parser/type_loader.rb:32:in `import'
    from /usr/share/ruby/vendor_ruby/puppet/parser/parser_support.rb:120:in `import'
    from /usr/share/gems/gems/kafo_parsers-0.0.6/lib/kafo_parsers/puppet_module_parser.rb:45:in `initialize'
    from /usr/share/gems/gems/kafo_parsers-0.0.6/lib/kafo_parsers/puppet_module_parser.rb:18:in `new'
    from /usr/share/gems/gems/kafo_parsers-0.0.6/lib/kafo_parsers/puppet_module_parser.rb:18:in `parse'
    from /usr/share/gems/gems/kafo-0.7.2/lib/kafo/puppet_module.rb:51:in `parse'
    from /usr/share/gems/gems/kafo-0.7.2/lib/kafo/configuration.rb:87:in `block in modules'
    from /usr/share/gems/gems/kafo-0.7.2/lib/kafo/configuration.rb:87:in `map'
    from /usr/share/gems/gems/kafo-0.7.2/lib/kafo/configuration.rb:87:in `modules'
    from /usr/share/gems/gems/kafo-0.7.2/bin/kafo-export-params:90:in `print_out'
    from /usr/share/gems/gems/kafo-0.7.2/bin/kafo-export-params:40:in `execute'
    from /usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    from /usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run'
    from /usr/share/gems/gems/kafo-0.7.2/bin/kafo-export-params:135:in `<top (required)>'
    from /usr/bin/kafo-export-params:23:in `load'
    from /usr/bin/kafo-export-params:23:in `<main>'
rake aborted!

The reading of the manifest should be in UTF-8 to be on the safe side, either changing the File.read or setting the default external encoding.


Related issues

Related to Smart Proxy - Bug #13219: Foreman unable to import puppet class with unicode characters.Closed2016-01-14
Related to Kafo - Bug #14932: Puppet Strings JSON parsing error with UTF-8 vs US-ASCII (Encoding::InvalidByteSequenceError)Closed2016-05-05
Blocks Installer - Feature #14453: Generate Kafo parser cache during buildClosed2016-04-04

Associated revisions

Revision c04662f2 (diff)
Added by Dominic Cleal over 5 years ago

fixes #14473 - set default file reading encoding to UTF-8

Revision 0c7ab070
Added by Marek Hulán over 5 years ago

Merge pull request #16 from domcleal/14473-manifests-read-utf8

fixes #14473 - set default file reading encoding to UTF-8

History

#1 Updated by Dominic Cleal over 5 years ago

  • Blocks Feature #14453: Generate Kafo parser cache during build added

#2 Updated by The Foreman Bot over 5 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/kafo_parsers/pull/16 added

#3 Updated by Dominic Cleal over 5 years ago

  • Related to Bug #13219: Foreman unable to import puppet class with unicode characters. added

#4 Updated by Dominic Cleal over 5 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#5 Updated by Dominic Cleal over 5 years ago

  • Related to Bug #14932: Puppet Strings JSON parsing error with UTF-8 vs US-ASCII (Encoding::InvalidByteSequenceError) added

#6 Updated by Lukas Zapletal almost 5 years ago

  • Bugzilla link set to 1395707

Also available in: Atom PDF