[Puppet Users] trouble with puppetrun on 0.24.8

2009-10-19 Thread kyawai

Hello,

Puppet 0.24.8 on both the client and server, CentOS5.3.

It is applied repeatedly when puppetrun is executed,
and a lot of report mails are transmitted.
There is host repeatedly applied,
and is host applied only once.
Every time, it is different.

Is the setting somewhere wrong?

-
# puppetrun -p 10 --tag cron_www_g1 --host devel03.devel.local --host
devel04.devel.local --host devel05.devel.local --host
devel06.devel.local

-
puppetmaster server's /var/log/messages:
(Devel05 was pulled out as an example.)

Oct 20 12:22:29 devel-111 puppetmasterd[14811]: Expiring the node
cache of devel05.devel.local
Oct 20 12:22:29 devel-111 puppetmasterd[14811]: Not using expired node
for devel05.devel.local from cache; expired at Tue Oct 20 12:21:29
+0900 2009
Oct 20 12:22:29 devel-111 puppetmasterd[14811]: Caching node for
devel05.devel.local
Oct 20 12:22:29 devel-111 puppetmasterd[14811]: Compiled catalog for
devel05.devel.local in 0.13 seconds
Oct 20 12:22:33 devel-111 puppetmasterd[14811]: Expiring the node
cache of devel05.devel.local
Oct 20 12:22:33 devel-111 puppetmasterd[14811]: Not using expired node
for devel05.devel.local from cache; expired at Tue Oct 20 12:21:33
+0900 2009
Oct 20 12:22:33 devel-111 puppetmasterd[14811]: Caching node for
devel05.devel.local
Oct 20 12:22:33 devel-111 puppetmasterd[14811]: Compiled catalog for
devel05.devel.local in 0.04 seconds
Oct 20 12:22:34 devel-111 puppetmasterd[14811]: Expiring the node
cache of devel05.devel.local
Oct 20 12:22:34 devel-111 puppetmasterd[14811]: Not using expired node
for devel05.devel.local from cache; expired at Tue Oct 20 12:21:34
+0900 2009
Oct 20 12:22:34 devel-111 puppetmasterd[14811]: Caching node for
devel05.devel.local
Oct 20 12:22:34 devel-111 puppetmasterd[14811]: Compiled catalog for
devel05.devel.local in 0.04 seconds
Oct 20 12:22:38 devel-111 puppetmasterd[14811]: (mount[data])
Sending /
data/bw_base/var/spool/cron/www-g1 to devel05.devel.local
Oct 20 12:22:39 devel-111 puppetmasterd[14811]: (mount[data])
Sending /
data/bw_base/var/spool/cron/www-g1 to devel05.devel.local
Oct 20 12:22:40 devel-111 puppetmasterd[14811]: (mount[data])
Sending /
data/bw_base/var/spool/cron/www-g1 to devel05.devel.local
Oct 20 12:22:40 devel-111 puppetmasterd[14811]: (mount[data])
Sending /
data/bw_base/var/spool/cron/www-g1 to devel05.devel.local
Oct 20 12:22:41 devel-111 puppetmasterd[14811]: (mount[data])
Sending /
data/bw_base/var/spool/cron/www-g1 to devel05.devel.local
Oct 20 12:22:42 devel-111 puppetmasterd[14811]: (mount[data])
Sending /
data/bw_base/var/spool/cron/www-g1 to devel05.devel.local
Oct 20 12:22:43 devel-111 puppetmasterd[14811]: (mount[data])
Sending /
data/bw_base/var/spool/cron/www-g1 to devel05.devel.local
Oct 20 12:22:44 devel-111 puppetmasterd[14811]: Processing reports
tagmail, log for devel05.devel.local
Oct 20 12:22:45 devel-111 puppetmasterd[14811]: Processing reports
tagmail, log for devel05.devel.local
Oct 20 12:22:46 devel-111 puppetmasterd[14811]: Processing reports
tagmail, log for devel05.devel.local
Oct 20 12:22:47 devel-111 puppetmasterd[14811]: Processing reports
tagmail, log for devel05.devel.local
Oct 20 12:22:48 devel-111 puppetmasterd[14811]: Processing reports
tagmail, log for devel05.devel.local
Oct 20 12:22:49 devel-111 puppetmasterd[14811]: Processing reports
tagmail, log for devel05.devel.local
Oct 20 12:22:50 devel-111 puppetmasterd[14811]: Processing reports
tagmail, log for devel05.devel.local
Oct 20 12:22:50 devel-111 puppetmasterd[14811]: Processing reports
tagmail, log for devel05.devel.local
Oct 20 12:22:51 devel-111 puppetmasterd[14811]: Processing reports
tagmail, log for devel05.devel.local
Oct 20 12:22:51 devel-111 puppetmasterd[14811]: Processing reports
tagmail, log for devel05.devel.local
Oct 20 12:22:52 devel-111 puppetmasterd[14811]: Processing reports
tagmail, log for devel05.devel.local
Oct 20 12:22:52 devel-111 puppetmasterd[14811]: Processing reports
tagmail, log for devel05.devel.local
Oct 20 12:22:53 devel-111 puppetmasterd[14811]: Processing reports
tagmail, log for devel05.devel.local
Oct 20 12:22:54 devel-111 puppetmasterd[14811]: Processing reports
tagmail, log for devel05.devel.local
Oct 20 12:22:55 devel-111 puppetmasterd[14811]: Processing reports
tagmail, log for devel05.devel.local
Oct 20 12:22:56 devel-111 puppetmasterd[14811]: Processing reports
tagmail, log for devel05.devel.local
Oct 20 12:22:56 devel-111 puppetmasterd[14811]: Processing reports
tagmail, log for devel05.devel.local
Oct 20 12:22:57 devel-111 puppetmasterd[14811]: Processing reports
tagmail, log for devel05.devel.local
Oct 20 12:22:58 devel-111 puppetmasterd[14811]: Processing reports
tagmail, log for devel05.devel.local
Oct 20 12:22:58 devel-111 puppetmasterd[14811]: Processing reports
tagmail, log for devel05.devel.local

-
puppet client's /var/log/messages:

Oct 20 12:22:24 devel05 puppetd[28835]: devel-111.devel.local
(172.25.195.111) triggered run
Oct 20 12:22:34 devel05 puppetd[28835]: St

[Puppet Users] any plans to support pkgutil?

2009-10-19 Thread windowsrefund

Seems that blastwave is all about pkgutil now. Are there any plans to
support this?

Best,
Adam
--~--~-~--~~~---~--~~
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: sysidcfg file on OpenSolaris 2009.06 client

2009-10-19 Thread windowsrefund

Martin,

Thank you for the response. Are you aware of any short term work
around?

Best,
Adam
--~--~-~--~~~---~--~~
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: sysidcfg file on OpenSolaris 2009.06 client

2009-10-19 Thread Martin Englund

