-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
catalog_diff fails to evaluate catalogs with Deferred functions #105
Comments
The problem is catalog-diff requests a catalog in
To request a "rich data" catalog you'll need to create the loaders on the client side and specify the rich data catalog mime type. If you're using the catalog v3 endpoint, then you can just use the builtin http client: require 'puppet'
Puppet.initialize_settings
Puppet::Util::Log.newdestination(:console)
Puppet[:log_level] = :info
env = Puppet::Node::Environment.remote("production")
Puppet.push_context({
current_environment: env,
loaders: Puppet::Pops::Loaders.new(env, true),
rich_data: true
})
# Probably want to load previously saved facts using `Puppet::Node::Facts.from_data_hash` instead
facts = Puppet::Node::Facts.indirection.find(Puppet[:certname])
client = Puppet.runtime[:http]
session = client.create_session
service = session.route_to(:puppet)
response, catalog = service.post_catalog(Puppet[:certname], facts: facts, environment: env.name)
pp catalog.to_data_hash For example, I see the
If you need to call the v4 catalog endpoint, then you'll need to pass the correct
And pass that to
|
For the reference, and to answer @bastelfreak question, I use the following command options
|
I tried to patch at least v4 catalog here: And It didn't help, @joshcooper , what did I miss?
|
With puppetlabs/mysql module switching to Deferred function, I noticed that catalog_diff fails to evaluate the catalog. In puppetserver.log I observe the following error:
puppet 7.26.0
puppetserver 2021.7.5.17
The text was updated successfully, but these errors were encountered: