Issue #5239 has been updated by Klavs Klavsen.

Affected Puppet version changed from 2.6.2 to 3.2.3

I have an issue with this as well.

I need to setup some automated testing, so puppet devs, can start a test run on 
all production servers (to verify they won't change or break any servers they 
didn't intent to).

My idea is to run:
puppet agent -t --environment $devname --noop 

on all servers.

This works fine - except for 3 issues:
1) reports are then normally put into production environment in 
puppet-dashboard -even though the run was done in another environment. I expect 
that to be a trivial fix - and something I'll take up with the devs there.

2) Even though I run with --noop - it still exports resources - meaning a 
normal run will pickup the resources :( - I'll comment on that here: 
http://projects.puppetlabs.com/issues/8417

3) When it exports resources running on $environment == test - IMHO it pretty 
much violates my "principle of least surprise" that something run in that 
environment, is collected on a machine running in $environment == production.

So IMHO the default should be that puppet only pulls resources, that is from 
the same environment (regardless of noop or not)



----------------------------------------
Bug #5239: Exported resources are hard to collect by environment
https://projects.puppetlabs.com/issues/5239#change-94952

* Author: Jordan Sissel
* Status: Needs Decision
* Priority: Normal
* Assignee: eric sorenson
* Category: 
* Target version: 
* Affected Puppet version: 3.2.3
* Keywords: exported resources collection environments
* Branch: 
----------------------------------------
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.

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

# And later ...

SomeResource <<| tag == "deployment::$environment" |>> 
</pre>

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.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to