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

agent asking for invalid environment does not honor no-usecacheonfailure

    XMLWordPrintable

    Details

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

      puppet-3.8.1-1.el6.noarch @ CentOS 6.7

    • Template:

      Description

      When I try running puppet agent against non-existing environment, it does not skip the run as I expect while using -test (-no-usecacheonfailure).
      Everything is as expected, when the catalog compilation error occurs. Not in the invalid environment scenario.

      Here are some examples:

      everything ok in catalog

      [root@test-machine ~]# puppet agent --test --environment my_env --noop
      Info: Retrieving pluginfacts
      Info: Retrieving plugin
      Info: Loading facts
      Info: Caching catalog for test-machine.company-domain.com
      Info: Applying configuration version '1234567890'
      ...

      invalid environment specified

      [root@test-machine ~]# puppet agent --test --environment my_non_existing_env --noop
      Warning: Unable to fetch my node definition, but the agent run will continue:
      Warning: Find /my_non_existing_env/node/test-machine.company-domain.com?transaction_uuid=12345678-90ab-cdef-1234-567890abcde... resulted in 404 with the message: Not Found: Could not find environment 'my_non_existing_env'
      Info: Retrieving pluginfacts
      Error: /File[/var/lib/puppet/facts.d]: Could not evaluate: Could not retrieve information from environment my_non_existing_env source(s) puppet://test-master/pluginfacts
      Notice: /File[/var/lib/puppet/facts.d/custom_fact_01.py]: Dependency File[/var/lib/puppet/facts.d] has failures: true
      Warning: /File[/var/lib/puppet/facts.d/custom_fact_01.py]: Skipping because of failed dependencies
      Info: Retrieving plugin
      Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve information from environment my_non_existing_env source(s) puppet://test-master/plugins
      ...

      Same thing occurs without --noop parameter.

      catalog problem

      [root@test-machine ~]# puppet agent --test --environment my_env --noop
      Info: Retrieving pluginfacts
      Info: Retrieving plugin
      Info: Loading facts
      Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid relationship: Package[pkg]

      Unknown macro: { require => File[xxx] }

      , because File[xxx] doesn't seem to be in the catalog
      Warning: Not using cache on failed catalog
      Error: Could not retrieve catalog; skipping run

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            contact@mighq.net Michal Zubac
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support