Re: [Puppet Users] Re: Seemingly random failures after 2.7.1 upgrade

2011-07-15 Thread Peter Meier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

 same problem for me.. I've notice the problem on modules using
 autoloading...
 
 I think I will stick to version 2.6.9...

can you at least file a detailed bug report? Thanks! Otherwise the
situation can't be really improved...

~pete
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4gHX4ACgkQbwltcAfKi3/GXQCgpZMNyTEiV1USVG1qpxgCh3mE
+S8AoJnCLIYreiOg3bXr1zf4u56eZivk
=NF0L
-END PGP SIGNATURE-

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



Re: [Puppet Users] Re: Seemingly random failures after 2.7.1 upgrade

2011-07-15 Thread Gustavo Soares
done!

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

Gus

On Fri, Jul 15, 2011 at 7:59 AM, Peter Meier peter.me...@immerda.ch wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

  same problem for me.. I've notice the problem on modules using
  autoloading...
 
  I think I will stick to version 2.6.9...

 can you at least file a detailed bug report? Thanks! Otherwise the
 situation can't be really improved...

 ~pete
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.11 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAk4gHX4ACgkQbwltcAfKi3/GXQCgpZMNyTEiV1USVG1qpxgCh3mE
 +S8AoJnCLIYreiOg3bXr1zf4u56eZivk
 =NF0L
 -END PGP SIGNATURE-

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



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



[Puppet Users] Re: Seemingly random failures after 2.7.1 upgrade

2011-07-14 Thread treydock
I think the way I posted the contents of the modules may have been
misleading, as I do actually have each class in it's own file so
kvm::host class has it's own host.pp file.  So far I've actually
noticed this problem only on my modules that make use of the
autoloading, so each class in it's own *.pp file.  Not all my modules
suffer from this, but that's one common thing among the ones that do
fail.  I'm in the process of moving my other modules to that layout as
they currently have all classes in init.pp, but interestingly enough
none of those modules have had random failures.

- Trey