Hi!
On Oct 19, 11:33 pm, windowsrefund  wrote:
> Puppet 0.24.8 on both the client and server. My zone is being created
> but the sysidcfg file is not being created under etc/
>
> info: Caching catalog at /var//opt/csw/puppet/state/localconfig.yaml
> notice: Starting catalog run
> notice: //Node[labrat1]/Zone_instance[labrat1a]/zone_zfs_root/Zfs
> [rpool/export/zones]/ensure: created
> notice: //Node[labrat1]/Zone_instance[labrat1a]/zone_zfs_root/File[/
> export/zones]/mode: mode changed '755' to '700'
> notice: //Node[labrat1]/Zone_instance[labrat1a]/Zfs[rpool/export/zones/
> labrat1a]/ensure: created
> notice: //Node[labrat1]/Zone_instance[labrat1a]/File[/export/zones/
> labrat1a]/mode: mode changed '755' to '700'
> err: //Node[labrat1]/Zone_instance[labrat1a]/Zone[labrat1a]/ensure:
> change from absent to running failed: Could not create sysidcfg: No
> such file or directory - /export/zones/labrat1a/root/etc/sysidcfg
> notice: Finished catalog run in 689.95 seconds
>
This is because zones in OpenSolaris work differently than in Solaris
10.

Now a zone gets its own Boot Environment (be), which is a zfs root
file system that doesn't get mounted until the zone is in the ready
state.

I'll file a bug for this...

cheers,
/Martin
--~--~-~--~~~---~--~~
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: Parser error which appears to be a bug in puppet

2009-10-19 Thread Clint Savage

On Mon, Oct 19, 2009 at 2:13 PM, Clint Savage  wrote:
> On Mon, Oct 19, 2009 at 2:11 PM, Clint Savage  wrote:
>> Below I have a parser function that I have created which was working,
>> but now is not working.  I have made quite a few changes to this code,
>> but can't seem to find the right combination to make it work again.
>>
>> After extensive conversations with Volcane, joe-mac and andrewcshafer
>> from #puppet, it was suggested that I put this on the list.  I don't
>> know what exactly is going on, but I can say that I think this is a
>> bug now.  However, I can't prove it beyond what I have here without
>> help.
>>
>> I'd like to put this out to the puppeteers here and see if I can get
>> some more help identifying why I get the error at the end of the
>> information below.
>>
>> Thanks in advance for all the help.
>>
>> Cheers,
>>
>> Clint
>>
>> -
>>
>> ## modules/core/plugins/puppet/parser/functions/get_ad_uids.rb
>>
>> require 'ldap'
>>
>> # this function queries our Active Directory server and pulls users
>> with a uid greater than 5.
>> # Specifically used for guaranteeing homedirs exist for users in the list
>>
>> module Puppet::Parser::Functions
>>    newfunction(:get_ad_uids, :type => :rvalue) do |args|
>>
>>        host  =  'ad.xyz123.net'
>>        port  =  LDAP::LDAP_PORT
>>
>>        # cn=ldap,ou=System Accounts,ou=Resources,dc=ad,dc=xyz123,dc=net
>>        root = 'cn=ldap,ou=System 
>> Accounts,ou=Resources,dc=ad,dc=xyz123,dc=net'
>>        base = 'ou=Engineering,ou=xyz123,dc=ad,dc=xyz123,dc=net'
>>        password = 'password'
>>
>>        conn = LDAP::Conn.new(host, port)
>>        conn.set_option( LDAP::LDAP_OPT_PROTOCOL_VERSION, 3 )
>>        conn.bind(root, password)
>>
>>        uidnum = args[0]
>>        ad_uids = Array.new
>>        ids = conn.search2(base, LDAP::LDAP_SCOPE_SUBTREE,
>> "(uidNumber>=#{uidnum})", "uid")
>>        uids = ad_uids.map { |i| i[0] }.flatten
>>
>>        uids
>>
>>  end
>> end
>>
>> -- output of above code --
>>
>> [r...@tuatara (puppetmaster) functions]# irb -r puppet -r get_ad_uids.rb
>> irb(main):001:0> Puppet::Parser::Functions::function(:get_ad_uids)
>> => "function_get_ad_uids"
>> irb(main):002:0> s = Puppet::Parser::Scope.new
>> => #> @symtable={}, @defaults={}, @tags=[]>
>> irb(main):003:0> s.function_get_ad_uids('5')
>> => ["user1", "user2", "user3", "user4"]
>>
>> ## manifests/templates.pp
>>
>> node common {
>>    include core
>> .. snip ..
>> }
>>
>> .. snip ..
>>
>> node puppetmaster inherits common {
>>    include puppet::server
>>    include homedir::creator
>>
>>    $uids = get_ad_uids('5')  # should return an array of homedirs
>> to ensure are created
>>    print { $uids: }
>>    # make sure the home directories exist for all ad users above
>>    # the specified uid
>>
>>    ensure_homedirs { $uids: }
>>
>> .. snip ..
>> }
>>
>> ==> puppet-err.log <==
>> 2009-10-19T14:02:25-06:00 tuatara puppetmasterd[4479]:
>> Puppet::Parser::AST::Resource failed with error ArgumentError:
>> Resources require a type and title at
>> /var/lib/puppet/manifests/templates.pp:34 on node tuatara
>> 2009-10-19T14:02:25-06:00 tuatara puppetmasterd[4479]:
>> Puppet::Parser::AST::Resource failed with error ArgumentError:
>> Resources require a type and title at
>> /var/lib/puppet/manifests/templates.pp:34 on node tuatara
>> 2009-10-19T14:02:25-06:00 tuatara puppetd[4538]: Could not retrieve
>> catalog: Puppet::Parser::AST::Resource failed with error
>> ArgumentError: Resources require a type and title at
>> /var/lib/puppet/manifests/templates.pp:34 on node tuatara
>>
>
> I should mention that line 34 is the print command above.  However, if
> I remove that, it errors at the 'ensure_homedirs function.
>
> Clint
>

Following up the previous two messages.  Thanks to everyone who helped
me.  Here's the resolution (I've removed convos that aren't relevant
to this discussion)

