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

ENC-enforced environment makes `puppet lookup` environment simulation difficult

    Details

    • Type: Improvement
    • Status: Ready for Engineering
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: PUP 4.9.4
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • CS Priority:
      Major
    • CS Frequency:
      3 - 25-50% of Customers
    • CS Severity:
      3 - Serious
    • CS Business Value:
      5 - $$$$$$
    • CS Impact:
      Hide
      `puppet lookup` is a great tool for helping understand what hiera is doing. Improving it by adding the ability for the user to specify the environment would make it even better and reduce this one point of friction.

      Usability/intuitiveness is an area we need to improve on as we've gotten a lot of user feedback. Improving this would help reduce user surprise.
      Show
      `puppet lookup` is a great tool for helping understand what hiera is doing. Improving it by adding the ability for the user to specify the environment would make it even better and reduce this one point of friction. Usability/intuitiveness is an area we need to improve on as we've gotten a lot of user feedback. Improving this would help reduce user surprise.
    • QA Risk Assessment:
      Automate
    • QA Risk Assessment Reason:
      could be automated in an integration test in rspec

      Description

      The use case here is that we're trying to move people away from using the hiera binary to simulate/debug lookups to using puppet lookup. With hiera you could pass environment variables that matched whatever "variables" were in hiera.yaml to simulate what Puppet would provide, so doing: hiera testkey environment=test would allow us to simulate this lookup in the test environment.

      When we tried doing that with: puppet lookup testkey – environment test we found that we were still getting values from the production environment. This is because puppet lookup (even without using --compile) will pull down a node object for whatever node is being targeted, and that means it's going through paths of indirection and ultimately the ENC. If the ENC is enforcing an environment, then puppet lookup is bound to that environment. In our case above (using the Console), setting the node to a nodegroup enforcing "Agent-specified environment" allowed us to simulate a lookup in another environment properly.

      I'm marking this as an "Improvement" instead of a bug, but the reality is that it's a pretty major use-ability issue because being able to simulate lookups decoupled from the ENC is a pretty common exercise for people debugging Hiera data.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gary Gary Larizza
            • Votes:
              5 Vote for this issue
              Watchers:
              21 Start watching this issue

              Dates

              • Created:
                Updated:

                Zendesk Support