Luke Kanies | 17 Mar 2008 06:54
Gravatar

[Puppet Users] 0.24.3 is out


Hi all,

0.24.3 is now available in the regular locations (uploaded to  
rubyforge, and available http://reductivelabs.com/downloads/puppet).

Here's the changelog:

     Modified the ldap node terminus to also use the facts version
     as the version for a node, which should similarly encourage the
     use of the yaml cache.  (Related to #1130)

     Caching node information in yaml (I figured caching in memory will
     cause ever-larger memory growth), and changing the external node
     terminus to use the version of the facts as their version.  This
     will usually result in the cached node information being used,
     instead of always hitting the external node app during file
     serving. Note that if the facts aren't changed by the client,
     then this will result in the cached node being used, but at this
     point, the client always updates its facts.  (#1130)

     Fixing #1132 -- host names can now have dashes anywhere.
     (Patch by freiheit.)

     Fixing #1118 -- downloading plugins and facts now ignores noop.
     Note that this changes the behaviour a bit -- the resource's
     noop setting always beats the global setting (previously,
     whichever was true would win).

     The change in checksums from 'timestamp' to 'mtime' no longer
(Continue reading)

Duncan Hill | 17 Mar 2008 13:17

[Puppet Users] Realizing Users in Nodes


I'm trying to work with Users and the realize function, and it's
driving me batty.  Puppet is 0.23.2.

My definition looks something like:

class virtual_users {
    <at> user { fred : uid => 500 ... }
    <at> user { derf : uid => 501 ... }
}

node base-node {
   include virtual_users
}

node "testnode.domain.local" inherits base-node {
   realize User[fred]
}

puppetd throws an error of:
err: Could not retrieve configuration: Failed to find virtual
resources User[fred]

Do I have to realize fred in another class instead, and then include
that class in the node definition?  (Bit of a pain if that is indeed
the case.)

--~--~---------~--~----~------------~-------~--~----~
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 <at> googlegroups.com
(Continue reading)

Gunnar Wrobel | 17 Mar 2008 16:32

[Puppet Users] Determine package version


Hi!

I'm wondering how I could determine the currently installed version of
a package.

This is an example of a package I defined:

  package { clamav:
    name     => 'clamav'
    category => $operatingsystem ? {
      gentoo  => 'app-antivirus',
      # Still undefined for all other OS
      default => ''
    },
    ensure   => 'installed',
    require  => $operatingsystem ? {
      gentoo => Gentoo_use_flags['clamav']
    }
  }

As far as I understand the package providers at the moment I can't use
them to determine the version. Is that right?

Should I use facter for this? It seems like defining a special ruby
plugin for that would be too much.

Ideally I'd like to be able to do something like this:

  $clamav_version = determine_package_version {package => 'clamav'}
(Continue reading)

Luke Kanies | 17 Mar 2008 16:42
Gravatar

[Puppet Users] Re: files overridden with directories still


On Mar 13, 2008, at 10:41 PM, Ben wrote:

> I am still seeing files being overridden with directories in  
> 0.24.3rc1.
>
> Is there something i can do to assist in tracking this bug down  
> because
> it is killing me?

Well, I spent most of the weekend working on this, as did Arjuna  
Christensen, and we've concluded that it's a Ruby leak, not a leak in  
my own code.  There is some evidence online that this kind of leak can  
usually be avoided by slight tweaking of the code, so we just need to  
track down where that leak is.

At this point, the problem is finding that leak, which is mostly a  
question of using C-based leak detectors to figure it out.  This  
mostly means valgrind[1], I think, although I might give DTrace on  
Solaris a try[2].

At this point, all I know is 1) there's a leak, and 2) that leak  
eventually causes the server to start sending bad file information to  
the client.  I don't know what causes the server to suddenly start  
sending bad data, I don't know what usage profile specifically  
triggers this problem, I don't really know much at all, because I've  
never reproduced the issue.

Anything anyone can do to add information to this is helpful,  
especially if you're willing to put the time into helping to track the  
(Continue reading)

Duncan Hill | 17 Mar 2008 16:44

[Puppet Users] Re: Realizing Users in Nodes


On Mar 17, 12:17 pm, "Duncan Hill" <bajand... <at> googlemail.com> wrote:
> I'm trying to work with Users and the realize function, and it's
> driving me batty.  Puppet is 0.23.2.
>
> My definition looks something like:
>
> class virtual_users {
>     <at> user { fred : uid => 500 ... }
>     <at> user { derf : uid => 501 ... }
>
> }
>
> node base-node {
>    include virtual_users

I'm an idiot.  I had my include defined in the base server node, and
was working with a workstation.
--~--~---------~--~----~------------~-------~--~----~
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 <at> googlegroups.com
To unsubscribe from this group, send email to puppet-users-unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

David Lutterkort | 17 Mar 2008 19:13
Picon
Favicon

[Puppet Users] Re: yum groupinstall ability?


On Thu, 2008-03-13 at 04:26 -0700, bajandude <at> googlemail.com wrote:
> Has anyone modified yum.rb to provide groupinstall abilities?

To the best of my knowledge, nobody's working on that. The main
difficulty in enabling that is making sure that puppet doesn't run 'yum
groupinstall' (or 'yum groupupdate') on every run. To avoid that, you'd
have to get a list of the packages in the group with 'yum groupinfo' and
then check if any of them is mentioned in  <at> updates. That change would
need to go into the 'latest' method.

If you're happy with running groupinstall/groupupdate on every puppet
run though, your plan sounds like it should work.

David

--~--~---------~--~----~------------~-------~--~----~
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 <at> googlegroups.com
To unsubscribe from this group, send email to puppet-users-unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Arjuna Christensen | 17 Mar 2008 21:20
Picon
Favicon

[Puppet Users] Re: files overridden with directories still


I've not been able to track down what, in particular, is causing the issue; Puppet running under Valgrind
here is too slow to compile configurations or fetch plugins. If I could work how to make it a little faster, I
might be able to track it down.

Arjuna Christensen | Systems Engineer 
Maximum Internet Ltd
DDI: + 64 9 913 9683 | Ph: +64 9 915 1825 | Fax:: +64 9 300 7227
arjuna.christensen <at> maxnet.co.nz| www.maxnet.co.nz

-----Original Message-----
From: puppet-users <at> googlegroups.com [mailto:puppet-users <at> googlegroups.com] On Behalf Of Luke Kanies
Sent: Tuesday, 18 March 2008 4:42 a.m.
To: puppet-users <at> googlegroups.com
Subject: [Puppet Users] Re: files overridden with directories still

On Mar 13, 2008, at 10:41 PM, Ben wrote:

> I am still seeing files being overridden with directories in  
> 0.24.3rc1.
>
> Is there something i can do to assist in tracking this bug down  
> because
> it is killing me?

Well, I spent most of the weekend working on this, as did Arjuna  
Christensen, and we've concluded that it's a Ruby leak, not a leak in  
my own code.  There is some evidence online that this kind of leak can  
usually be avoided by slight tweaking of the code, so we just need to  
track down where that leak is.
(Continue reading)

Luke Kanies | 18 Mar 2008 00:32
Gravatar

[Puppet Users] Likely source of memory leak


Rick Bradley forwarded me this:

http://groups.google.com/group/god-rb/browse_thread/thread/1cca2b7c4a581c2

This idiom leaks memory pretty quickly in Ruby:

def whatever
   value.split(/regex)
end

That is, splitting without assigning to any local variables.  If you  
assign any local variables at all -- even a no-op 'x = nil', or just  
'x = value.split...' -- then you get no leak.  Go ahead, test it in  
your ruby version.

Here was my test (done with instance methods, since I wanted to see if  
it only leaked with class methods):

class Bar
   def class_name
     name.split(/::/).collect { |i| r = i*2 }
   end

   attr_reader :name
   def initialize(name)
        <at> name = name
   end
end

(Continue reading)

Arjuna Christensen | 18 Mar 2008 02:33
Picon
Favicon

[Puppet Users] Re: Likely source of memory leak


Well played.

Myself and Adam (holoway) are currently GDBing my leaky puppetmaster to try and find exactly what arrays
and where are leaking - he has more GDB-fu than me, and the ruby-live-process introspection stuff is
pretty magical.

Here's hoping we can track this one down!

Arjuna Christensen | Systems Engineer 
Maximum Internet Ltd
DDI: + 64 9 913 9683 | Ph: +64 9 915 1825 | Fax:: +64 9 300 7227
arjuna.christensen <at> maxnet.co.nz| www.maxnet.co.nz

-----Original Message-----
From: puppet-users <at> googlegroups.com [mailto:puppet-users <at> googlegroups.com] On Behalf Of Luke Kanies
Sent: Tuesday, 18 March 2008 12:33 p.m.
To: puppet-users <at> googlegroups.com
Subject: [Puppet Users] Likely source of memory leak

Rick Bradley forwarded me this:

http://groups.google.com/group/god-rb/browse_thread/thread/1cca2b7c4a581c2

This idiom leaks memory pretty quickly in Ruby:

def whatever
   value.split(/regex)
end

(Continue reading)

Luke Kanies | 18 Mar 2008 02:48
Gravatar

[Puppet Users] Re: Likely source of memory leak


Note that (as mentioned in the ticket) I uploaded a branch named  
memory_leak_split_fix in my personal repository in which I did my best  
to implement the fix from this thread.

If someone who can reproduce this problem can test this branch out,  
I'd appreciate it.

On Mar 17, 2008, at 8:33 PM, Arjuna Christensen wrote:

>
> Well played.
>
> Myself and Adam (holoway) are currently GDBing my leaky puppetmaster  
> to try and find exactly what arrays and where are leaking - he has  
> more GDB-fu than me, and the ruby-live-process introspection stuff  
> is pretty magical.
>
> Here's hoping we can track this one down!
>
> Arjuna Christensen | Systems Engineer
> Maximum Internet Ltd
> DDI: + 64 9 913 9683 | Ph: +64 9 915 1825 | Fax:: +64 9 300 7227
> arjuna.christensen <at> maxnet.co.nz| www.maxnet.co.nz
>
>
> -----Original Message-----
> From: puppet-users <at> googlegroups.com [mailto:puppet-users <at> googlegroups.com 
> ] On Behalf Of Luke Kanies
> Sent: Tuesday, 18 March 2008 12:33 p.m.
(Continue reading)


Gmane