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

Exported resources are hard to collect by environment

    Details

    • Type: Bug
    • Status: Needs Information
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None

      Description

      I noticed today that Foo <<| |>> collects all Foo resources regardless of environment. Doing Foo <<| environment == ... |>> would be cool, but I don't think that works.

      Why was this a problem? I have multiple deployments; some of which cannot see each other on the network (outside of the storeconfigs db). As a result of this behavior (collect all resources in all environments), I have nagios instances that try to monitor machines they can't see and thus all checks fail and pager goes beep beep.

      I found a work around using tags.

      node default {
        # Globally apply an environment-based tag to all resources on each node.
        tag("deployment::$environment")
        ...
      }
       
      # And later ...
       
      SomeResource <<| tag == "deployment::$environment" |>> 
      

      The above workaround is sufficient for me to continue deploying exported resources (not a blocker).

      I was expecting collectors of exported resources would only, by default, get resources from the same environment. Barring that, I think a query of <<| environment == ... |>> would be quite useful rather than resorting to tagging.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                redmine.exporter redmine.exporter
              • Votes:
                2 Vote for this issue
                Watchers:
                16 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Zendesk Support