Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/rhsm_repo: Could not autoload puppet/provider/rhsm_repo/subscription_manager: no such file to load -- puppet/type/rhsm_repo
This is not totally unexpected; puppetserver's ruby load path does not get set up to find all ruby code implementing custom types within puppet modules. See issue SERVER-94 among others.
Note that the error may go away on subsequent puppet runs within the same ruby process as it caches ruby code.
I found that the "require 'puppet/type/rhsm_*'" statement in the various providers is not actually required, since the provider code in there only needs access to the puppet type class methid to register a provider with a given type (which is passed by name) and not need to access the actual definitions of the type it provides for.
There's a pull request out that does just that; the patches are tested on puppetmaster/passenger v3.8 and puppetserver/jruby 2.4
The error encountered is this:
This is not totally unexpected; puppetserver's ruby load path does not get set up to find all ruby code implementing custom types within puppet modules. See issue SERVER-94 among others. Note that the error may go away on subsequent puppet runs within the same ruby process as it caches ruby code. I found that the "require 'puppet/type/rhsm_*'" statement in the various providers is not actually required, since the provider code in there only needs access to the puppet type class methid to register a provider with a given type (which is passed by name) and not need to access the actual definitions of the type it provides for.
There's a pull request out that does just that; the patches are tested on puppetmaster/passenger v3.8 and puppetserver/jruby 2.4