blblack
2011-Feb-28 04:44 UTC
[Puppet Users] Using Ruby DSL requires master restart for unrelated changes?
There''s an open bug a few months old that states that changes to Ruby DSL manifests require a puppetmaster restart: ( http://projects.puppetlabs.com/issues/5256 ). I can actually live with that, as I only plan on defining a couple of small key things that won''t change often in Ruby DSL and leaving the rest to normal puppet manifests. However, the problem I''m experiencing w/ 2.6.1 (Ubuntu Maverick''s official packages) is that having a Ruby DSL manifest seems to require puppetmaster restart on *any* change anywhere, even completely unrelated .erb templates or manifests. The basic setup I''m trying is this (the idea is to define some variables at the hostclass scope via ruby): manifests/rf.rb: hostclass :rfbase do scope.setvar(''rf'',''test123'') end manifests/site.pp: import "rf.rb" [...] And then my hostclass inherits this: class some_specific_class inherits rfbase { .... } Basically, everything works perfectly on a fresh restart of puppetmaster. But if I so much as "touch /etc/puppet/manifests/ unrelated.pp", or even touch a random .erb template, everything falls apart. Restarting puppetmaster fixes it again. The failures look like this on the client: err: Could not find parent resource type ''rfbase'' of type hostclass in production at /etc/puppet/manifests/node_classes.pp:2 on node lb01.use.snpriv Anyone have any ideas about this? I feel like there must be some stupid answer for this, either that or nobody out there is using Ruby DSL, because this renders it pretty unusable... -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Felix Frank
2011-Mar-07 12:26 UTC
Re: [Puppet Users] Using Ruby DSL requires master restart for unrelated changes?
On 02/28/2011 05:44 AM, blblack wrote:> > There''s an open bug a few months old that states that changes to Ruby > DSL manifests require a puppetmaster restart: ( http://projects.puppetlabs.com/issues/5256 > ). I can actually live with that, as I only plan on defining a couple > of small key things that won''t change often in Ruby DSL and leaving > the rest to normal puppet manifests. However, the problem I''m > experiencing w/ 2.6.1 (Ubuntu Maverick''s official packages) is that > having a Ruby DSL manifest seems to require puppetmaster restart on > *any* change anywhere, even completely unrelated .erb templates or > manifests. > > The basic setup I''m trying is this (the idea is to define some > variables at the hostclass scope via ruby): > > manifests/rf.rb: > hostclass :rfbase do > scope.setvar(''rf'',''test123'') > end > > manifests/site.pp: > import "rf.rb" > [...] > > And then my hostclass inherits this: > class some_specific_class inherits rfbase { .... } > > Basically, everything works perfectly on a fresh restart of > puppetmaster. But if I so much as "touch /etc/puppet/manifests/ > unrelated.pp", or even touch a random .erb template, everything falls > apart. Restarting puppetmaster fixes it again. The failures look > like this on the client: > > err: Could not find parent resource type ''rfbase'' of type hostclass in > production at /etc/puppet/manifests/node_classes.pp:2 on node > lb01.use.snpriv > > Anyone have any ideas about this? I feel like there must be some > stupid answer for this, either that or nobody out there is using Ruby > DSL, because this renders it pretty unusable... >Hi, I have never dabbled in Ruby manifests. Still, could you try with anything at least as recent as 2.6.3? I''ve read that early 2.6 was a bug-ridden beast. Regards, Felix -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Brandon Black
2011-Mar-08 15:35 UTC
Re: [Puppet Users] Using Ruby DSL requires master restart for unrelated changes?
On Mon, Mar 7, 2011 at 6:26 AM, Felix Frank <felix.frank@alumni.tu-berlin.de> wrote:> On 02/28/2011 05:44 AM, blblack wrote: >> [...] >> However, the problem I''m >> experiencing w/ 2.6.1 (Ubuntu Maverick''s official packages) is that >> having a Ruby DSL manifest seems to require puppetmaster restart on >> *any* change anywhere, even completely unrelated .erb templates or >> manifests. >> [...] > > Hi, > > I have never dabbled in Ruby manifests. > > Still, could you try with anything at least as recent as 2.6.3? I''ve > read that early 2.6 was a bug-ridden beast.Yes, that fixed it. I switched my puppetmaster install (on Ubuntu Maverick) to 2.6.3-0ubuntu1~lucid1 from: deb http://ppa.launchpad.net/mathiaz/puppet-backports/ubuntu lucid main deb-src http://ppa.launchpad.net/mathiaz/puppet-backports/ubuntu lucid main And now things work sanely. Still using 2.6.1 from the official stable repos for clients, seems to work fine. -- Brandon -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.