15:46 < herlo> okay, so I know I just posted this on the puppet
mailing list, but I was thinking a bit more about it and had a
question.
15:47 < herlo> http://snipurl.com/slqcz
15:47 < herlo> my question is about how plugins return values to puppet.
15:48 < herlo> because it seems that while my function returns values,
somehow puppet is not getting the values back.
15:48 < herlo> Thoughts?
15:49 < Volcane> herlo: do you have :type => :rvalue ?
15:50 < jrojas_> Volcane: yes
15:50 < jrojas_> newfunction(:get_ad_uids, :type => :rvalue) do |args|
15:50 < jrojas_> sorry i was looking at it when you asked :P
15:50 < Volcane> :)
15:50 < herlo> Volcane: right at the top of that function, or should be
15:51 < herlo> Volcane: it's in the snipurl
15:51 < herlo> I agree it *should* return, but it is not returnning anything
16:02 < herlo> jrojas_: Volcane: any other thoughts?
16:03 < Volcane> herlo: if you rip out all the code and just return an
array of known values, does it work?
16:03 < herlo> dunno.  I do know that from the other direction if I
put $uids = ["user1", "u

[Puppet Users] sysidcfg file on OpenSolaris 2009.06 client

2009-10-19 Thread windowsrefund

Puppet 0.24.8 on both the client and server. My zone is being created
but the sysidcfg file is not being created under etc/

info: Caching catalog at /var//opt/csw/puppet/state/localconfig.yaml
notice: Starting catalog run
notice: //Node[labrat1]/Zone_instance[labrat1a]/zone_zfs_root/Zfs
[rpool/export/zones]/ensure: created
notice: //Node[labrat1]/Zone_instance[labrat1a]/zone_zfs_root/File[/
export/zones]/mode: mode changed '755' to '700'
notice: //Node[labrat1]/Zone_instance[labrat1a]/Zfs[rpool/export/zones/
labrat1a]/ensure: created
notice: //Node[labrat1]/Zone_instance[labrat1a]/File[/export/zones/
labrat1a]/mode: mode changed '755' to '700'
err: //Node[labrat1]/Zone_instance[labrat1a]/Zone[labrat1a]/ensure:
change from absent to running failed: Could not create sysidcfg: No
such file or directory - /export/zones/labrat1a/root/etc/sysidcfg
notice: Finished catalog run in 689.95 seconds










Here is the contents of modules/zone_instance/manifests/init.pp:

class zone_zfs_root {

zfs { "rpool/export/zones":
mountpoint => "/export/zones",
ensure => present,
}

file { "/export/zones":
ensure => directory,
mode => 700,
require => Zfs["rpool/export/zones"],
}

}

define zone_instance ( $zone_nameserver='10.250.250.30', $zone_if,
$zone_ip, $zone_route='10.250.250.1', $zone_mask='255.255.255.0') {

$zname = "$name.$domain"

include zone_zfs_root

zfs { "rpool/export/zones/$name":
mountpoint => "/export/zones/$name",
ensure => present,
require => File["/export/zones"],
}

file { "/export/zones/$name":
ensure => directory,
mode => 700,
require => Zfs["rpool/export/zones/$name"],
}

zone { $name:
ensure => running,
create_args => "-b",
autoboot => true,
ip => "$zone_if:$zone_ip",
path => "/export/zones/%s",
realhostname => $zname,
sysidcfg => template("zone_instance/sysidcfg"),
require => File["/export/zones/$name"],
}

}
--~--~-~--~~~---~--~~
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: Is there a limit to the number of entires you can have for modulepath in puppet.conf?

2009-10-19 Thread Billy Shaw





Ohad Levy wrote:
This really doesn't sound like a common design, if you
have the need for such a complex setup, I would recommend to create an
environment, and link the relevant modules into that env directory.
  
this has been proven to scale up with no issues.
  
my 2 cents,
Ohad
  
  On Sat, Oct 17, 2009 at 8:02 PM, Billy Shaw 
wrote:
  


I am in the design and testing phase working on various configurations
and options.

I generate my configuration files programmatically once a day based on
queries to an asset management database to organize servers a specific
way.
There was discussion of a design option that would have a few of hundred
entries in the modulepath day one and grow from there (creating new ones
if needed when the configuration files are generated)..
I don't want to start down a path that could limit me down the road and
require starting over and since I could not find a limit in the puppet
documentation so I thought I would ask.

James Turnbull wrote:
> Are you experiencing an error?  Have you tested?
>
> Regards
>
> James Turnbull
>
>







  
  
  
  
  

Thanks for the input to everyone on this thread. Sounds like the
suggestion I posed of a large modulepath is not a good one (nor is it
scalable which was my first instinct). I am going with a design which
does have a unique module path for each department (around 40) and one
which is shared by all. This will allow me leverage existing
nomenclature within puppet (for customization) that is in alignment
with existing server administration and change processes.


Thank you




--~--~-~--~~~---~--~~
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] Parser error which appears to be a bug in puppet

2009-10-19 Thread Clint Savage

Below I have a parser function that I have created which was working,
but now is not working.  I have made quite a few changes to this code,
but can't seem to find the right combination to make it work again.

After extensive conversations with Volcane, joe-mac and andrewcshafer
from #puppet, it was suggested that I put this on the list.  I don't
know what exactly is going on, but I can say that I think this is a
bug now.  However, I can't prove it beyond what I have here without
help.

I'd like to put this out to the puppeteers here and see if I can get
some more help identifying why I get the error at the end of the
information below.

Thanks in advance for all the help.

Cheers,

Clint

-

## modules/core/plugins/puppet/parser/functions/get_ad_uids.rb

require 'ldap'

# this function queries our Active Directory server and pulls users
with a uid greater than 5.
# Specifically used for guaranteeing homedirs exist for users in the list

module Puppet::Parser::Functions
newfunction(:get_ad_uids, :type => :rvalue) do |args|

host  =  'ad.xyz123.net'
port  =  LDAP::LDAP_PORT

# cn=ldap,ou=System Accounts,ou=Resources,dc=ad,dc=xyz123,dc=net
root = 'cn=ldap,ou=System Accounts,ou=Resources,dc=ad,dc=xyz123,dc=net'
base = 'ou=Engineering,ou=xyz123,dc=ad,dc=xyz123,dc=net'
password = 'password'

conn = LDAP::Conn.new(host, port)
conn.set_option( LDAP::LDAP_OPT_PROTOCOL_VERSION, 3 )
conn.bind(root, password)

uidnum = args[0]
ad_uids = Array.new
ids = conn.search2(base, LDAP::LDAP_SCOPE_SUBTREE,
"(uidNumber>=#{uidnum})", "uid")
uids = ad_uids.map { |i| i[0] }.flatten

uids

  end
end

-- output of above code --

[r...@tuatara (puppetmaster) functions]# irb -r puppet -r get_ad_uids.rb
irb(main):001:0> Puppet::Parser::Functions::function(:get_ad_uids)
=> "function_get_ad_uids"
irb(main):002:0> s = Puppet::Parser::Scope.new
=> #
irb(main):003:0> s.function_get_ad_uids('5')
=> ["user1", "user2", "user3", "user4"]

## manifests/templates.pp

node common {
include core
.. snip ..
}

.. snip ..

node puppetmaster inherits common {
include puppet::server
include homedir::creator

$uids = get_ad_uids('5')  # should return an array of homedirs
to ensure are created
print { $uids: }
# make sure the home directories exist for all ad users above
# the specified uid

ensure_homedirs { $uids: }

.. snip ..
}

