Issue #5755 has been updated by Charlie Sharpsteen. Keywords changed from catalog, yaml to catalog, yaml customer
---------------------------------------- Bug #5755: Unable to load puppet generated catalog via YAML.load_file https://projects.puppetlabs.com/issues/5755#change-88733 * Author: konrad rzentarzewski * Status: Closed * Priority: Urgent * Assignee: Markus Roberts * Category: serialization * Target version: 2.6.5 * Affected Puppet version: 2.6.4 * Keywords: catalog, yaml customer * Branch: 2.6.next ---------------------------------------- in 0.25.5 it was possible to load back puppet-generated yaml. this does not seem to be possible with 2.6.4. <1>root@test1(2)~$ cat <<.|/usr/bin/ruby ; echo $? > require 'puppet' > require 'yaml' > puts Puppet.version > p = YAML.load_file('/var/lib/puppet/client_yaml/catalog/$HOSTNAME.yaml') > puts p.class > . 0.25.5 Puppet::Resource::Catalog 0 and: <0>root@test2(22)~$ cat <<.|/usr/bin/ruby ; echo $? > require 'puppet' > require 'yaml' > puts Puppet.version > p = YAML.load_file('/var/lib/puppet/client_yaml/catalog/$HOSTNAME.yaml') > puts p.class > . 2.6.4 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `transfer': can't convert Array into String (TypeError) from /usr/lib/ruby/1.8/yaml.rb:133:in `each' from /usr/lib/ruby/1.8/yaml.rb:133:in `transfer' from /usr/lib/ruby/1.8/yaml.rb:133:in `node_import' from /usr/lib/ruby/1.8/yaml.rb:133:in `load' from /usr/lib/ruby/1.8/yaml.rb:133:in `load' from /usr/lib/ruby/1.8/yaml.rb:144:in `load_file' from /usr/lib/ruby/1.8/yaml.rb:143:in `open' from /usr/lib/ruby/1.8/yaml.rb:143:in `load_file' from -:4 1 after changing in yaml file <ins>*id[0-9]+:</ins> to <ins>id[0-9]+:</ins> file is being loaded, so the flaw must be somewhere in yaml referencing code (zaml?). <0>root@test2(32)~$ perl -pi -e 's/\*(id\d+:)/$1/g' </var/lib/puppet/client_yaml/catalog/$HOSTNAME.yaml >/tmp/poc.yaml <0>root@test2(33)~$ cat <<.|/usr/bin/ruby ; echo $? > require 'puppet' > require 'yaml' > puts Puppet.version > p = YAML.load_file('/tmp/poc.yaml') > puts p.class > . 2.6.4 Puppet::Resource::Catalog 0 -- 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 unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
