Bug 251576

Summary: [sysutils/puppet6] Ressource problem sshkey with ruby 27
Product: Ports & Packages Reporter: albert.shih
Component: Individual Port(s)Assignee: FreeBSD Puppet Team <puppet>
Status: Closed Works As Intended    
Severity: Affects Many People CC: mikael, romain
Priority: --- Flags: bugzilla: maintainer-feedback? (puppet)
Version: Latest   
Hardware: Any   
OS: Any   

Description albert.shih 2020-12-04 09:45:43 UTC
Hi everyone.

The serverity of this bug are not very high but I think it impact lot of peoples

Just today I upgrade my puppetserver (Linux) to puppet6 from puppet5

I also upgrade some of my linux client to puppet6 and everything work fine.

I just upgrade my FreeBSD client from puppet5 + ruby 26 -> puppet6+ruby27 mostly because puppet5 ports are mark broken. 

But puppet6+ruby27 on FreeBSD 12.2 the puppet agent don't seem to work  correctly, he didn't seem to have acces to the basic resource of sshkey

For exemple, from a fresh install 12.2 jail I install puppet6+ruby27 (build from poudriere) and run the agent I got 

Info: Using configured environment 'jas'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Error: Failed to apply catalog: Parameter name failed on Resources[sshkey]: Could not find resource type 'sshkey' (file: /etc/puppetlabs/code/environments/production/modules/ssh/manifests/knownhosts.pp, line: 6)

To make it work I need to install the 

https://forge.puppet.com/modules/puppetlabs/sshkeys_core/reference

in my puppet module collection. It's not a big deal.

But I don't see why the freebsd version of puppet6 dont include this...well basic feature ;-)

Regards
Comment 1 Mikael Urankar freebsd_committer 2020-12-04 16:28:05 UTC
(In reply to albert.shih from comment #0)
sshkey and a few other types were removed in Puppet 6.x.
Comment 2 Romain Tartière freebsd_committer 2020-12-05 00:31:40 UTC
Hi!

Yes, a bunch of basic Puppet types are not part of Puppet anymore (starting with Puppet 6).  The All-In-One package by Puppetlabs still include them, but when you are not using this package (for example when using the FreeBSD port or the Puppet gem), you must distribute these modules.

As you found out, the easiest way is to add the corresponding puppetlabs/*_core modules in your control-repo.

Bundling these modules in the FreeBSD package does not make much sense for me, so the FreeBSD port install "vanilla Puppet", and we expect users to distribute the modules they need.

Please note that you can distribute a different version of one of these modules than the one bundled in the AIO package.  In this case, the distributed version is the one that will be used.  This makes a consistent deployment, and can help when there are issues with a core module (at some point, the sshkey module was unable to remove ssh keys for example).