==> puppet-err.log <==
2009-10-19T14:02:25-06:00 tuatara puppetmasterd[4479]:
Puppet::Parser::AST::Resource failed with error ArgumentError:
Resources require a type and title at
/var/lib/puppet/manifests/templates.pp:34 on node tuatara
2009-10-19T14:02:25-06:00 tuatara puppetmasterd[4479]:
Puppet::Parser::AST::Resource failed with error ArgumentError:
Resources require a type and title at
/var/lib/puppet/manifests/templates.pp:34 on node tuatara
2009-10-19T14:02:25-06:00 tuatara puppetd[4538]: Could not retrieve
catalog: Puppet::Parser::AST::Resource failed with error
ArgumentError: Resources require a type and title at
/var/lib/puppet/manifests/templates.pp:34 on node tuatara

--~--~-~--~~~---~--~~
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: new to puppet. how to add condition in a class?

2009-10-19 Thread william Famy
2009/10/13 Teyo Tyree 

>
> Hey William,
>
> Welcome to Puppet.
>
_
[wf:]
thanks


>
> On Mon, Oct 12, 2009 at 2:01 AM, william Famy 
> wrote:
> > Hi.
> >
> > II am trying puppet after cfengine and I am looking for a method to use a
> > class if a file exist.
>
> One way to express this is to write a custom fact to test whether or
> not a file is on the client system.  Shouldn't be hard to follow the
> custom fact documentation.
>
> http://reductivelabs.com/trac/puppet/wiki/AddingFacts
>
> Then you can simply wrap a conditional around the fact you create.
>
__
[wf:]

Ok i create a small facter to test if the file is present

in /usr/lib/ruby/vendor_ruby/facter/
i use debian lenny
i create a ztestapache.rb file from selinux one

puppetmaster:/usr/lib/ruby/vendor_ruby/facter# cat ztestapache.rb
# Fact for SElinux
# Written by immerda admin team (admin(at)immerda.ch)

Facter.add("ztestapache") do
setcode do
result = "false"
if FileTest.exists?("/etc/puppet/install/apache")
result = "true"
end
result
end
end


so i the file /etc/puppet/install/apache is present i can ask puppet to
install apache2

I have to create the puppet class on my puppetmaster.

I will tell you as soon as possible.




>
> if $yourfact {
>  include yourclass
> }
>
> [...]
>
> So you can use the pattern above, but I bet there is a better way to
> model you configuration.  What is you use case?  Ignore Puppet and
> CFengine for a moment and describe the problem.  Often times there are
> simpler more maintainable patterns of expression that will yield the
> same configuration.
>
_
[wf:]

It is easy for me to deploy config on clients computer.
Exemple. I install 20 server on differents place and i allow peaple to add,
start programme like samba

The person want to add apache. He just have to connect the web interface and
ask for samba. the web interface create an empty file
/etc/puppet/install/samba and puppet do the job to install a working samba
from the puppet master. SO I do not have to manage my puppetmaster fqdn to
add samba and every one is happy.

>
> >
> >
> > thanks for your help.
> >
> > regards
> >
> > >
> >
>
> Cheers,
> Teyo
>
>
>
> --
> Teyo Tyree :: www.reductivelabs.com :: +1.615.275.5066
>
> >
>

--~--~-~--~~~---~--~~
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: Parser error which appears to be a bug in puppet

2009-10-19 Thread Clint Savage

On Mon, Oct 19, 2009 at 2:11 PM, Clint Savage  wrote:
> Below I have a parser function that I have created which was working,
> but now is not working.  I have made quite a few changes to this code,
> but can't seem to find the right combination to make it work again.
>
> After extensive conversations with Volcane, joe-mac and andrewcshafer
> from #puppet, it was suggested that I put this on the list.  I don't
> know what exactly is going on, but I can say that I think this is a
> bug now.  However, I can't prove it beyond what I have here without
> help.
>
> I'd like to put this out to the puppeteers here and see if I can get
> some more help identifying why I get the error at the end of the
> information below.
>
> Thanks in advance for all the help.
>
> Cheers,
>
> Clint
>
> -
>
> ## modules/core/plugins/puppet/parser/functions/get_ad_uids.rb
>
> require 'ldap'
>
> # this function queries our Active Directory server and pulls users
> with a uid greater than 5.
> # Specifically used for guaranteeing homedirs exist for users in the list
>
> module Puppet::Parser::Functions
>    newfunction(:get_ad_uids, :type => :rvalue) do |args|
>
>        host  =  'ad.xyz123.net'
>        port  =  LDAP::LDAP_PORT
>
>        # cn=ldap,ou=System Accounts,ou=Resources,dc=ad,dc=xyz123,dc=net
>        root = 'cn=ldap,ou=System Accounts,ou=Resources,dc=ad,dc=xyz123,dc=net'
>        base = 'ou=Engineering,ou=xyz123,dc=ad,dc=xyz123,dc=net'
>        password = 'password'
>
>        conn = LDAP::Conn.new(host, port)
>        conn.set_option( LDAP::LDAP_OPT_PROTOCOL_VERSION, 3 )
>        conn.bind(root, password)
>
>        uidnum = args[0]
>        ad_uids = Array.new
>        ids = conn.search2(base, LDAP::LDAP_SCOPE_SUBTREE,
> "(uidNumber>=#{uidnum})", "uid")
>        uids = ad_uids.map { |i| i[0] }.flatten
>
>        uids
>
>  end
> end
>
> -- output of above code --
>
> [r...@tuatara (puppetmaster) functions]# irb -r puppet -r get_ad_uids.rb
> irb(main):001:0> Puppet::Parser::Functions::function(:get_ad_uids)
> => "function_get_ad_uids"
> irb(main):002:0> s = Puppet::Parser::Scope.new
> => # @symtable={}, @defaults={}, @tags=[]>
> irb(main):003:0> s.function_get_ad_uids('5')
> => ["user1", "user2", "user3", "user4"]
>
> ## manifests/templates.pp
>
> node common {
>    include core
> .. snip ..
> }
>
> .. snip ..
>
> node puppetmaster inherits common {
>    include puppet::server
>    include homedir::creator
>
>    $uids = get_ad_uids('5')  # should return an array of homedirs
> to ensure are created
>    print { $uids: }
>    # make sure the home directories exist for all ad users above
>    # the specified uid
>
>    ensure_homedirs { $uids: }
>
> .. snip ..
> }
>
> ==> puppet-err.log <==
> 2009-10-19T14:02:25-06:00 tuatara puppetmasterd[4479]:
> Puppet::Parser::AST::Resource failed with error ArgumentError:
> Resources require a type and title at
> /var/lib/puppet/manifests/templates.pp:34 on node tuatara
> 2009-10-19T14:02:25-06:00 tuatara puppetmasterd[4479]:
> Puppet::Parser::AST::Resource failed with error ArgumentError:
> Resources require a type and title at
> /var/lib/puppet/manifests/templates.pp:34 on node tuatara
> 2009-10-19T14:02:25-06:00 tuatara puppetd[4538]: Could not retrieve
> catalog: Puppet::Parser::AST::Resource failed with error
> ArgumentError: Resources require a type and title at
> /var/lib/puppet/manifests/templates.pp:34 on node tuatara
>

