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

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • None
    • puppet_agent
    • Night's Watch
    • 2
    • NW - 2021-09-08
    • Needs Assessment
    • 44935
    • 1
    • Not Needed
    • 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

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

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support