On Fri, Nov 25, 2011 at 12:46 PM, Peter Berghold <salty.cowd...@gmail.com>wrote:

>
>
> On Fri, Nov 25, 2011 at 3:32 PM, Nigel Kersten <ni...@puppetlabs.com>wrote:
>
>
>>
>> As an aside, this was an awesome way to post a module autoload problem
>> Peter, showing the filesystem layout and the manifest content.
>>
>>
> the "tree" command is a beautiful thing! :-D
>
>
> Do you perhaps have another adminscripts/manifests/init.pp somewhere else
>> in your modulepath?
>>
>> Nope.  only one of it's kind.  In fact it was originally named
> "sysscripts/..." and I moved it from that name to adminscripts.  When it
> was named sysscripts I got the same error and renaming it was part of my
> plan to figure out why.
>
>
>> Or is there a "class adminscripts { ... }" defined somewhere else that's
>> been picked up by a non-autloaded filesystem layout?
>>
>> Is this the only version of the adminscripts::getvpsnodes class that
>> exists in any of your modulepath components?
>>
>>
> This is the only version.
>
>
>> Anything unusual about the adminscripts/manifests/init.pp in this
>> specific module?
>>
>> Here's init.pp:
>
>
> import "*.pp"
>
> import "*.pp"
>
> class adminscripts {
>       case $operatingsystem {
>              default : { }
>       }
> }
>

So you really should be able to avoid *all* use of "import" with modules
laid out correctly as you're doing here.

It's possible you've hit a recent bug we unintentionally introduced with
import.

http://projects.puppetlabs.com/issues/8433

It should be a reasonably mechanical transformation to move your classes to
just follow the autloader structure and check if that resolves the
situation?

e.g.

class foo { ... } -> modulepath/foo/manifests/init.pp
class foo::bar { ... } -> modulepath/foo/manifests/bar.pp

and then you should be able to remove all the import *.pp statements.

There's been a bit of grief expressed over this bug, so I'd like to
reiterate that this wasn't a deliberate deprecation, even though moving to
the autoloader and removing 'import' is definitely the way forward.

My modules stay pretty consistent because I use a script to lay them out
> and check them into SVN.  In fact I never edit the modules directly on the
> puppet server, but rather modify them on a laptop, check them into SVN and
> have cron check out the new versions as they become available.
>

as you should :)

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to