Issue #13501 has been updated by Werner Bahlke.

Here is some additional information:

OS Version:  FreeBSD <hostname> 8.2-RELEASE-p3 FreeBSD 8.2-RELEASE-p3 #0

Puppet Version:  puppet --version 2.7.9

We do not directly install from ports, but from a build server. See the 
install.pp manifest:

more install.pp 

class spamassassin::install {

  package { [ 'mail/p5-Mail-SpamAssassin' ]:
    ensure   => installed,
    provider => freebsd,
    source   => 'http://<hostname>/tb/packages/8.2-FreeBSD-SHN/',
  }
}

SInce the problem has been worked around I cannot at this moment provide a run 
which still causes the error.

But if you install puppet on a client and add a module spamassassin with the 
above install and follow these steps you should be able to reproduce it:

Run puppet agent.  

Then, once it's all working fine, run these commands:

pkg_info | grep bsdpan
# Should not see any output

sa-compile
# See a bunch of compiler output

pkg_info | grep bsdpan
# Now you see 1 line of output

run_agent
# Fails

pkg_delete bsdpan-\*
# Remove unmanaged package

run_agent
# Success!

----------------------------------------
Feature #13501: Better error message for err: Could not prefetch package 
provider 'freebsd': No resource and no name in property hash in freebsd instance
https://projects.puppetlabs.com/issues/13501#change-58958

Author: Werner Bahlke
Status: Needs More Information
Priority: Normal
Assignee: Werner Bahlke
Category: 
Target version: 
Affected Puppet version: 
Keywords: error message, freebsd provider, freebsd
Branch: 


This error has to do with installing the mail/p5-Mail-SpamAssassin package and 
how the new package is constructed. When we tried another test and installed a 
random package (found in the ports tree) manually and ran the agent again, we 
had no problem completing successfully, even though an unknown package was 
installed.

The SA rule package is not "real" in the sense that it comes from the ports 
tree and has an entry in the INDEX file that Puppet uses.  The command that 
Puppet uses to enumerate packages is missing a piece of information (the port's 
"origin"), and that causes the error that we've seen.  Any other package 
installed from the ports tree has an origin, and Puppet doesn't have a problem, 
even if it didn't install it.

We also found that we can prevent the sa-update cron script from registering 
the package after it's installed.  This will allow the SA rules to be updated 
periodically, but it will also avoid the Puppet error.

At the very least, we'd love to see a better error message from Puppet, perhaps 
including the package name causing the failure.  That would have tipped us off 
sooner.


-- 
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