Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-11123

puppet-agent : unless clause in windows.pp causes all facts to be resolved

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: puppet_agent
    • Labels:
    • Template:
      MODULES Bug Template
    • Team:
      Night's Watch
    • Story Points:
      2
    • Sprint:
      NW - 2021-09-08
    • Method Found:
      Needs Assessment
    • Zendesk Ticket IDs:
      44935
    • Zendesk Ticket Count:
      1
    • Release Notes:
      Not Needed
    • QA Risk Assessment:
      Needs Assessment

      Description

      Module Version:
      2.2.1 and newer
      Puppet Version:
      All
      OS Name/Version:
      Windows

      Currently, the unless clause here shells out to facter -p to get the agent version. https://github.com/puppetlabs/puppetlabs-puppet_agent/blob/8e6bdc474045119a2c47c6666aa349402835bf89/manifests/install/windows.pp#L107-L123

      This check was added as part of MODULES-9846 in order to prevent cached catalogs from re-installing the .msi.

      However, facter -p <fact> resolves all facts, not just <fact>. This introduces the possibility of other, possibly custom, facts causing issues ranging from runtimes that exceed the 5 minute timeout that exec resources have in Puppet 6 to extra logging output produced by facter causing the check to register a false positive.

      Timeouts are especially dangerous as they can leave orphaned facter.exe processes that eventually exhaust system resources.

      Desired Behavior:
      puppet-agent does not shell out to facter on Windows

      Actual Behavior:
      puppet-agent does shell out to facter on Windows

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              luchian.nemes Luchian Nemes
              Reporter:
              adrian.parreiras-horta Adrian Parreiras Horta
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support