I should mention that line 34 is the print command above.  However, if
I remove that, it errors at the 'ensure_homedirs function.

Clint

--~--~-~--~~~---~--~~
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: Best Practices Rewrite - First Draft

2009-10-19 Thread R.I.Pienaar

hello,

- "James Turnbull"  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> R.I.Pienaar wrote:
> 
> > Pattern collections are much better, I'd rather have articles
> > exploring features that people can learn each feature and then
> > apply to their environment than a best practice since those are
> > almost always full of assumptions about local conditions,
> > patterns are flexible and can be molded to your needs..
> > 
> 
> What Arri said.  I'd like to see logical, interlinked set of
> patterns that can be built into a logical whole rather than a
> single, potentially unwieldy document.

Sorry if you consider this just link spam, but read this url that covers just 
this:

http://blogs.usenix.org/2009/10/16/tom-limoncellis-lisa-2009-training-design-patterns-for-system-administrators/

-- 
R.I.Pienaar

--~--~-~--~~~---~--~~
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: Passenger Woes

2009-10-19 Thread Julian Simpson

Is there a file called rewindable_input.rb on the system? Looks like a  
missing gem or ruby path issue.

J.

Sent from my iPhone

On 19 Oct 2009, at 18:52, Stephen Nelson-Smith   
wrote:

>
> Hello,
>
> I really didn't expect this to be difficult, but I've been struggling
> with this all day :(
>
> I'm running CentOS 5.3, with rubygems, rack and fastthread, from EPEL.
>
> I'm running puppet-0.25.0-1 built from the spec file in the latest
> stable tarball.
>
> I'm using mod_passenger-2.2.5-2.el5 from Jeroen van Meeuwen (kanarip),
> which is effectively EPEL too.
>
> I'm using the config.ru file from
> http://github.com/reductivelabs/puppet/blob/master/ext/rack/files/config.ru 
> ,
> chowned to puppet and chmoded 644.
>
> I've added:
>
> [puppetmasterd]
>ssl_client_header = SSL_CLIENT_S_DN
>ssl_client_verify_header = SSL_CLIENT_VERIFY
>
> to my puppet.conf as directed in the README.
>
> I've set up an apache vhost as follows:
>
> PassengerHighPerformance on
> PassengerMaxPoolSize 12
> PassengerPoolIdleTime 1500
> # PassengerMaxRequests 1000
> PassengerStatThrottleRate 120
> RackAutoDetect Off
> RailsAutoDetect Off
>
> Listen 8140
>
> LoadModule ssl_module modules/mod_ssl.so
>
> AddType application/x-x509-ca-cert .crt
> AddType application/x-pkcs7-crl.crl
> SSLPassPhraseDialog  builtin
> SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
> SSLSessionCacheTimeout  300
> SSLMutex default
> SSLRandomSeed startup file:/dev/urandom  256
> SSLRandomSeed connect builtin
> SSLCryptoDevice builtin
>
> 
>SSLEngine on
>SSLProtocol -ALL +SSLv3 +TLSv1
>SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP
>
>SSLCertificateFile  /var/lib/puppet/ssl/certs/puppet.pem
>SSLCertificateKeyFile   /var/lib/puppet/ssl/private_keys/ 
> puppet.pem
>SSLCertificateChainFile /var/lib/puppet/ssl/ca/ca_crt.pem
>SSLCACertificateFile/var/lib/puppet/ssl/ca/ca_crt.pem
>
># If Apache complains about invalid signatures on the CRL, you
> can try disabling
># CRL checking by commenting the next line, but this is not  
> recommended.
>SSLCARevocationFile /var/lib/puppet/ssl/ca/ca_crl.pem
>
>SSLVerifyClient optional
>SSLVerifyDepth  1
>SSLOptions +StdEnvVars
>
>DocumentRoot /etc/puppet/rack/public/
>RackBaseURI /
>
>Options None
>AllowOverride None
>Order allow,deny
>allow from all
>
> 
>
> When I start apache, and browse to the puppet server on 8140 I get a
> 500 and see the following in the logs:
>
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `gem_original_require': no such file to load -- rack/rewindable_input
> (LoadError)
>from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 
> 31:in
> `require'
>from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/ 
> phusion_passenger/rack/request_handler.rb:27
>from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 
> 31:in
> `gem_original_require'
>from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 
> 31:in
> `require'
>from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/ 
> phusion_passenger/rack/application_spawner.rb:34
>from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 
> 31:in
> `gem_original_require'
>from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 
> 31:in
> `require'
>from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/ 
> phusion_passenger/spawn_manager.rb:157:in
> `spawn_application'
>from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/ 
> phusion_passenger/spawn_manager.rb:287:in
> `handle_spawn_application'
>from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/ 
> phusion_passenger/abstract_server.rb:352:in
> `__send__'
>from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/ 
> phusion_passenger/abstract_server.rb:352:in
> `main_loop'
>from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/ 
> phusion_passenger/abstract_server.rb:196:in
> `start_synchronously'
>from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/bin/ 
> passenger-spawn-server:61
> [ pid=5357 file=ext/apache2/Hooks.cpp:725 time=2009-10-19  
> 23:09:10.957 ]:
>  Unexpected error in mod_passenger: Cannot spawn application
> '/etc/puppet/rack': The spawn server has exited unexpectedly.
>  Backtrace:
> in 'virtual boost::shared_ptr
> Passenger::ApplicationPoolServer::Client::get(const
> Passenger::PoolOptions&)' (ApplicationPoolServer.h:471)
> in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:521)
>
> I'm baffled - I can't see what's wrong.  Please help! :)
>
> TIA,
>
> S.
> -- 
> Stephen Nelson-Smith
> Technical Director
> Atalanta Systems Ltd
> www.atalanta-systems.com
>
> >

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppe

[Puppet Users] Passenger Woes

2009-10-19 Thread Stephen Nelson-Smith

Hello,

I really didn't expect this to be difficult, but I've been struggling
with this all day :(

I'm running CentOS 5.3, with rubygems, rack and fastthread, from EPEL.

I'm running puppet-0.25.0-1 built from the spec file in the latest
stable tarball.

I'm using mod_passenger-2.2.5-2.el5 from Jeroen van Meeuwen (kanarip),
which is effectively EPEL too.

I'm using the config.ru file from
http://github.com/reductivelabs/puppet/blob/master/ext/rack/files/config.ru,
chowned to puppet and chmoded 644.

I've added:

[puppetmasterd]
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY

to my puppet.conf as directed in the README.

I've set up an apache vhost as follows:

PassengerHighPerformance on
PassengerMaxPoolSize 12
PassengerPoolIdleTime 1500
# PassengerMaxRequests 1000
PassengerStatThrottleRate 120
RackAutoDetect Off
RailsAutoDetect Off

Listen 8140

LoadModule ssl_module modules/mod_ssl.so

AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl.crl
SSLPassPhraseDialog  builtin
SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
SSLSessionCacheTimeout  300
SSLMutex default
SSLRandomSeed startup file:/dev/urandom  256
SSLRandomSeed connect builtin
SSLCryptoDevice builtin


SSLEngine on
SSLProtocol -ALL +SSLv3 +TLSv1
SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP

SSLCertificateFile  /var/lib/puppet/ssl/certs/puppet.pem
SSLCertificateKeyFile   /var/lib/puppet/ssl/private_keys/puppet.pem
SSLCertificateChainFile /var/lib/puppet/ssl/ca/ca_crt.pem
SSLCACertificateFile/var/lib/puppet/ssl/ca/ca_crt.pem

# If Apache complains about invalid signatures on the CRL, you
can try disabling
# CRL checking by commenting the next line, but this is not recommended.
SSLCARevocationFile /var/lib/puppet/ssl/ca/ca_crl.pem

SSLVerifyClient optional
SSLVerifyDepth  1
SSLOptions +StdEnvVars

DocumentRoot /etc/puppet/rack/public/
RackBaseURI /

Options None
AllowOverride None
Order allow,deny
allow from all



When I start apache, and browse to the puppet server on 8140 I get a
500 and see the following in the logs:

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require': no such file to load -- rack/rewindable_input
(LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from 
/usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/rack/request_handler.rb:27
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from 
/usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/rack/application_spawner.rb:34
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from 
/usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/spawn_manager.rb:157:in
`spawn_application'
from 
/usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/spawn_manager.rb:287:in
`handle_spawn_application'
from 
/usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/abstract_server.rb:352:in
`__send__'
from 
/usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/abstract_server.rb:352:in
`main_loop'
from 
/usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/abstract_server.rb:196:in
`start_synchronously'
from 
/usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/bin/passenger-spawn-server:61
[ pid=5357 file=ext/apache2/Hooks.cpp:725 time=2009-10-19 23:09:10.957 ]:
  Unexpected error in mod_passenger: Cannot spawn application
'/etc/puppet/rack': The spawn server has exited unexpectedly.
  Backtrace:
 in 'virtual boost::shared_ptr
Passenger::ApplicationPoolServer::Client::get(const
Passenger::PoolOptions&)' (ApplicationPoolServer.h:471)
 in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:521)

