Issue #8433 has been updated by Nigel Kersten.

so to be clear, we do still support multiple classes in the same file.

If you have the parent init.pp class laid out so that the autoloader will find 
it, and the other classes are declared in it, and you're not using import, and 
you're still hitting errors, lets separate out that into another bug please.

There should be no need to import at all within a module, and life really is 
significantly simpler if you work with the autoloader rather than against it. 
I'd suggest that a better approach would be:

<pre>
# modulepath/foo/manifests/init.pp
class foo {
  include foo::foo
}
</pre>

I do recognize that we've changed behavior, but I'm currently trying to 
disentangle changed defined behavior from changed undefined behavior in 2.6.x, 
and it's unlikely we're going to "fix" changes in undefined behavior with 
import unless we have a significant set of affected users.

I'm not completely opposed to the idea of alternate autoloader behavior like 
"foo.pp -> class foo {}", but I'd like to separate out those feature requests 
from the bugs we look to be identifying here.

I am watching this issue closely as it's clearly causing pain for users.

My email is [email protected], my twitter handle is @nigelkersten, and if 
people want to be able to talk over this in a private space, rant at me, or 
anything else that is going to add to the noise here and make it harder to 
solve the actual problems, please feel free to contact me.


----------------------------------------
Bug #8433: Seemingly random failures after 2.7.1 
https://projects.puppetlabs.com/issues/8433

Author: Gustavo Soares
Status: Needs More Information
Priority: High
Assignee: Gustavo Soares
Category: modules
Target version: 
Affected Puppet version: 2.7.1
Keywords: 
Branch: 


I've noticed a weird behaviour after trying puppet (gem) 2.7.1. I am planning 
an (huge)
upgrade (from 0.25.x to 2.7.1) in all my puppet's boxes...

I've installed puppet's 2.7.1 gem and got a lot of "Could not find
class" problem... and everything worked just fine with 0.25.x.

So, I decided to uninstall the gem for version 2.7.1 and install
puppet version 2.6.9.

Everything worked just fine... no weird "Could not find class"
problem...

Here are some more info about my environment:

* I do not use parameterized classes and all my classes are "included" (I was 
still using 0.25.x...)
* In my $confdir/manifests/classes/roles I have a very generic class for all 
puppet hosts declared as follow:

<pre>
class role_puppet_common {
        $role = "puppet_common"
        include common
        include puppet::common
        include puppet::user
}
</pre>

in $confdir/manifests/site.pp I have the following line...

<pre>
[...]

import "classes/roles/*"

[...]
</pre>


the weird "Could not find class" problem occurs for class puppet::common

my directory structure is as follow:

<pre>
...
$confdir/modules/puppet/
$confdir/modules/puppet/manifests
$confdir/modules/puppet/manifests/init.pp
$confdir/modules/puppet/manifests/classes/
$confdir/modules/puppet/manifests/classes/common.pp
...
</pre>

in $confdir/modules/puppet/manifests/init.pp  I have:

<pre>
import "puppet/classes/*"
</pre>

and in $confdir/modules/puppet/manifests/classes/common.pp

<pre>
class puppet::common {

...

}
</pre>

* my modulepath declared in puppet.conf is as follow: 

<pre>
modulepath      = /mnt/puppet/conf/modules:/mnt/puppet/othermodules
</pre>

where /mnt/puppet/conf is set to $confdir.

That's it!

As I said before, when I downgraded to version 2.6.9 everything worked fine.




-- 
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 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