Issue #22453 has been updated by Michelle Sullivan. File fbsd-pkg-origin.patch added
Added DIFF/Patch as attachment as didn't expect my text report to be treated as non text.. sorry ---------------------------------------- Bug #22453: Error: Could not prefetch package provider 'freebsd': No resource and no name in property hash in freebsd instance [with 'patch] https://projects.puppetlabs.com/issues/22453#change-97252 * Author: Michelle Sullivan * Status: Unreviewed * Priority: Normal * Assignee: Patrick Carlisle * Category: FreeBSD * Target version: * Affected Puppet version: 3.2.4 * Keywords: freebsd provider, freebsd, error message * Branch: ---------------------------------------- After installing a clean system on Softlayer kept getting: Error: Could not prefetch package provider 'freebsd': No resource and no name in property hash in freebsd instance for all packages - however it was working on previously installed hosts. In 3.2.4 (I think) /usr/local/lib/ruby/site_ruby/1.9/puppet/provider/package/freebsd.rb was updated not to rely on functions in /usr/local/lib/ruby/site_ruby/1.9/puppet/provider/package/openbsd.rb (don't know whether this is a related issue or just something that happened to be at the same time) anyhow: After some debugging found that: Error: Could not prefetch package provider 'freebsd': No resource and no name in property hash in freebsd instance Is cause by having any package installed on the system without an origin set. All Softlayer FreeBSD hosts that have Adaptec RAID controllers have the Adaptec StoreManager package installed by default. This as part of the installation has no origin, if it is removed then reloaded the reloaded version has an origin and the problem goes away and then it is seemingly un-reproducable (other issues/tickets indicate the origin issue, but none see to be fixed. The issue can be seen by adding a debug line to produce the following output: Debug: Prefetching freebsd resources for package Debug: Executing '/usr/sbin/pkg_info -aoQ' Debug: MIS-DEBUG: provider: freebsd name: ensure: amd64 Debug: MIS-DEBUG: provider: freebsd name: textproc/augeas ensure: 1.1.0 Debug: MIS-DEBUG: provider: freebsd name: sysutils/dmidecode ensure: 2.11 Debug: MIS-DEBUG: provider: freebsd name: devel/libexecinfo ensure: 1.1_3 Debug: MIS-DEBUG: provider: freebsd name: devel/libffi ensure: 3.0.13 Debug: MIS-DEBUG: provider: freebsd name: converters/libiconv ensure: 1.14_1 Debug: MIS-DEBUG: provider: freebsd name: textproc/libxml2 ensure: 2.8.0_2 Debug: MIS-DEBUG: provider: freebsd name: textproc/libyaml ensure: 0.1.4_2 Debug: MIS-DEBUG: provider: freebsd name: devel/p5-Hash-MultiValue ensure: 0.15 Debug: MIS-DEBUG: provider: freebsd name: devel/pkgconf ensure: 0.9.2_1 Debug: MIS-DEBUG: provider: freebsd name: sysutils/puppet ensure: 3.2.3 Debug: MIS-DEBUG: provider: freebsd name: lang/ruby19 ensure: 1.9.3.448,1 Debug: MIS-DEBUG: provider: freebsd name: devel/ruby-gems ensure: 1.8.25 Debug: MIS-DEBUG: provider: freebsd name: converters/ruby-iconv ensure: 1.9.3.448,1 Debug: MIS-DEBUG: provider: freebsd name: archivers/rubygem-bzip2 ensure: 0.2.7 Debug: MIS-DEBUG: provider: freebsd name: sysutils/rubygem-facter ensure: 1.6.18_2 Debug: MIS-DEBUG: provider: freebsd name: sysutils/rubygem-hiera ensure: 1.1.2 Debug: MIS-DEBUG: provider: freebsd name: devel/rubygem-json_pure ensure: 1.7.7 Debug: MIS-DEBUG: provider: freebsd name: textproc/rubygem-augeas ensure: 0.5.0 Error: Could not prefetch package provider 'freebsd': No resource and no name in property hash in freebsd instance pkg_info -aoQ produces the following on the same system: StorMan-7.00-18781-amd64: augeas-1.1.0:textproc/augeas dmidecode-2.11:sysutils/dmidecode libexecinfo-1.1_3:devel/libexecinfo libffi-3.0.13:devel/libffi libiconv-1.14_1:converters/libiconv libxml2-2.8.0_2:textproc/libxml2 libyaml-0.1.4_2:textproc/libyaml p5-Hash-MultiValue-0.15:devel/p5-Hash-MultiValue pkgconf-0.9.2_1:devel/pkgconf puppet-3.2.3:sysutils/puppet ruby-1.9.3.448,1:lang/ruby19 ruby19-gems-1.8.25:devel/ruby-gems ruby19-iconv-1.9.3.448,1:converters/ruby-iconv rubygem-bzip2-0.2.7:archivers/rubygem-bzip2 rubygem-facter-1.6.18_2:sysutils/rubygem-facter rubygem-hiera-1.1.2:sysutils/rubygem-hiera rubygem-json_pure-1.7.7:devel/rubygem-json_pure rubygem-ruby-augeas-0.5.0:textproc/rubygem-augeas The following very simple patch forces an empty origin field to 'custom' and therefore if the user has their own package server they can specify originless packages as being in a .*/custom/<pkg-name> directory, and if the package is already installed (such as all Softlayer FreeBSD installs, or with SpamAssassin as previous reports indicate, the missing origin does not cause the error and abort the package installation process.) --- puppet/provider/package/freebsd.rb.orig 2013-09-07 10:38:18.000000000 -0500 +++ puppet/provider/package/freebsd.rb 2013-09-07 10:32:08.000000000 -0500 @@ -59,6 +59,7 @@ output.split("\n").each do |data| pkg_string, pkg_origin = data.split(":") pkg_info = self.parse_pkg_string(pkg_string) + pkg_origin = ( pkg_origin = "" ? "custom" : pkg_origin ) packages << new({ :provider => self.name, (Marked as Bug because Puppet should not abort if an originless package is installed - Duplicate of http://projects.puppetlabs.com/issues/13501 ?) -- 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. For more options, visit https://groups.google.com/groups/opt_out.