I'm baffled - I can't see what's wrong.  Please help! :)

TIA,

S.
-- 
Stephen Nelson-Smith
Technical Director
Atalanta Systems Ltd
www.atalanta-systems.com

--~--~-~--~~~---~--~~
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: How to handle failures of resources

2009-10-19 Thread LdvT

I wouldn't mind having failure detection.

Say somehow a bad copy of a .conf file is distributed; and the service
fails to start.
If that can be detected and used as a condition, puppet could than
call up another manifest to drop in a default/backup copy of the .conf
file and restart the service almost immediately.
Toss in a notify function on that manifest, and it would be a very
handy feature for making changes on diverse production systems.
--~--~-~--~~~---~--~~
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: trouble with custom type on 0.24.8

2009-10-19 Thread Bernhard Bock

Hi John,

On 19 Okt., 15:37, jcbollinger  wrote:
> The custom type's Ruby code should be in /
> /plugins/puppet/types/.rb.  Its provider(s), if
> any, should be in //plugins/puppet/provider/
> /.rb.

Indeed, I got the path wrong. Thanks for the clarification.

And just for the record (and other readers):
You have a typo in the path in your answer. It is not .../types/
but .../type/.

best regards
Bernhard

--~--~-~--~~~---~--~~
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: trouble with custom type on 0.24.8

2009-10-19 Thread jcbollinger



On Oct 16, 5:07 am, Bernhard Bock  wrote:
> >> Clients are giving me the following error:
> >> "Could not retrieve catalog: Could not find resource type zypper_repo
> >> at /etc/puppet/manifests/nodes/mgt.pp:33 on node "
>
> I'm experiencing the same problem with a custom type in 0.24.8.
>
> The type compiles when called with 'ruby -rpuppet '.
> With irb, I can retrieve the type just fine.
>
> Any chance that it is related to this 
> bug?http://projects.reductivelabs.com/issues/2574

Custom types in modules generally work in 0.24.8, so I doubt that
issue 2574 is related to your problem.  Supposing that your custom
type is well-formed (which successful compilation does not guarantee),
the most likely causes of your problem are that it is not correctly
positioned inside your module, or it is not readable by
puppetmasterd.  The custom type's Ruby code should be in /
/plugins/puppet/types/.rb.  Its provider(s), if
any, should be in //plugins/puppet/provider/
/.rb.  The files and all the directories in the path
to them should be readable by the puppetmaster process, which may
(should) be running as a non-root user.

Be sure also to read http://reductivelabs.com/trac/puppet/wiki/PluginsInModules
for required client-side configuration for plug-ins.
--~--~-~--~~~---~--~~
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] access exported resources in template

2009-10-19 Thread Bernhard Bock

Hi,

I'm trying to develop a class that autogenerates a config file based
on an .erb template.
It shall populate the config file with data exported from various hosts.

Some pseudocode to clarify my issue:

node n1 {
   @@mytype {
  "name":
  property => "foo"
   }
}

template.erb:
<% mytype.each do |bar| %>
<%= bar.name %>
<%= bar.property %>
<% end %>

My question is: How can I access and iterate through the exported
resources in the template? mytype.each will not work...

best regards
Bernhard

--~--~-~--~~~---~--~~
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: How to handle failures of resources

2009-10-19 Thread Adam Ryczkowski

>> Welcome all,
>>
>> Resources  can  depend  one from each other, and failure of a required
>> resource prevent the dependants from being run.
>>
>> But  how  to  trap these failures and handle them? Is there any way to
>> e.g.   set  a  variable  $error_happened  to  "true"  if  some promise
>> about  the  resource  couldn't  be  kept? Maybe even there is a way to
>> capture the error string?
>>
>> Some  preventive  actions  can  be automated, and Puppet seems to be a
>> good  place to implement   them.   And   users  who program Puppet are
>> encouraged to keep from external scripts as far as they could.

> What are your goals here?

> There isn't a lot of room for programming these aspects of Puppet from
> within the language, but you're the first person to ask for this kind
> of feature, so for all I know, what you're asking for might be
> straightforward to add.

This  question  is  connected  with  my  previous  one,  the one about
determining  if  there  is  enough  place in the destination to copy a
file.  Because  if there isn't - the "file" resource fails and I could
catch  that  condition  and  do  some  action  -  rollback  whole move
operation,  which  means delete the ".puppettmp" file, move back those
files, which had been already moved, and perhaps send an email.

Now  I  understand, that whole that process would better be handled by
custom  scripts, so maybe indeed there is no need for such feature. At
least not when transaction support is ready.

--
 Adam Ryczkowski
--~--~-~--~~~---~--~~
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: How to determine if there is a room for a copied file in puppet before copying?

2009-10-19 Thread Adam Ryczkowski


