Issue #13429 has been updated by Chris Price. Status changed from Accepted to In Topic Branch Pending Review Branch set to https://github.com/puppetlabs/puppet/pull/710
Pull request for puppet: https://github.com/puppetlabs/puppet/pull/710 Pull request for mcollective-plugins: https://github.com/puppetlabs/mcollective-plugins/pull/38 Merging the change to mcollective-plugins will break backwards compatibility, so someone will need to make a decision whether to merge as-is and establish a version-compatibility matrix, or whether to modify this commit with some backwards-compatibility hacks, or... ---------------------------------------- Bug #13429: Puppet::Resource fails when used from scripts https://projects.puppetlabs.com/issues/13429#change-61380 Author: Matt Robinson Status: In Topic Branch Pending Review Priority: Normal Assignee: Chris Price Category: Target version: Telly Affected Puppet version: Keywords: Branch: https://github.com/puppetlabs/puppet/pull/710 Something changed in the master branch in commit:e465c160d6d6c592a86aba2db74c5c9e5cb0ecab that broke the way mcollective's puppetral agent uses Puppet::Resource. It used to be the following would work to create a puppet resource: require 'puppet' Puppet.settings.parse resource = Puppet::Resource.new('file', '/tmp/blahd', :parameters => { :ensure ='present', :content => "blahd" }) result, report = Puppet::Resource.indirection.save(resource) Now running that gets the following error: /Users/matthewrobinson/work/puppet/lib/puppet/util/settings.rb:838:in `value': Error converting value for param 'statedir': Could not find value for $vardir (Puppet::SettingsError) from /Users/matthewrobinson/work/puppet/lib/puppet/util/settings.rb:50:in `[]' from /Users/matthewrobinson/work/puppet/lib/puppet.rb:65:in `[]' from /Users/matthewrobinson/work/puppet/lib/puppet/util/storage.rb:47:in `load' from /Users/matthewrobinson/work/puppet/lib/puppet/resource/catalog.rb:130:in `apply' from /Users/matthewrobinson/work/puppet/lib/puppet/indirector/resource/ral.rb:30:in `save' from /Users/matthewrobinson/work/puppet/lib/puppet/indirector/indirection.rb:271:in `save' from /Users/matthewrobinson/resource.rb:4 -- 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.
