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

When puppet agent fails to retrieve catalog from master, cached catalog is used without regard for the puppet.conf-declared environment

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 3.6.2
    • Fix Version/s: PUP 4.4.0
    • Component/s: None
    • Labels:
    • Environment:

      Linux, CentOS 6.2

    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      Puppet agent and apply will no longer cache its catalog during a noop run. This ensures the next non-noop run won't fallback to using the cached catalog and deploy code that was never meant to be "live". Also if the agent falls back to using its cached catalog and the catalog was compiled for a different environment than the agent is currently in, then the agent will fail the run. This way the server remains authoritative about which environment the agent is supposed to be in.
      Show
      Puppet agent and apply will no longer cache its catalog during a noop run. This ensures the next non-noop run won't fallback to using the cached catalog and deploy code that was never meant to be "live". Also if the agent falls back to using its cached catalog and the catalog was compiled for a different environment than the agent is currently in, then the agent will fail the run. This way the server remains authoritative about which environment the agent is supposed to be in.

      Description

      Steps to reproduce:

      • do not disable pe-puppet service
      • successfully compile catalog from non-Production environment using puppet agent -t --noop --environment manage_meta, catalog is cached locally
      • puppet master fails to compile catalog in agent's assigned environment (e.g. because a new class is assigned for testing non-Production code)
      • on next scheduled run, agent enforces non-Production state contained in cached catalog in violation of environment = production explicitly declared in puppet.conf
      • This is accompanied by the warning message indicating that the ENC is overriding the agent as authoritative source for environment

      Obviously, this could have very bad side effects and, while consistent and predictable, falls squarely under the category of undesirable (and unexpected) behavior, in my opinion.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              david David Gwilliam
            • Votes:
              3 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support