> Really, though, you probably don't want to use Puppet to copy a 1gb
> file - it still copies the files into memory.
Is  this true also for local copies (i.e. copies which doesn't involve
file server, and where source and destination are on the same system)?


--~--~-~--~~~---~--~~
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: ANNOUNCE: Puppet 0.25.1rc2 available

2009-10-19 Thread Martin Englund



On Oct 17, 4:19 am, James Turnbull  wrote:

> Puppet 0.25.1 Release Candidate 2 is now available for testing.
>
Package for OpenSolaris is available at:


To install it, run:
pkg set-publisher -O http://pkg.codenursery.com/dev pkg-
dev.codenursery.com
pkg install puppet

If you want to run puppet 0.25.0 it is available in the release
repository:


cheers,
/Martin
--~--~-~--~~~---~--~~
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: Best Practices Rewrite - First Draft

2009-10-19 Thread James Turnbull

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

R.I.Pienaar wrote:

> Pattern collections are much better, I'd rather have articles
> exploring features that people can learn each feature and then
> apply to their environment than a best practice since those are
> almost always full of assumptions about local conditions,
> patterns are flexible and can be molded to your needs..
> 

What Arri said.  I'd like to see logical, interlinked set of
patterns that can be built into a logical whole rather than a
single, potentially unwieldy document.

Regards

James Turnbull

- --
Author of:
* Pro Linux Systems Administration (http://tinyurl.com/linuxadmin)
* Pulling Strings with Puppet (http://tinyurl.com/pupbook)
* Pro Nagios 2.0 (http://tinyurl.com/pronagios)
* Hardening Linux (http://tinyurl.com/hardeninglinux)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEVAwUBStxEzCFa/lDkFHAyAQJymgf+KaNlFgd5Cn3hpPVPLhMU1StC+EvVcaUi
ChvDFrJp+dOB//ZoWUdf5W5BEDKNHVd1SfLZGdaZuv8fqR4dgG2u7B8UVcIKx/8t
Te0ocC7KxAxd1IhcYDfu20rcsEkN//WEiJFMoHSBq8fP0ZpzZl8yyCQQFIvtfl/c
AbCtAr3K42QH7zUxDqv/7aT/MSK1gqmC7Sl+892vdU/g7mEcfYQsgtXEsyRBHR8P
2040gJGlFa6YsAPySaMLUy3zpbK6pVubtn1FH2Jz+wkJZTyU1pvuBOzzV12foSfE
s3MQWh85qo2otKGnSBetNUaCOcbah/Xuedfr5LcRmFLHeu5x1R+RdA==
=11hx
-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
-~--~~~~--~~--~--~---



[Puppet Users] Re: CPU on client ?

2009-10-19 Thread Xavier Beaudouin
Hi Brice,

2009/10/19 Brice Figureau 

>
> On Mon, 2009-10-19 at 12:01 +0200, Xavier Beaudouin wrote:
> > Hum... People there think it is use to mutch... more than 20% during a
> > run...
>
> Remember something: you paid for that CPU, that means you want to use it
> as much as you can otherwise you paid for something you don't use.
> With that in mind, the optimal load on a server should be 100% CPU
> used :-)
>

Yeah but those people want the CPU used for some things that is based on non
reliable protocols (eg multicast) and doesn't want to loose on packet...

In fact, we are providing (lots !) of servers, and the users uses them...


> If those servers are not used or have room for 20% of CPU used by
> puppet, then it shouldn't matter, the kernel scheduler will do what it
> needs to allocate CPU to every running programs.
>

Yeah, this is what I am telling them without no luck.

I think this will going into crontab... :(


> If those servers are already 100% loaded, then that's an issue, and you
> might:
>  * let puppet run less frequently or do CPU bound things less frequently
>  * isolate what consumes CPU when doing a run (do you have unbounded
> execs?)
>  * does your package manager consumes CPU?
>

We don't use package manager except the rpm on RHEL 4 or 5...


> In my own experience, puppetd itself is usually more I/O bound (ie
> network and disk) than cpu bound, but since it depends entirely on what
> you have in your manifest, YMMV.
>

Mostly simple things :
- check snmpd.conf
- check resolv.conf
- check hosts
- check stuff in /etc/sysconfig/network-scripts are good
- check munin.conf
- check the tnsnames files
- check the syslogd.conf

I really thinks they are brain damaged especialy with the machines that
has 8 cores...

/Xavier


> > 2009/10/19 Ohad Levy 
> > puppet is usually not using too much of cpu.. (unless your
> > users are running on the puppetmaster ;))
> >
> > maybe you can restrict the amount of things puppet do in each
> > run with the schedule metadata.
> >
> > How can I do that.. ?
>
> See:
> http://reductivelabs.com/trac/puppet/wiki/MetaparameterReference#schedule
>
> --
> Brice Figureau
> Follow the latest Puppet Community evolutions on www.planetpuppet.org!
>
>
> >
>


-- 
--
Xavier Beaudouin - http://kazar.net/
http://magicduck.labrute.fr/

--~--~-~--~~~---~--~~
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: Best Practices Rewrite - First Draft

2009-10-19 Thread R.I.Pienaar

'lo,

- "Julian Simpson"  wrote:

> No objections here.  I seem to recall that there had a been a
> discussion at PuppetCamp about perhaps moving to a pattens collection
> instead of set of best practices - not sure if anyone has bandwidth
> to to work on this but it might help to keep it in mind.

Pattern collections are much better, I'd rather have articles exploring 
features that people can learn each feature and then apply to their environment 
than a best practice since those are almost always full of assumptions about 
local conditions, patterns are flexible and can be molded to your needs..

-- 
R.I.Pienaar

--~--~-~--~~~---~--~~
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: CPU on client ?

2009-10-19 Thread Brice Figureau

On Mon, 2009-10-19 at 12:01 +0200, Xavier Beaudouin wrote:
> Hum... People there think it is use to mutch... more than 20% during a
> run...

Remember something: you paid for that CPU, that means you want to use it
as much as you can otherwise you paid for something you don't use.
With that in mind, the optimal load on a server should be 100% CPU
used :-)

If those servers are not used or have room for 20% of CPU used by
puppet, then it shouldn't matter, the kernel scheduler will do what it
needs to allocate CPU to every running programs.

If those servers are already 100% loaded, then that's an issue, and you
might:
 * let puppet run less frequently or do CPU bound things less frequently
 * isolate what consumes CPU when doing a run (do you have unbounded
execs?)
 * does your package manager consumes CPU?

In my own experience, puppetd itself is usually more I/O bound (ie
network and disk) than cpu bound, but since it depends entirely on what
you have in your manifest, YMMV.

> 2009/10/19 Ohad Levy 
> puppet is usually not using too much of cpu.. (unless your
> users are running on the puppetmaster ;))
> 
> maybe you can restrict the amount of things puppet do in each
> run with the schedule metadata.
> 
> How can I do that.. ?

See:
http://reductivelabs.com/trac/puppet/wiki/MetaparameterReference#schedule

-- 
Brice Figureau
Follow the latest Puppet Community evolutions on www.planetpuppet.org!


--~--~-~--~~~---~--~~
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: CPU on client ?

2009-10-19 Thread Xavier Beaudouin
Hum... People there think it is use to mutch... more than 20% during a
run...

2009/10/19 Ohad Levy 

> puppet is usually not using too much of cpu.. (unless your users are
> running on the puppetmaster ;))
>
> maybe you can restrict the amount of things puppet do in each run with the
> schedule metadata.
>

