Feature #15095

Add Puppet server environment_classes API support

Added by Dominic Cleal over 1 year ago. Updated 12 months ago.

Status:Closed
Priority:Normal
Assigned To:Dmitri Dolguikh
Category:Puppet
Target version:-
Difficulty: Bugzilla link:
Found in release: Pull request:https://github.com/theforeman/foreman-packaging/pull/1362, https://github.com/theforeman/smart-proxy/pull/460
Story points-
Velocity based estimate-
Release1.14.0Release relationshipAuto

Description

For Puppet Server 2.3.0 or higher (Puppet version 4.4+), a new environment_classes API is available that replaces resource_types.

https://docs.puppet.com/puppetserver/2.3/release_notes.html#new-feature-environmentclasses-api
https://docs.puppet.com/puppetserver/2.3/puppet-api/v3/environment_classes.html

In Puppet 4.5 (probably Puppet Server 2.4.0?) the older resource_types API is deprecated:

https://docs.puppet.com/puppet/4.5/reference/release_notes.html#deprecations

There are some features that we can expose in the smart proxy, e.g.

  1. typing via default_literal - Foreman already follows the type of the default value in the JSON response (int, hash etc) to set the type of the smart class parameter. resource_types returns everything as a string.
  2. reporting of errors - this could be logged on the smart proxy and/or added to the API response
  3. clearer caching semantics with etag/matching support

Related issues

Related to Smart Proxy - Feature #13667: puppet_proxy and puppetca modules load puppet gem in pupp... Closed 02/11/2016
Related to Foreman - Bug #3900: Class removed because invalid syntax validation New 12/17/2013
Related to Smart Proxy - Bug #15461: Smart-Proxy is unable to retrieve puppet environments due... Resolved 06/20/2016
Related to Smart Proxy - Bug #2289: smart-proxy should warn when it cannot read some puppet m... Resolved 03/07/2013
Related to Smart Proxy - Bug #16760: Cannot load concurrent ruby in smart proxy puppet V3 API Closed 09/30/2016
Related to Smart Proxy - Bug #18290: "Puppet is taking too long to respond" during class impor... Closed 01/27/2017
Blocks Foreman - Tracker #15096: Puppet 5 support Closed 05/19/2016

Associated revisions

Revision 8799d0c4
Added by Dmitri Dolguikh 12 months ago

Fixes #15095 - Support for puppet environment classes api

- Ruby 1.8.7 is NOT supported.
- This will attempt to cache puppet classes and rely on etag for cache
validation. Enable puppet's environment class cache for this feature
to have effect.
- It will return a timeout error to the client if puppet doesn't
respond within 15 seconds. The module will wait for 5 minutes to
update the classes cache before timing out however.
- Extended puppet api to return extended puppet classes information,
including errors

History

#1 Updated by Dominic Cleal over 1 year ago

  • Related to Feature #13667: puppet_proxy and puppetca modules load puppet gem in puppet 4.0 and higher environments added

#2 Updated by Dominic Cleal over 1 year ago

#3 Updated by Dmitri Dolguikh over 1 year ago

  • Status changed from New to Assigned
  • Assigned To set to Dmitri Dolguikh

#4 Updated by Dominic Cleal over 1 year ago

  • Related to Bug #3900: Class removed because invalid syntax validation added

#5 Updated by Dominic Cleal over 1 year ago

  • Description updated (diff)

#6 Updated by Dmitri Dolguikh over 1 year ago

  • Related to Bug #15461: Smart-Proxy is unable to retrieve puppet environments due to timeout added

#7 Updated by The Foreman Bot about 1 year ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/smart-proxy/pull/460 added

#8 Updated by Dmitri Dolguikh about 1 year ago

  • Related to Bug #2289: smart-proxy should warn when it cannot read some puppet module file or directory added

#9 Updated by Anonymous 12 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#10 Updated by Dominic Cleal 12 months ago

  • Release set to 1.14.0

#11 Updated by The Foreman Bot 12 months ago

  • Pull request https://github.com/theforeman/foreman-packaging/pull/1362 added

#12 Updated by Dominic Cleal 12 months ago

  • Related to Bug #16760: Cannot load concurrent ruby in smart proxy puppet V3 API added

#13 Updated by Dominic Cleal 8 months ago

  • Related to Bug #18290: "Puppet is taking too long to respond" during class import with Puppet 4.x added

Also available in: Atom PDF