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

Agent does not save local copy of last_run_report.yaml if submission to report server fails

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • PUP 4.6.2
    • PUP 6.25.0, PUP 7.11.0
    • None
    • Coremunity
    • 3
    • Coremunity Kanban
    • Bug Fix
    • The agent will now always save a local copy of its last run report, even if it fails to submit the report to the Puppet server.

    Description

      On an Ubuntu 16.04 VM running Puppet 1.6.2 agent:

      The agent does not appear to save a run report if it fails to submit the report to its report server.

      Repro

      root@ubuntu16:~# puppet agent -t --server=foo:1 --report_server=bar:2 --http_connect_timeout=3s --http_debug
      opening connection to foo:1:8140...
      Warning: Unable to fetch my node definition, but the agent run will continue:
      Warning: execution expired
      Info: Retrieving pluginfacts
      opening connection to foo:1:8140...
      Error: /File[/opt/puppetlabs/puppet/cache/facts.d]: Failed to generate additional resources using 'eval_generate': execution expired
      opening connection to foo:1:8140...
      Error: /File[/opt/puppetlabs/puppet/cache/facts.d]: Could not evaluate: Could not retrieve file metadata for puppet:///pluginfacts: execution expired
      Info: Retrieving plugin
      opening connection to foo:1:8140...
      Error: /File[/opt/puppetlabs/puppet/cache/lib]: Failed to generate additional resources using 'eval_generate': execution expired
      opening connection to foo:1:8140...
      Error: /File[/opt/puppetlabs/puppet/cache/lib]: Could not evaluate: Could not retrieve file metadata for puppet:///plugins: execution expired
      Info: Loading facts
      opening connection to foo:1:8140...
      Error: Could not retrieve catalog from remote server: execution expired
      Warning: Not using cache on failed catalog
      Error: Could not retrieve catalog; skipping run
      opening connection to bar:2:8140...
      Error: Could not send report: execution expired
      # Afterward, no report is saved on the agent:
      root@ubuntu16:~# ls /opt/puppetlabs/puppet/cache/
      clientbucket  client_data  client_yaml  facts.d  lib  preview  state
      root@ubuntu16:~# ls /opt/puppetlabs/puppet/cache/state/
      classes.txt  graphs  last_run_summary.yaml  resources.txt  state.yaml  transactionstore.yaml
      

      Attachments

        Activity

          People

            josh Josh Cooper
            moses Moses Mendoza
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support