How can I do that.. ?

/Xavier
--
Xavier Beaudouin - http://kazar.net/
http://magicduck.labrute.fr/

--~--~-~--~~~---~--~~
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: CPU on client ?

2009-10-19 Thread Ohad Levy
puppet is usually not using too much of cpu.. (unless your users are running
on the puppetmaster ;))

maybe you can restrict the amount of things puppet do in each run with the
schedule metadata.

Ohad

On Mon, Oct 19, 2009 at 5:54 PM, Xavier Beaudouin wrote:

> CPU usage, memory is not (yet) a problem...
>
> Nice, is an idea, but I think dangerous IMHO...
>
> /Xavier
>
> 2009/10/19 Ohad Levy 
>
> cpu or memory?
>>
>> you can run puppet with nice, but if it will restart services, they will
>> be niced too.
>> if its memory, you can swtich to cron.
>>
>> cheers,
>> Ohad
>>
>>
>> On Mon, Oct 19, 2009 at 5:42 PM, Xavier Beaudouin 
>> wrote:
>>
>>> Hello there,
>>>
>>> I am some complains from people there at my work that puppetd "takes too
>>> mutch CPU"...
>>>
>>> Is there some method to downcase the CPU usage when it is waked-up ?
>>>
>>> (this people make me crazy... )
>>>
>>> --
>>> Xavier Beaudouin - http://kazar.net/
>>> http://magicduck.labrute.fr/
>>>
>>>
>>>
>>
>>
>>
>
>
> --
> --
> Xavier Beaudouin - http://kazar.net/
> http://magicduck.labrute.fr/
>
> >
>

--~--~-~--~~~---~--~~
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: CPU on client ?

2009-10-19 Thread Xavier Beaudouin
CPU usage, memory is not (yet) a problem...

Nice, is an idea, but I think dangerous IMHO...

/Xavier

2009/10/19 Ohad Levy 

> cpu or memory?
>
> you can run puppet with nice, but if it will restart services, they will be
> niced too.
> if its memory, you can swtich to cron.
>
> cheers,
> Ohad
>
>
> On Mon, Oct 19, 2009 at 5:42 PM, Xavier Beaudouin wrote:
>
>> Hello there,
>>
>> I am some complains from people there at my work that puppetd "takes too
>> mutch CPU"...
>>
>> Is there some method to downcase the CPU usage when it is waked-up ?
>>
>> (this people make me crazy... )
>>
>> --
>> Xavier Beaudouin - http://kazar.net/
>> http://magicduck.labrute.fr/
>>
>>
>>
>
> >
>


-- 
--
Xavier Beaudouin - http://kazar.net/
http://magicduck.labrute.fr/

--~--~-~--~~~---~--~~
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: CPU on client ?

2009-10-19 Thread Ohad Levy
cpu or memory?

you can run puppet with nice, but if it will restart services, they will be
niced too.
if its memory, you can swtich to cron.

cheers,
Ohad

On Mon, Oct 19, 2009 at 5:42 PM, Xavier Beaudouin wrote:

> Hello there,
>
> I am some complains from people there at my work that puppetd "takes too
> mutch CPU"...
>
> Is there some method to downcase the CPU usage when it is waked-up ?
>
> (this people make me crazy... )
>
> --
> Xavier Beaudouin - http://kazar.net/
> http://magicduck.labrute.fr/
>
> >
>

--~--~-~--~~~---~--~~
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] CPU on client ?

2009-10-19 Thread Xavier Beaudouin
Hello there,

I am some complains from people there at my work that puppetd "takes too
mutch CPU"...

Is there some method to downcase the CPU usage when it is waked-up ?

(this people make me crazy... )

--
Xavier Beaudouin - http://kazar.net/
http://magicduck.labrute.fr/

--~--~-~--~~~---~--~~
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: Best Practices Rewrite - First Draft

2009-10-19 Thread Julian Simpson

No objections here.  I seem to recall that there had a been a
discussion at PuppetCamp about perhaps moving to a pattens collection
instead of set of best practices - not sure if anyone has bandwidth to
to work on this but it might help to keep it in mind.

Dan North wrote an article on this.[1]

http://www.infoq.com/articles/better-best-practices

Ironically I have loads of best practices articles on my blog. D'oh.

J.

2009/10/18 Stephen Nelson-Smith :
>
> Hi,
>
>> If anyone feels up to grabbing this document and running with it,
>> please feel free.
>
> Not sure if I accidentally half replied to this already
>
> I'd be very happy to pick this up.  I'm just starting a new project -
> bring some best practices to a somewhat chaotic and messy large
> government Drupal infrastructure (and associated services) and am also
> doing some puppet training, so gathering together collected wisdom,
> adding my own experiences from 3 years of running puppet, and
> maintaining the document seems like an ideal fit.
>
> Is everyone ok with this?
>
> S.
> --
> Stephen Nelson-Smith
> Technical Director
> Atalanta Systems Ltd
> www.atalanta-systems.com
>
> >
>



-- 
Julian Simpson
Software Build and Deployment
http://www.build-doctor.com

--~--~-~--~~~---~--~~
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: Local disks and puppet ?

2009-10-19 Thread Xavier Beaudouin
Hello Neil,

This rocks :p Thanks :)

/Xavier

2009/10/16 Neil Prockter 

>
> Hello
>
> If you really want all disks 2000 then net-snmp's "includeAllDisks 2000"
> might do for you.
>
> Neil
> Xavier Beaudouin wrote:
> > Hello there,
> >
> > I would like to automatize my snmpd.conf with all local disks discovered
> > by puppet.
> >
> > For example, in my template : snmpd.erb I have :
> >
> > --//--
> > syslocation "<%= syslocation %>"
> > syscontact  "ITadmin mailto:itad...@cfm.fr>>"
> > rocommunity  cfmpublic
> >
> > sysservices 78
> >
> > # Monitoring des partition
> > disk / 2000
> > disk /opt 2000
> > --//--
> >
> > I'd like to add disk  2000 on every local disks. Before I
> > doing anything about that, I wanted to know if someone has already done
> > that before ?
> >
> > /Xavier
> >
> > --
> > Xavier Beaudouin - http://kazar.net/
> > http://magicduck.labrute.fr/
> >
> > >
>
>
> >
>


-- 
--
Xavier Beaudouin - http://kazar.net/
http://magicduck.labrute.fr/

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