The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using https://tickets.puppetlabs.com. See the following page for information on filing tickets with JIRA:

Refactor #7703

Handling of Known Resource Types data in the environment is nasty...

Added by Anonymous almost 5 years ago. Updated about 4 years ago.

Status:AcceptedStart date:05/27/2011
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:compiler
Target version:3.x
Affected Puppet version:2.6.0 Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com


Description

The root cause of #5318 is that we handle the set of known resource types for an environment very strangely in our compiler. Specifically, we treat it as a kind of magic global that is always accessed through the environment, which then uses thread local caching, cache invalidation in random other functions, and other tricks to try and make it a per-thread semi-local variable.

A much better solution would be to capture that state at the start of the compile run, then pass it through local state to the places that consume it. This gives the same benefits without the complexity of managing a quasi-global value. It would mean that loading could always check for an update to the manifests and reparse, that memory use was better managed, that we have no thread-model dependencies, so behave the same on all application containers, and generally kill complicated code.

(We also have another thread local cache next to this in the compiler, which probably needs the same treatment, but has far fewer tentacles floating around.)


Related issues

Related to Puppet - Bug #5318: puppet master behind passenger does not re-parse manifest... Closed 11/16/2010
Related to Puppet - Bug #12173: Masters cannot reliably distinguish between multiple vers... Accepted 01/25/2012

History

#1 Updated by Anonymous over 4 years ago

  • Assignee deleted (Nigel Kersten)

Also available in: Atom PDF