Issue #2435 has been updated by Luke Kanies.

Status changed from Accepted to Needs more information
Assigned to set to Nigel Kersten

I can't reproduce this.  Given this config file:
<pre>
[main]
manifest = /Users/luke/bin/test.pp

[development]
modulepath = /tmp/development

[production]
modulepath = /tmp/production
</pre>
And this code in production:
<pre>
class base {
    notify { "In production": }
}
</pre>
And equivalent code in development, I get the correct behaviour depending on 
which environment I specify for the client.

If I use arbitrary environment names, like 'prod' and 'dev', I still get 
correct behaviour.
----------------------------------------
Bug #2435: puppetmasterd can't find per-environment modules with a global 
manifest entry point.
http://projects.reductivelabs.com/issues/2435

Author: Nigel Kersten
Status: Needs more information
Priority: High
Assigned to: Nigel Kersten
Category: parser
Target version: 0.25.0
Complexity: Unknown
Affected version: 0.25.0
Keywords: 


(This title could do with renaming once we've sorted out exactly where the 
problem lies. It's also possible this is going to be deemed to be working as 
expected...)

In puppet 0.24.8, we have a manifest directive of /etc/puppet/manifests/sites.pp

This only includes:
<pre>
node default { include base }
</pre>

and then each environment has a modulepath directive, which is where the 'base' 
module can be found.

Testing the latest 0.25.x tree, this doesn't work at all with either a 0.24.8 
or 0.25.0 client. It simply fails to find the module until it has been mounted 
at least once.

Error on the server:
<pre>
info: Could not find class base for nigelk-laptop-tester.corp.foo
err: Could not find class base at /etc/puppet/manifests/site.pp:7 on node 
nigelk-laptop-tester.corp.foo
</pre>

However, if I specify a manifest directive *in* the environment block in 
puppet.conf on the server as say:

<pre>
[test_env]
manifest  = /var/lib/puppet/environments/test_env/manifests/site.pp
modulepath = /var/lib/puppet/environments/test_env/modules
</pre>

then the class/module 'base' is found happily.


Now, this all occurs from a fresh start of the puppet server.

If I puppet a client against the <code>test_env</code> environment above, and 
*then* without restarting the server, re-puppet the same client, specifying 
another environment <code>test_env_2</code>

<pre>
[test_env_2]
modulepath = /var/lib/puppet/environments/test_env_2/modules
</pre>

(and thus this environment is using the global 
<code>/etc/puppet/manifests/site.pp</code> manifest file. Verified with 
gratuitous notice commands sprinkled throughout.)

then the module/class 'base' is found happily.

so I'm unsure how best to describe this problem, but it's in the autoloading 
code I guess.

If this is unsupported, and we're just meant to have environment-specific 
manifest directives (and that these work is really awesome), that's ok, but 
superficially this appears to be a regression.


-- 
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://reductivelabs.com/redmine/my/account

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to