Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-3438

Pass facts from catalog requests directly to node requests.

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Duplicate
    • Affects Version/s: PUP 3.7.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      3

      Description

      During an agent run, the Puppet::Configurer scrapes the node with facter and then
      makes a Puppet::Resource::Catalog.indirection.find request with the pson serialized facts as part of the query. This is fielded by the Puppet::Indirection::Catalog::Compiler terminus on the master, which extracts the facts, and saves them via a Puppet::Node::Facts.indirection.save. The compiler terminus then looks up the node via a Puppet::Node.indirection.find, and the various node termini are then responsible for creating a node and, usually, for calling Node#fact_merge on it. The fact_merge retrieves the facts from a Puppet::Node::Facts.indirection.find and merges the facts into the node's parameters.

      Specifically in the case of a catalog request, it seems unnecessary for the node to have to look up the facts from another facts terminus when we have a fresh copy of the facts present.

      Instead we could alter the Node find endpoint to allow facts to be passed in the request. And then node indirection termini could extract the facts directly and merge them in without querying the facts indirection.

      Alternatively, we could merge the facts directly in Puppet::Indirector::Catalog::Compiler#find https://github.com/puppetlabs/puppet/blob/master/lib/puppet/indirector/catalog/compiler.rb#L49. This has problems though; if the catalog request is made without facts, and we have modified node termini not to look up facts, then we get a node without facts.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                joshua.partlow Joshua Partlow
                QA Contact:
                Kurt Wall
              • Votes:
                2 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support