On Jul 13, 1:29 am, Peter Meier peter.me...@immerda.ch wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

  Is using an empty class in init.pp problematic ?  All of these modules
  worked just fine before going from 2.6.8 to 2.7.1.

 I have no idea, whether this is the problem. But why do you do:

  # manifests/init.pp
  import classes/*.pp

  class kvm {
  }

  # manifests/classes/host.pp
  class kvm::host {

 ?

 Why not just have one file manifests/host.pp that contains the kvm::host
 class? Everything else is not really necessary.

 Puppet has quite a powerfull autoloading feature of classes and I think
 it can be seen as a general best practice to have one class in a file in
 its corresponding path on the filesystem.

 With your current way you would need a global import kvm, so that the
 init.pp class is actually parsed, so that the files in classes/ are
 imported.
 If this is not the case and the kvm::host class is not in a file that
 can be found by the autoloader it won't find the class.

 This becomes even trickier as other hosts can now interfere which
 classes are available while compiling the next hosts classes, as an
 import statement might only have been executed if Host A is compiled and
 only this would then make these imported classes that Host B requires
 available.

 Actually, I remember that the autoloader should also look into init.pp
 for the kvm::host class. But it's possible that something like that
 might have changed in 2.7. But I don't know it.

 Due to these two reasones (magic availability of classes, possible
 changes in how classes become available in 2.7) I would generally
 recommend to *not* use import statements and instead use puppet's
 autoloading feature. They're rather hard to debug.

 ~pete
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.11 (GNU/Linux)
 Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org/

 iEYEARECAAYFAk4dOygACgkQbwltcAfKi39akACcCwslVzxzrTy3/H0r7kGyi4dB
 M4gAn1LHtc/LGk7OtbVfDolhm5cXwm/p
 =lWHm
 -END PGP SIGNATURE-

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



Re: [Puppet Users] Re: Seemingly random failures after 2.7.1 upgrade

2011-07-14 Thread Gustavo Soares
Hi Trey,

same problem for me.. I've notice the problem on modules using
autoloading...

I think I will stick to version 2.6.9...

Gus

On Thu, Jul 14, 2011 at 8:57 AM, treydock treyd...@gmail.com wrote:

 I think the way I posted the contents of the modules may have been
 misleading, as I do actually have each class in it's own file so
 kvm::host class has it's own host.pp file.  So far I've actually
 noticed this problem only on my modules that make use of the
 autoloading, so each class in it's own *.pp file.  Not all my modules
 suffer from this, but that's one common thing among the ones that do
 fail.  I'm in the process of moving my other modules to that layout as
 they currently have all classes in init.pp, but interestingly enough
 none of those modules have had random failures.

 - Trey


 On Jul 13, 1:29 am, Peter Meier peter.me...@immerda.ch wrote:
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
   Is using an empty class in init.pp problematic ?  All of these modules
   worked just fine before going from 2.6.8 to 2.7.1.
 
  I have no idea, whether this is the problem. But why do you do:
 
   # manifests/init.pp
   import classes/*.pp
 
   class kvm {
   }
 
   # manifests/classes/host.pp
   class kvm::host {
 
  ?
 
  Why not just have one file manifests/host.pp that contains the kvm::host
  class? Everything else is not really necessary.
 
  Puppet has quite a powerfull autoloading feature of classes and I think
  it can be seen as a general best practice to have one class in a file in
  its corresponding path on the filesystem.
 
  With your current way you would need a global import kvm, so that the
  init.pp class is actually parsed, so that the files in classes/ are
  imported.
  If this is not the case and the kvm::host class is not in a file that
  can be found by the autoloader it won't find the class.
 
  This becomes even trickier as other hosts can now interfere which
  classes are available while compiling the next hosts classes, as an
  import statement might only have been executed if Host A is compiled and
  only this would then make these imported classes that Host B requires
  available.
 
  Actually, I remember that the autoloader should also look into init.pp
  for the kvm::host class. But it's possible that something like that
  might have changed in 2.7. But I don't know it.
 
  Due to these two reasones (magic availability of classes, possible
  changes in how classes become available in 2.7) I would generally
  recommend to *not* use import statements and instead use puppet's
  autoloading feature. They're rather hard to debug.
 
  ~pete
  -BEGIN PGP SIGNATURE-
  Version: GnuPG v1.4.11 (GNU/Linux)
  Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org/
 
  iEYEARECAAYFAk4dOygACgkQbwltcAfKi39akACcCwslVzxzrTy3/H0r7kGyi4dB
  M4gAn1LHtc/LGk7OtbVfDolhm5cXwm/p
  =lWHm
  -END PGP SIGNATURE-

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



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



Re: [Puppet Users] Re: Seemingly random failures after 2.7.1 upgrade

2011-07-14 Thread Nigel Kersten
On Wed, Jul 13, 2011 at 2:26 PM, Gus gustavosoa...@gmail.com wrote:

 Hi!

 I've also noticed this (weird) behaviour. 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...

 am I missing something?


You need to give us a few more details.

* name of the classes that are failing and succeeding autoloading
* How you're declaring the classes (include vs parameterized class
declaration)
* the file paths that contain the classes that fail and succeed
* some info about the modulepath for this environment.
* whether you're using 'import' anywhere.






 Thanks in advance,
 Gus

 On Jul 13, 11:03 am, Nigel Kersten ni...@puppetlabs.com wrote:
  On Tue, Jul 12, 2011 at 11:29 PM, Peter Meier peter.me...@immerda.ch
 wrote:
 
 
 
   Puppet has quite a powerfull autoloading feature of classes and I think
   it can be seen as a general best practice to have one class in a file
 in
   its corresponding path on the filesystem.
 
  What he said. :)
 
  Life really does become a lot simpler if you avoid 'import' everywhere
 you
  can and just rely upon the class autoloader.
 
  --
  Nigel Kersten
  Product Manager, Puppet Labs
  Twitter: @nigelkersten
 
  *Join us for **PuppetConf *http://www.bit.ly/puppetconfsig
  September 22nd and 23rd in Portland, Oregon, USA.
  *
  *

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




-- 
Nigel Kersten
Product Manager, Puppet Labs
Twitter: @nigelkersten

*Join us for **PuppetConf *http://www.bit.ly/puppetconfsig
September 22nd and 23rd in Portland, Oregon, USA.
*
*

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



Re: [Puppet Users] Re: Seemingly random failures after 2.7.1 upgrade

2011-07-14 Thread Gustavo Soares
Hi Nigel,

here we go...

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

class role_puppet_common {
$role = puppet_common
include common
 include puppet::common
include puppet::user
}

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

[...]

import classes/roles/*

[...]


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

my directory structure is as follow:

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

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

import puppet/classes/*

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

class puppet::common {

...

}


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

modulepath  = /mnt/puppet/conf/modules:/mnt/puppet/othermodules

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.

Thanks in advance,
Gus


On Thu, Jul 14, 2011 at 11:59 AM, Nigel Kersten ni...@puppetlabs.comwrote:



 On Wed, Jul 13, 2011 at 2:26 PM, Gus gustavosoa...@gmail.com wrote:

 Hi!

 I've also noticed this (weird) behaviour. 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...

 am I missing something?


 You need to give us a few more details.

 * name of the classes that are failing and succeeding autoloading

* How you're declaring the classes (include vs parameterized class
 declaration)

* the file paths that contain the classes that fail and succeed
 * some info about the modulepath for this environment.
 * whether you're using 'import' anywhere.






 Thanks in advance,
 Gus

 On Jul 13, 11:03 am, Nigel Kersten ni...@puppetlabs.com wrote:
  On Tue, Jul 12, 2011 at 11:29 PM, Peter Meier peter.me...@immerda.ch
 wrote:
 
 
 
   Puppet has quite a powerfull autoloading feature of classes and I
 think
   it can be seen as a general best practice to have one class in a file
 in
   its corresponding path on the filesystem.
 
  What he said. :)
 
  Life really does become a lot simpler if you avoid 'import' everywhere
 you
  can and just rely upon the class autoloader.
 
  --
  Nigel Kersten
  Product Manager, Puppet Labs
  Twitter: @nigelkersten
 
  *Join us for **PuppetConf *http://www.bit.ly/puppetconfsig
  September 22nd and 23rd in Portland, Oregon, USA.
  *
  *

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




 --
 Nigel Kersten
 Product Manager, Puppet Labs
 Twitter: @nigelkersten

 *Join us for **PuppetConf *http://www.bit.ly/puppetconfsig
 September 22nd and 23rd in Portland, Oregon, USA.
 *
 *

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


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



[Puppet Users] Re: Seemingly random failures after 2.7.1 upgrade

2011-07-13 Thread Gus
Hi!

I've also noticed this (weird) behaviour. 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...

am I missing something?

Thanks in advance,
Gus

On Jul 13, 11:03 am, Nigel Kersten ni...@puppetlabs.com wrote:
 On Tue, Jul 12, 2011 at 11:29 PM, Peter Meier peter.me...@immerda.chwrote:



  Puppet has quite a powerfull autoloading feature of classes and I think
  it can be seen as a general best practice to have one class in a file in
  its corresponding path on the filesystem.

 What he said. :)

 Life really does become a lot simpler if you avoid 'import' everywhere you
 can and just rely upon the class autoloader.

 --
 Nigel Kersten
 Product Manager, Puppet Labs
 Twitter: @nigelkersten

 *Join us for **PuppetConf *http://www.bit.ly/puppetconfsig
 September 22nd and 23rd in Portland, Oregon, USA.
 *
 *

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