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

Puppet Device doesn't honor ENC-set Environment in 5.5.10 or later

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Incomplete
    • Affects Version/s: PUP 5.5.10, PUP 5.5.12, PUP 5.5.13, PUP 5.5.14
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Centos 7
      Puppetserver 5.3.6
      Puppet Agent 5.5.x (5.5.8 and earlier works, 5.5.10 through 5.5.14 does not).

    • Template:
      PUP Bug Template
    • Team:
      Network Automation
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet Version: 5.5.10 - 5.5.14 (5.5.8 works correctly)
      Puppet Server Version: 5.3.6
      OS Name/Version: Centos 7

      Note that this probably affects at least some versions of Puppet 6.x, though I don't have the setup to verify that personally.

      Steps to reproduce:

      1. Install Puppet Agent 5.5.10 or later
      2. Configure a Device node in devices.conf and set up a certificate for it
      3. Configure the ENC on the Master to supply an environment other than production for the device node
      4. Run `puppet device --target <node> --verbose`

      Desired Behavior:

      The application switches to the ENC-supplied environment before performing a plugin sync. This behavior can be observed under 5.5.8; the logs show "Notice: Local environment 'production' doesn't match server specified node environment 'foo', switching agent to 'foo'." prior to "Retrieving pluginfacts".

      Actual Behavior:

      The application remains in the production environment during pluginsync (and possibly after) unless a `–environment` flag is explicitly passed. No environment-switching occurs. If the module containing the device transport code is not present in the production environment, then the device transport files will be removed and the subsequent run will fail.

      Notes

      This seems likely to be related to PUP-8766, which changed the way that the puppet device application handles environments, and was incorporated into 5.5.10 as well as 6.0.5. Prior to PUP-8766, only ENC-supplied environments were honored by the Puppet Device application, and the --environment flag did not function; now, the reverse situation is true.

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              adam.gardner Adam Gardner
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support