Issue #2770 has been updated by Markus Roberts.

Markus Roberts wrote:
> The UTF-8 aspects are probably a red-herring (though I'm still not clear 
> about your comment "Runnning puppet without ruby-iconv installed works fine 
> so far").  Do you mean by this that the pson problems do _not_ occur when 
> iconv is absent?

Peter Meier wrote: 
> yes, they don't occur and puppet seems to work, except the nasty message 
> print to stderr. I assumed puppet switches to yaml?

Ah.  That puts a different complexion on it.  Here's what I think is going on:

* You have a resource with a namevar, title, or target that contains or 
consists of characters with the high bit set.  Depending on the environment you 
may see these as the corresponding 7-bit ASCII character or as a unicode 
character that, to the human eye, looks like one.
* Without iconv, these are passed verbatum and everything works, apart from the 
warning, because what the client gets is exactly what's on the server.
* With iconv installed (and assuming //IGNORE) it removes these and, on 
encoding, produces relations that have an empty target designation.
* This then fails

It matches all the evidence save one point: in the catalog you emailed there is 
no evidence of such a character.  

However, the data was also split into multiple lines and showed other evidence 
that some process had massaged it in transit, and it is possible that this 
process also removed the odd character(s).  Can you describe how you captured 
it?

Thanks,
-- Markus



----------------------------------------
Bug #2770: pson not properly serializing some resources
http://projects.reductivelabs.com/issues/2770

Author: Peter Meier
Status: Accepted
Priority: Normal
Assigned to: Markus Roberts
Category: serialization
Target version: 0.25.2
Affected version: 0.25.1
Keywords: pson
Branch: 


Switching on openbsd 4.3 to 0.25.1 I get as first this warning printed to 
stderr:

<pre>
Failed to load feature test for pson: iconv couldn't be loaded, which is 
required for UTF-8/UTF-16 conversions
</pre>

I then installed ruby-iconv to have iconv support present for ruby (@ruby 1.8.6 
(2007-09-24 patchlevel 111) [i386-openbsd4.3]@ btw.) however every run fails 
with the following error:

<pre>
info: Loading facts in xen
debug: Format s not supported for Puppet::Resource::Catalog; has not 
implemented method 'from_s'
/usr/local/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:438:in 
`edge_from_pson'
/usr/local/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:417:in `from_pson'
/usr/local/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:416:in `each'
/usr/local/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:416:in `from_pson'
/usr/local/lib/ruby/site_ruby/1.8/puppet/util/pson.rb:11:in `pson_create'
/usr/local/lib/ruby/site_ruby/1.8/puppet/external/pson/pure/parser.rb:256:in 
`parse_object'
/usr/local/lib/ruby/site_ruby/1.8/puppet/external/pson/pure/parser.rb:97:in 
`parse'
/usr/local/lib/ruby/site_ruby/1.8/puppet/external/pson/common.rb:133:in `parse'
/usr/local/lib/ruby/site_ruby/1.8/puppet/network/formats.rb:146:in `intern'
/usr/local/lib/ruby/site_ruby/1.8/puppet/network/format_handler.rb:13:in `send'
/usr/local/lib/ruby/site_ruby/1.8/puppet/network/format_handler.rb:13:in 
`protect'
/usr/local/lib/ruby/site_ruby/1.8/puppet/network/format_handler.rb:28:in 
`intern'
/usr/local/lib/ruby/site_ruby/1.8/puppet/network/format_handler.rb:97:in 
`convert_from'
/usr/local/lib/ruby/site_ruby/1.8/puppet/indirector/rest.rb:50:in `deserialize'
/usr/local/lib/ruby/site_ruby/1.8/puppet/indirector/rest.rb:69:in `find'
/usr/local/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:198:in `find'
/usr/local/lib/ruby/site_ruby/1.8/puppet/indirector.rb:51:in `find'
/usr/local/lib/ruby/site_ruby/1.8/puppet/configurer.rb:94:in `retrieve_catalog'
/usr/local/lib/ruby/site_ruby/1.8/puppet/util.rb:417:in `thinmark'
/usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/local/lib/ruby/1.8/benchmark.rb:307:in `realtime'
/usr/local/lib/ruby/site_ruby/1.8/puppet/util.rb:416:in `thinmark'
/usr/local/lib/ruby/site_ruby/1.8/puppet/configurer.rb:93:in `retrieve_catalog'
/usr/local/lib/ruby/site_ruby/1.8/puppet/configurer.rb:145:in `run'
/usr/local/lib/ruby/site_ruby/1.8/puppet/agent.rb:53:in `run'
/usr/local/lib/ruby/site_ruby/1.8/puppet/agent/locker.rb:21:in `lock'
/usr/local/lib/ruby/site_ruby/1.8/puppet/agent.rb:53:in `run'
/usr/local/lib/ruby/1.8/sync.rb:229:in `synchronize'
/usr/local/lib/ruby/site_ruby/1.8/puppet/agent.rb:53:in `run'
/usr/local/lib/ruby/site_ruby/1.8/puppet/agent.rb:130:in `with_client'
/usr/local/lib/ruby/site_ruby/1.8/puppet/agent.rb:51:in `run'
/usr/local/lib/ruby/site_ruby/1.8/puppet/application/puppetd.rb:103:in `onetime'
/usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:226:in `send'
/usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:226:in `run_command'
/usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:217:in `run'
/usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `exit_on_fail'
/usr/local/lib/ruby/site_ruby/1.8/puppet/application.rb:217:in `run'
/usr/local/sbin/puppetd:159
err: Could not retrieve catalog from remote server: Could not intern from pson: 
Could not convert from pson: Could not find relationship target ''
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
</pre>

Runnning puppet without ruby-iconv installed works fine so far. Except that the 
warning is printed to stderr, as I think it should rather be a puppet warning, 
shouldn't it? -> I can file a second bug if it should rather be a puppet 
warning.


-- 
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://reductivelabs.com/redmine/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