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

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

    XMLWordPrintable

    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
    • Template:
    • Acceptance Criteria:
      Hide

      If the --environment flag is used then puppet lookup should always use that environment regardless of what the ENC says. If the environment doesn't exist locally then it should error since we don't have the necessary per-environment hiera configuration and data.

      When the "--compile" flag is omitted, then this "accidentally works" due to the change made in PUP-8502. Once lookup defaults to the ENC environment (in PUP-8094) then it will cause this issue to "regress" when the "--compile" flag is specified. So this ticket is to make sure "--environment" works consistent with or without "--compile" and is blocked on PUP-8094

      Show
      If the --environment flag is used then puppet lookup should always use that environment regardless of what the ENC says. If the environment doesn't exist locally then it should error since we don't have the necessary per-environment hiera configuration and data. When the "--compile" flag is omitted, then this "accidentally works" due to the change made in PUP-8502 . Once lookup defaults to the ENC environment (in PUP-8094 ) then it will cause this issue to "regress" when the "--compile" flag is specified. So this ticket is to make sure "--environment" works consistent with or without "--compile" and is blocked on PUP-8094
    • Epic Link:
    • Team:
      Coremunity
    • Sprint:
      Coremunity Hopper
    • 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

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:

                  Zendesk Support