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

puppet agent runs report time spent applying catalogue but omit total time spent

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Do
    • Affects Version/s: PUP 4.2.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      RHEL 7

      Description

      Overview

      Puppet agent reports time spent applying the catalogue but does not report the total time spent running the command (or compiling the catalogue).

      Problems this causes

      Sometimes external factors such as https://tickets.puppetlabs.com/browse/PE-11243 cause catalogue compilation to take several minutes but the agent reports that it has only spent a few seconds running.

      This initially seems to indicate that the VM running puppet is losing time, possibly due to contention in the hypervisor system. This wastes time and effort investigating phantom problems.

      Workaround

      Customers should use the time command to verify that VMs are not losing time due to contention, eg run:

      time puppet agent -t
      

      And compare the results to a wall clock.

      Sample output

      [root@puppet01 vagrant]# time /opt/puppetlabs/puppet/bin/puppet agent -t
      Info: Retrieving pluginfacts
      Info: Retrieving plugin
      Info: Loading facts
      Info: Caching catalog for puppet01.customer.internal
      Info: Applying configuration version '1437983633'
      Notice: Applied catalog in 5.13 seconds
       
      real	0m230.616s
      user	0m6.304s
      sys	0m0.690s
      

      Suggested fix

      puppet agent -t should report the total time spent executing the command, possibly broken down by area. EG:

      Notice: Agent run took 25.41 seconds (compiled in 20.28 seconds, applied in 5.13 seconds)
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              geoff.williams Geoff Williams
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support