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

Debug logging for Exec resources should include 'creates' checks

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • PUP 6.3.0
    • PUP 6.4.0
    • None
    • Coremunity
    • Platform Core KANBAN
    • Enhancement
    • Puppet now gives a debug message when checking the existence of the file specified by 'creates', if given.
    • Needs Assessment

    Description

      Currently, running Puppet in debug mode with an Exec resource will indicate when the agent evaluates the 'onlyif' and 'unless' checks. It does not, however, indicate when 'creates' check is evaluated.

      From a user's perspective, this is inconsistent behavior and may cause confusion when troubleshooting Exec resources.

      exec { 'wat':
       command => 'touch /etc/creates.txt',
       path => $facts['path'],
       creates => '/etc/creates.txt',
       onlyif => 'test -d /etc',
       unless => 'test -d /unless',
      }

      Info: Applying configuration version '1551385197'
      Debug: Exec[wat](provider=posix): Executing check 'test -d /unless'
      Debug: Executing: 'test -d /unless'
      Debug: Exec[wat](provider=posix): Executing check 'test -d /etc'
      Debug: Executing: 'test -d /etc'
      Debug: Finishing transaction 70310589934020
      Debug: Storing state
      Debug: Pruned old state cache entries in 0.00 seconds
      Debug: Stored state in 0.01 seconds
      Notice: Applied catalog in 0.06 seconds

       

      Attachments

        Activity

          People

            kris.bosland Kris Bosland
            ragnarkon Bryan Woolsey
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support