Issue #10291 has been updated by Oliver Hookins.

File test.pp.gz added

# ruby -v
ruby 1.8.5 (2006-08-25) [x86_64-linux]

# cat /etc/redhat-release 
CentOS release 5.6 (Final)

I'll try to attach the manifest but no guarantees Redmine doesn't mangle it.

Here is the full output:

# puppet apply test.pp -v --debug --trace
/usr/lib/ruby/site_ruby/1.8/puppet/parser/lexer.rb:19:in `lex_error'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/lexer.rb:452:in `scan'
/usr/lib/ruby/1.8/racc/parser.rb:152:in `_racc_yyparse_c'
/usr/lib/ruby/1.8/racc/parser.rb:152:in `__send__'
/usr/lib/ruby/1.8/racc/parser.rb:152:in `yyparse'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/parser_support.rb:181:in `parse'
/usr/lib/ruby/site_ruby/1.8/puppet/resource/type_collection.rb:168:in 
`perform_initial_import'
/usr/lib/ruby/site_ruby/1.8/puppet/node/environment.rb:84:in 
`known_resource_types'
/usr/lib/ruby/1.8/monitor.rb:238:in `synchronize'
/usr/lib/ruby/site_ruby/1.8/puppet/node/environment.rb:81:in 
`known_resource_types'
/usr/lib/ruby/site_ruby/1.8/puppet/resource/type_collection_helper.rb:5:in 
`known_resource_types'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:434:in `initvars'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:192:in `initialize'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:18:in `new'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:18:in `compile'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:77:in 
`compile'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:198:in `benchmark'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:75:in 
`compile'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:34:in `find'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:188:in `find'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector.rb:50:in `find'
/usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:115:in `main'
/usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:35:in `run_command'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:304:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:410:in `exit_on_fail'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:304:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:59:in `execute'
/usr/bin/puppet:4
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:21:in `compile'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:77:in 
`compile'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:198:in `benchmark'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:75:in 
`compile'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:34:in `find'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:188:in `find'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector.rb:50:in `find'
/usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:115:in `main'
/usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:35:in `run_command'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:304:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:410:in `exit_on_fail'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:304:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:59:in `execute'
/usr/bin/puppet:4
Could not parse for environment production: Could not match   notice('hello at 
/root/test.pp:2 on node testnode

----------------------------------------
Bug #10291: UTF8 non-breaking space in a manifest breaks the parser
https://projects.puppetlabs.com/issues/10291

Author: Oliver Hookins
Status: Needs More Information
Priority: Normal
Assignee: Kelsey Hightower
Category: 
Target version: 
Affected Puppet version: 2.6.7
Keywords: 
Branch: 


<code>
err: Could not parse for environment production: Could not match  Yum::Repo at 
/home/ohookins/svn/redacted/repo.pp:4
</code>

The actual code is unremarkable, but the problem is here:

<code>
00000020  20 7b 0a 20 c2 a0 59 75  6d 3a 3a 52 65 70 6f 20  | {. ..Yum::Repo |
00000030  7b 0a 20 c2 a0 c2 a0 c2  a0 6d 65 74 61 64 61 74  |{. ......metadat|
</code>

Somehow we've ended up with a UTF8 "nbsp" in our manifest (the 0xc2a0). Sure, I 
can just remove these characters but it suggests to me that perhaps the Unicode 
support in the parser is incomplete, which is a larger problem for 
internationalisation.




-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to