[Puppet Users] Re: Strange messages on 0.25.4.

2010-02-22 Thread Nobuchika Tanaka
Hi.

> can you send a --debug --trace of your puppetd run? thanks.

I send a log with --debug --trace.
Do you have any idea?

#
# Starting puppetmasterd.
#
mise# puppetpuppetmasterd --debug --trace --no-daemonize
debug: Failed to load library 'selinux' for feature 'selinux'
debug: Failed to load library 'shadow' for feature 'libshadow'
debug: Puppet::Type::User::ProviderPw: file pw does not exist
debug: Puppet::Type::User::ProviderLdap: true value when expecting
false
debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/
dscl does not exist
debug: Failed to load library 'ldap' for feature 'ldap'
debug: /File[/var/puppet/reports]: Autorequiring File[/var/puppet]
debug: /File[/etc/puppet/ssl/crl.pem]: Autorequiring File[/etc/puppet/
ssl]
debug: /File[/var/puppet/bucket]: Autorequiring File[/var/puppet]
debug: /File[/var/puppet/run]: Autorequiring File[/var/puppet]
debug: /File[/var/puppet/state]: Autorequiring File[/var/puppet]
debug: /File[/etc/puppet/manifests/site.pp]: Autorequiring File[/etc/
puppet/manifests]
debug: /File[/etc/puppet/ssl/certs/ca.pem]: Autorequiring File[/etc/
puppet/ssl/certs]
debug: /File[/etc/puppet/puppet.conf]: Autorequiring File[/etc/puppet]
debug: /File[/var/puppet/rrd]: Autorequiring File[/var/puppet]
debug: /File[/etc/puppet/ssl/public_keys/mise.pem]: Autorequiring
File[/etc/puppet/ssl/public_keys]
debug: /File[/etc/puppet/ssl/certificate_requests]: Autorequiring
File[/etc/puppet/ssl]
debug: /File[/var/puppet/log]: Autorequiring File[/var/puppet]
debug: /File[/var/puppet/lib]: Autorequiring File[/var/puppet]
debug: /File[/etc/puppet/ssl/certs]: Autorequiring File[/etc/puppet/
ssl]
debug: /File[/var/puppet/run/puppetmasterd.pid]: Autorequiring File[/
var/puppet/run]
debug: /File[/etc/puppet/ssl/private_keys]: Autorequiring File[/etc/
puppet/ssl]
debug: /File[/etc/puppet/ssl/public_keys]: Autorequiring File[/etc/
puppet/ssl]
debug: /File[/etc/puppet/fileserver.conf]: Autorequiring File[/etc/
puppet]
debug: /File[/var/puppet/facts]: Autorequiring File[/var/puppet]
debug: /File[/etc/puppet/ssl/certs/mise.pem]: Autorequiring File[/etc/
puppet/ssl/certs]
debug: /File[/etc/puppet/ssl]: Autorequiring File[/etc/puppet]
debug: /File[/etc/puppet/ssl/private]: Autorequiring File[/etc/puppet/
ssl]
debug: /File[/var/puppet/yaml]: Autorequiring File[/var/puppet]
debug: /File[/var/puppet/log/masterhttp.log]: Autorequiring File[/var/
puppet/log]
debug: /File[/etc/puppet/manifests]: Autorequiring File[/etc/puppet]
debug: /File[/etc/puppet/ssl/private_keys/mise.pem]: Autorequiring
File[/etc/puppet/ssl/private_keys]
debug: Finishing transaction 75360510 with 0 changes
debug: /File[/etc/puppet/ssl/ca/serial]: Autorequiring File[/etc/
puppet/ssl/ca]
debug: /File[/etc/puppet/ssl/ca/signed]: Autorequiring File[/etc/
puppet/ssl/ca]
debug: /File[/etc/puppet/ssl/ca/private/ca.pass]: Autorequiring File[/
etc/puppet/ssl/ca/private]
debug: /File[/etc/puppet/ssl/ca/ca_key.pem]: Autorequiring File[/etc/
puppet/ssl/ca]
debug: /File[/etc/puppet/ssl/ca/private]: Autorequiring File[/etc/
puppet/ssl/ca]
debug: /File[/etc/puppet/ssl/ca/ca_crl.pem]: Autorequiring File[/etc/
puppet/ssl/ca]
debug: /File[/etc/puppet/ssl/ca/inventory.txt]: Autorequiring File[/
etc/puppet/ssl/ca]
debug: /File[/etc/puppet/ssl/ca/ca_pub.pem]: Autorequiring File[/etc/
puppet/ssl/ca]
debug: /File[/etc/puppet/ssl/ca/ca_crt.pem]: Autorequiring File[/etc/
puppet/ssl/ca]
debug: /File[/etc/puppet/ssl/ca/requests]: Autorequiring File[/etc/
puppet/ssl/ca]
debug: Finishing transaction 75095500 with 0 changes
debug: Using cached certificate for ca, good until Sat Feb 21 02:03:32
UTC 2015
debug: Using cached certificate for ca, good until Sat Feb 21 02:03:32
UTC 2015
debug: Using cached certificate for mise, good until Sat Feb 21
02:04:24 UTC 2015
notice: Starting Puppet server version 0.25.4
debug: Finishing transaction 75741800 with 0 changes
info: mount[dist]: allowing 10.71.184.0/22 access
info: mount[dist]: allowing 10.72.144.0/21 access
debug: No modules mount given; autocreating with default permissions
debug: No plugins mount given; autocreating with default permissions
debug: Creating interpreter
debug: Finishing transaction 75721150 with 0 changes
#
# 1.When puppetd(sol10tst1) connected puppetmasterd(mise) initially
and puppetmasterd showed messages below.
#
err: Could not resolve 10.72.150.56: undefined method `include?' for
nil:NilClass
err: Could not resolve 10.72.150.56: undefined method `include?' for
nil:NilClass
info: Could not find certificate for 'sol10tst1'
err: Could not resolve 10.72.150.56: undefined method `include?' for
nil:NilClass
info: Could not find certificate_request for 'sol10tst1'
err: Could not resolve 10.72.150.56: undefined method `include?' for
nil:NilClass
notice: sol10tst1 has a waiting certificate request
notice: Signed certificate request for sol10tst1
notice: Removing file Puppet::SSL::CertificateRequest sol10tst1 at '/
etc/puppet/ssl/ca/requests/sol10tst1.pem'
err: Could not resolve 10.72.150.56

Re: [Puppet Users] erb getting the default value of a define

2010-02-22 Thread Brady Catherman

I actually just figured out a big part of this. I have two definitions:

apache::virtualhost {
  "$title.local.twitter.com":
vhostname => "$title.local.twitter.com",
vhost_template => "twitter/staging.local.twitter.com.conf.erb";
}

apache::virtualhost {
  "$title.local.twitter.com-ssl":
vhostname => "$title.local.twitter.com",
ssl_enabled => true,
vhost_template => "twitter/staging.local.twitter.com.conf.erb";
}

  The defaults from the first definition are used in both file  
deliveries as though its only parsing the template once then is  
caching the results, even though variables are changing that make the  
template different. If I comment out the first block the second block  
works as expected. If I reverse them then the second block gets  
overwritten by the first, regardless of which comes first.


This seems like a bug to me. Is this a known thing or should I try to  
reproduce on a smaller scale?



On Feb 22, 2010, at 3:53 PM, Brady Catherman wrote:


I have a define that sets a bunch of default values:

 define virtualhost($vhostname, $vhost_template, ... , $ssl_enabled  
= false) {

   if $ssl_enabled == true {
 $extension = '-ssl'
   } else {
 $extension = ''
   }

   file {
 "/etc/httpd/sites-available/${vhostname}${extension}.conf":
   ensure => present,
   content => template($vhost_template),
   mode => 0644;


in the template I have a line:
# <%= ssl_enabled %>

and the specific definition is:
apache::virtualhost {
 "$title.local.twitter.com-ssl":
   vhostname => "$title.local.twitter.com",
   vhost_template => "twitter/staging.local.twitter.com.conf.erb",
   ssl_enabled => true;


the file is named with -ssl, but the contents of the file (produced  
with erb) produces a line:

# false

So the contents of the define() see ssl_enabled properly, but the  
erb doesn't. Is this known?


--
You received this message because you are subscribed to the Google  
Groups "Puppet Users" group.

To post to this group, send email to puppet-us...@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-us...@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] parsedfile provider documentation?

2010-02-22 Thread David Lutterkort
On Mon, 2010-02-22 at 10:45 +0100, Frederik Wagner wrote:
> MODULES_LOADED_ON_BOOT="module1 module2"
> 
> My goal ist to have a type, which can append a "module3" to this
> entry, or replace the whole list, etc. (to stay generic for different
> files in /etc/sysconfig).

If you can live with replacing the entire list, you can just use augeas:

augeas { "my_boot_modules":
changes => "set 
/files/etc/sysconfig/kernel/MODULES_LOADED_ON_BOOT '$mymodules'"
}

If you need to build the list up from something else, you might want to
wrap the above into a define that computes $mymodules from that
something.

There's also ways to make this just append a specific module, but that
would require some work on the Augeas side.

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-us...@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] erb getting the default value of a define

2010-02-22 Thread Brady Catherman

I have a define that sets a bunch of default values:

  define virtualhost($vhostname, $vhost_template, ... , $ssl_enabled  
= false) {

if $ssl_enabled == true {
  $extension = '-ssl'
} else {
  $extension = ''
}

file {
  "/etc/httpd/sites-available/${vhostname}${extension}.conf":
ensure => present,
content => template($vhost_template),
mode => 0644;


in the template I have a line:
# <%= ssl_enabled %>

and the specific definition is:
apache::virtualhost {
  "$title.local.twitter.com-ssl":
vhostname => "$title.local.twitter.com",
vhost_template => "twitter/staging.local.twitter.com.conf.erb",
ssl_enabled => true;


the file is named with -ssl, but the contents of the file (produced  
with erb) produces a line:

# false

So the contents of the define() see ssl_enabled properly, but the erb  
doesn't. Is this known?


--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To post to this group, send email to puppet-us...@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: Magazine article comparing CPU usage of Puppet vs. Cfengine

2010-02-22 Thread Patrick (kc7zzv)
On Feb 22, 1:17 pm, Toby Riddell  wrote:
> I received my copy of ;login (the Usenix magazine) today. There's an
> article* comparing CPU utilisation of Puppet and Cfengine. To
> abbreviate massively: Puppet requires much more CPU than Cfengine when
> both verifying and fixing configuration.

I had major CPU and RAM trouble back when I was using puppet to copy
big binary files.  I switched to deploying them using a custom apt
server, and most of my problems went away.  I've also had trouble with
clients that have a high latency to the server in 0.24.x, but I've
heard that's fixed in 0.25.x.
-Patrick Mohr

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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] Magazine article comparing CPU usage of Puppet vs. Cfengine

2010-02-22 Thread Lindsay Holmwood
On 22 February 2010 16:37, James Cammarata  wrote:
>
> On Mon, 22 Feb 2010 21:17:52 +, Toby Riddell 
> wrote:
>> I received my copy of ;login (the Usenix magazine) today. There's an
>> article* comparing CPU utilisation of Puppet and Cfengine. To
>> abbreviate massively: Puppet requires much more CPU than Cfengine when
>> both verifying and fixing configuration.
>>
>> I'm in the early days of implementing Puppet and this has given me
>> something to think about. Whilst I won't be verifying/fixing
>> configuration on our servers on a continual basis, it would be nice if
>> it could be done with low CPU overhead. I am not familiar with
>> Cfengine beyond the reading I did while choosing which configuration
>> management tool to use; I chose Puppet because it seemed more flexible
>> and I figured me and my team would be able to get more done in less
>> time once we'd learned how to use it.
>>
>> Can CPU overhead be reduced to something closer to Cfengine, or is it
>> inherent in the design/implementation of Puppet? Is there an upside in
>> terms of greater flexibility of Puppet?
>>
>> I'd welcome comments from those familiar with both Puppet and Cfengine.
>>
>> *Article is here:
>> http://www.usenix.org/publications/login/2010-02/pdfs/bjorgeengen.pdf.
>> Note that reading the magazine article requires a subscription, at
>> least until Feb 2011 (articles published more than 12 months ago are
>> openly available).
>
> I'm not really surprised by this, puppet is written in Ruby (an interpreted
> language) vs CFengine which is written in C.  I've used both, and I'd
> gladly trade a little CPU performance for the stability gains offered by
> puppet.  CFengine is notoriously buggy in implementation, something I can
> definitely attest to (like when spaces make a difference in
> unions/intersections when the documentation plainly says they should
> not...).
>

Comparing CPU utilisation is like benchmarking cars by seeing how well
they float.

CPU utilisation can be solved by throwing hardware at the problem.
Expressiveness and stability can't be solved through hardware.

Lindsay


-- 
w: http://holmwood.id.au/~lindsay/
t: @auxesis

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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] Magazine article comparing CPU usage of Puppet vs. Cfengine

2010-02-22 Thread Julian Simpson
>
> I'm not really surprised by this, puppet is written in Ruby (an interpreted
> language) vs CFengine which is written in C.  I've used both, and I'd
> gladly trade a little CPU performance for the stability gains offered by
> puppet.  CFengine is notoriously buggy in implementation, something I can
> definitely attest to (like when spaces make a difference in
> unions/intersections when the documentation plainly says they should
> not...).
>
> I've used CfEngine 2, and would gladly trade CPU utilisation for the more
expressive DSL.  Swapping the order of operations round in the
actionsequence  declaration got boring, too.  (not sure about version 3).

J.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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] Magazine article comparing CPU usage of Puppet vs. Cfengine

2010-02-22 Thread James Cammarata

On Mon, 22 Feb 2010 21:17:52 +, Toby Riddell 
wrote:
> I received my copy of ;login (the Usenix magazine) today. There's an
> article* comparing CPU utilisation of Puppet and Cfengine. To
> abbreviate massively: Puppet requires much more CPU than Cfengine when
> both verifying and fixing configuration.
> 
> I'm in the early days of implementing Puppet and this has given me
> something to think about. Whilst I won't be verifying/fixing
> configuration on our servers on a continual basis, it would be nice if
> it could be done with low CPU overhead. I am not familiar with
> Cfengine beyond the reading I did while choosing which configuration
> management tool to use; I chose Puppet because it seemed more flexible
> and I figured me and my team would be able to get more done in less
> time once we'd learned how to use it.
> 
> Can CPU overhead be reduced to something closer to Cfengine, or is it
> inherent in the design/implementation of Puppet? Is there an upside in
> terms of greater flexibility of Puppet?
> 
> I'd welcome comments from those familiar with both Puppet and Cfengine.
> 
> *Article is here:
> http://www.usenix.org/publications/login/2010-02/pdfs/bjorgeengen.pdf.
> Note that reading the magazine article requires a subscription, at
> least until Feb 2011 (articles published more than 12 months ago are
> openly available).

I'm not really surprised by this, puppet is written in Ruby (an interpreted
language) vs CFengine which is written in C.  I've used both, and I'd
gladly trade a little CPU performance for the stability gains offered by
puppet.  CFengine is notoriously buggy in implementation, something I can
definitely attest to (like when spaces make a difference in
unions/intersections when the documentation plainly says they should
not...).

I'd have to see the article to know for sure if the CPU utilization
difference is negligible, but having run puppet for several months now I
have not seen any performance impact myself.  Most systems have so may
extra cores nowadays that aren't doing anything (especially in our case,
running puppet during off-hours) it would have to peg multiple CPUs for an
extended period of time to make a noticeable impact.



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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] Magazine article comparing CPU usage of Puppet vs. Cfengine

2010-02-22 Thread Toby Riddell
I received my copy of ;login (the Usenix magazine) today. There's an
article* comparing CPU utilisation of Puppet and Cfengine. To
abbreviate massively: Puppet requires much more CPU than Cfengine when
both verifying and fixing configuration.

I'm in the early days of implementing Puppet and this has given me
something to think about. Whilst I won't be verifying/fixing
configuration on our servers on a continual basis, it would be nice if
it could be done with low CPU overhead. I am not familiar with
Cfengine beyond the reading I did while choosing which configuration
management tool to use; I chose Puppet because it seemed more flexible
and I figured me and my team would be able to get more done in less
time once we'd learned how to use it.

Can CPU overhead be reduced to something closer to Cfengine, or is it
inherent in the design/implementation of Puppet? Is there an upside in
terms of greater flexibility of Puppet?

I'd welcome comments from those familiar with both Puppet and Cfengine.

*Article is here:
http://www.usenix.org/publications/login/2010-02/pdfs/bjorgeengen.pdf.
Note that reading the magazine article requires a subscription, at
least until Feb 2011 (articles published more than 12 months ago are
openly available).

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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] Foreman isn't seeing my classes

2010-02-22 Thread Andrew Dickson
I've recently set up foreman with my existing puppet server, and I was
able to get all the host reporting working (I'm using storeconfigs),
and once I ran:

RAILS_ENV=production rake puppet:import:puppet_classes

My puppet classes showed up on the settings page, however, it doesn't
seem to be associating any hosts with the classes they have applied to
them.  when I click "hosts" under a puppetclass on the settings page,
it always returns nothing, and I get the same result when I try to use
the query interface.  The query interface seems to work fine for
querying by fact though  Have I missed a step somewhere to get
foreman to keep track of the classes that each host has?

thanks,
-drew

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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: Strange messages on 0.25.4.

2010-02-22 Thread Patrick (kc7zzv)
On Feb 22, 12:37 pm, deet  wrote:
> > Did you add the FQDN of the server, the server's name, or both to the
> > hosts file on the client?
>
>   Our hosts only have a "node" name as we don't have nis/ldap/dns for
> network name resolution.
>
>   In this case the puppet master's hostname is "dev-puppet" and I did
> not include that in the clients hostfile.  The entry I used is like
> this
>
> (clients hosts file)
> X.X.X.X     puppet
>
>   And on the puppetmaster server I used the following notation for the
> client's hosts entry.  The real name of the client in this example is
> "dev-sandbox" which is what I put in the puppetmasters hosts file.
>
> (puppetmaster hosts file)
> X.X.X.X     dev-sandbox
>
>   Once the cert exchange is complete I can remove that hosts entry for
> the client.
>
>   Does that help?
>

That's very helpful.  I've been pulling my hair out trying to figure
out what's wrong.  Our clients are behind a NATed VPN that the server
can't see through.  (Long story.  Don't ask.)  This should be enough
information to get a good bug report, and set up a temporary fix.
-Patrick

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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: Strange messages on 0.25.4.

2010-02-22 Thread deet


> Did you add the FQDN of the server, the server's name, or both to the
> hosts file on the client?

  Our hosts only have a "node" name as we don't have nis/ldap/dns for
network name resolution.

  In this case the puppet master's hostname is "dev-puppet" and I did
not include that in the clients hostfile.  The entry I used is like
this

(clients hosts file)
X.X.X.X puppet


  And on the puppetmaster server I used the following notation for the
client's hosts entry.  The real name of the client in this example is
"dev-sandbox" which is what I put in the puppetmasters hosts file.

(puppetmaster hosts file)
X.X.X.X dev-sandbox

  Once the cert exchange is complete I can remove that hosts entry for
the client.

  Does that help?


> Did you add puppet, puppet.domain, or both to the client's hosts file?
>
> Is the server's FQDN puppet or something else?
>
> I'm hoping that if I can figure out what works for you, I'll have a
> place to start.
> -Patrick

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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] Augeas pam.d argument checking

2010-02-22 Thread Joe McDonagh

David Lutterkort wrote:

On Sun, 2010-02-21 at 15:06 -0500, Joe McDonagh wrote:
  
I have not thought about using augeas because last time I tried to build 
it for our standard OS (Ubuntu 8.04) IIRC it needed a newer version of 
glibc.



I haven't seen that problem - but if you run into it again, I'd very
much appreciate any build logs you have (compiler output etc.)

I try very hard to make Augeas only rely on a very minimalistic C
library (it builds on AIX ;)

David


  
Since someone else said they built it on 8.04 I might have just gotten 
distracted by something else. And I didn't even get the day off I was 
counting on to get something done...


--
Joe McDonagh
AIM: YoosingYoonickz
IRC: joe-mac on freenode
L'ennui est contre-révolutionnaire

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To post to this group, send email to puppet-us...@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: Strange messages on 0.25.4.

2010-02-22 Thread Patrick (kc7zzv)
On Feb 22, 9:08 am, deet  wrote:
>  My work around was to populate the hosts file with a puppet entry and
> remove the "--server X.X.X.X" flags from my boot strap script.
> Additionally I had to ensure the client node has an entry in the
> masters hosts file.
>
>  I still assume this is something I've brought on myself with my lack
> of network name resolution.  I'm just hoping the info helps the OP.
>
>   Derek.


Other people are having this trouble too including me.  I just figured
that 0.25 was broken in ubuntu.  More information at
http://projects.reductivelabs.com/issues/3083.  I'm trying to figure
out the minimum DNS needed.

Did you add the FQDN of the server, the server's name, or both to the
hosts file on the client?

Did you add puppet, puppet.domain, or both to the client's hosts file?

Is the server's FQDN puppet or something else?

I'm hoping that if I can figure out what works for you, I'll have a
place to start.
-Patrick

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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] Augeas pam.d argument checking

2010-02-22 Thread David Lutterkort
On Sun, 2010-02-21 at 15:06 -0500, Joe McDonagh wrote:
> I have not thought about using augeas because last time I tried to build 
> it for our standard OS (Ubuntu 8.04) IIRC it needed a newer version of 
> glibc.

I haven't seen that problem - but if you run into it again, I'd very
much appreciate any build logs you have (compiler output etc.)

I try very hard to make Augeas only rely on a very minimalistic C
library (it builds on AIX ;)

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-us...@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] Proper Augeas usage

2010-02-22 Thread David Lutterkort
On Mon, 2010-02-22 at 01:16 -0800, Tim Stoop wrote:
> Hi all,
> 
> I'm trying to work with augeas to add pinnings to my /etc/apt/
> preferences file. But I'm not getting my head around it. If I do the
> simplest I can think of:
> 
>   augeas { "Apt/preferences pinnings for augeas-lenses.":
>   context => "/files/etc/apt/preferences",
>   changes => ["set 00/Explanation 'We need these from 
> backports.'",
>   "set 00/Package augeas-lenses",
>   "set 00/Pin release",
>   "set 00/Pin/a lenny-backports",
>   "set 00/Pin-Priority 999"],
>   }
> 
> it adds the definition to the bottom of the file each time. If I
> change the context into
> 
>   context => "match /files/etc/apt/preferences/*/Package augeas-
> lenses",

You want to restrict when to make those changes with the onlyif
paramater, something like

augeas { "...":
  context => ...
  changes => ...
  onlyif => "match *[ Pin = 'release' and Package = 'augeas-lenses'] 
size == 0"
}

> it only works if there's already an augeas-lenses definition
> available. In which "working" is a large word, because if the current
> Pin-Priority is 900, it doesn't set it to 999.

You'd need to add another augeas resource to cover that case, something
like

augeas { "...":
  context => "/files/etc/apt/preferences[Pin = 'release' and Package = 
'augeas-lenses']",
  changes => "set Pin-Priority 900", 
  onlyif => "match * size == 0"
}

>  If there's no augeas-
> lenses definition available, it *segfaults*:
> 
> /usr/lib/ruby/1.8/augeas.rb:48: [BUG] Segmentation fault
> ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
> 
> Aborted

When that happens, is libaugeas0 installed ?

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-us...@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] Augeas type: Removing an entry from /etc/hosts

2010-02-22 Thread David Lutterkort
On Mon, 2010-02-22 at 16:23 +, Paul Elliott wrote:
> I'm just starting to look at using Augeas with Puppet to manage some of
> our configuration files. I thought I would start with a simple task of
> removing an entry from the /etc/hosts file. I'm not finding it simple
> though!
> 
> We have a number of hosts with entries in the /etc/hosts file like this:
> 
> 127.0.1.1 hostname
>
> We would like to remove these lines. Now I know this can be done with a
> simple exec of sed but if possible I would like to use it as a good test
> exercise with Augeas. Now, it's pretty easy to do this with augtool, as
> follows:
> 
> r...@miscreant:/home/pre500# augtool
> augtool> match /files/etc/hosts/*/ipaddr 127.0.1.1
> /files/etc/hosts/4/ipaddr

You can do this by looking for the entries with a single path
expression:

augtool> match /files/etc/hosts/*[ipaddr = '127.0.1.1']

gives you all entries in /etc/hosts with that IP. To remove them, just
do 'rm' instead of 'match'. From your post, I wasn't sure if you had
multiple such entries in /etc/hosts. If you do, and you want to delete
all of them except the one that has 'host.example.com' as a canonical
name, you can say

augtool> rm /files/etc/hosts/*[ipaddr = '127.0.1.1'][canonical != 
'host.example.com]

or, to delete all but the first one:

augtool> rm /files/etc/hosts/*[ipaddr = '127.0.1.1'][position() > 1]

Some docs about this notation is on the Augeas Wiki[1]

David

[1] http://augeas.net/page/Path_expressions



-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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: Strange messages on 0.25.4.

2010-02-22 Thread deet
 I ran into a similar situation maybe this will help.

 I just starated rolling out new puppet and ruby packages on Solaris
10.
 Facter 1.5.7 (staying the same)
 ruby 1.8.6.? ->  1.8.7 p249
 puppet 0.25.1 -> 0.25.4

 My initial tests of upgrading an existing puppetmaster and a few
nodes went fine.  However when I add new nodes the cert exchange will
not occur unless the master has a hosts entry for the client and the
client has a hosts entry for the server (no network based name
resolution available).

 However once the cert exchange is complete the master no longer needs
the clients host entry.  I attributed the error messages/situation to
user error.

 My old puppet bootstrap script basically ran the following after an
OS install via jumpstart.

puppetd --server X.X.X.X --onetime --no-daemonize

 Then I would sign the cert and run the above command again.  With new
ruby and puppet i'm getting this error message.

err: Could not retrieve catalog from remote server: undefined method
`closed?' for nil:NilClass

 My work around was to populate the hosts file with a puppet entry and
remove the "--server X.X.X.X" flags from my boot strap script.
Additionally I had to ensure the client node has an entry in the
masters hosts file.

 I still assume this is something I've brought on myself with my lack
of network name resolution.  I'm just hoping the info helps the OP.

  Derek.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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: Augeas type: Removing an entry from /etc/hosts

2010-02-22 Thread John Lyman
> ... I know this can be done with a simple exec of sed but ...

Or with the "host" native type.  See 
http://docs.reductivelabs.com/references/stable/type.html#host

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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] Augeas type: Removing an entry from /etc/hosts

2010-02-22 Thread Paul Elliott
Hi all,

I'm just starting to look at using Augeas with Puppet to manage some of
our configuration files. I thought I would start with a simple task of
removing an entry from the /etc/hosts file. I'm not finding it simple
though!

We have a number of hosts with entries in the /etc/hosts file like this:

127.0.1.1   hostname

We would like to remove these lines. Now I know this can be done with a
simple exec of sed but if possible I would like to use it as a good test
exercise with Augeas. Now, it's pretty easy to do this with augtool, as
follows:

r...@miscreant:/home/pre500# augtool
augtool> match /files/etc/hosts/*/ipaddr 127.0.1.1
/files/etc/hosts/4/ipaddr
augtool> rm /files/etc/hosts/4
rm : /files/etc/hosts/4 3
augtool> save
Saved 1 file(s)

But I can't see how this would translate to work in Puppet as I need to
match the relevant path before I can issue the rm. Am I missing
something obvious here?

--
Paul Elliott, UNIX Systems Administrator
Computing Service, University of York

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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] Puppetmaster child processes hang

2010-02-22 Thread Scott Smith

On 2/22/10 7:41 AM, S H wrote:

Anything else make sense to check? After about a week I've got 19
processes running.



Are you using Passenger? If not, try it.

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To post to this group, send email to puppet-us...@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] Puppetmaster child processes hang

2010-02-22 Thread S H
On Tue, Feb 16, 2010 at 1:21 PM, S H  wrote:

>
>
> On Tue, Feb 16, 2010 at 1:13 PM, Scott Smith  wrote:
>
>> S H wrote:
>>
>>> After an unexpected and unreasonably long hiatus, I've finally returned
>>> to implementing Puppet in my environment.
>>>
>>> My puppetmaster: Puppet 0.25.4, Facter 1.5.7, Ruby 1.8.7, and FreeBSD
>>> 8.0.
>>>
>>> I've got five clients using the puppetmaster so far. After about 24
>>> hours, I've got three puppetmaster processes running. This number continues
>>> to grow over time. If stored configs are enabled, catalog requests
>>> eventually start failing because they've maxed out my allowed DB
>>> connections.
>>>
>>>
>> Are you using the mysql gem?
>>
>> -scott
>>
>
> No, I'm using postgresql. This also happens with stored configs disabled,
> though I don't know if it's still loading up ruby-pg.
>
> -SH
>

Anything else make sense to check? After about a week I've got 19 processes
running.

-SH

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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] Rebuilding machines from foreman

2010-02-22 Thread Ohad Levy
:)

Lets start with feature requests for anything in your wishlist
Ohad



On Mon, Feb 22, 2010 at 1:09 PM, LOhit  wrote:

> Ahhh!!! I thought those files would be generated automatically. One
> more item added to my foreman wishlist. :)
>
> Please let me know if I can contribute in any way.
>
>
> -LOhit
>
>
> On Mon, Feb 22, 2010 at 4:23 PM, Ohad Levy  wrote:
>
>> Hi,
>>
>> Thats correct, but you still need to generate the config file (e.g. as in
>> the examples) per OS.
>>
>> I guess that in the near future (some code already exist on some github
>> branch) that will auto copy the kernel / ramdisks and create the pxefiles
>> directly.
>>
>> cheers,
>> Ohad
>>
>>
>> On Mon, Feb 22, 2010 at 12:30 PM, LOhit  wrote:
>>
>>> Hi,
>>>
>>> Yes, I did. And this is what I understand,
>>>
>>> 1) Clicking the "Build" button creates a pxe config file in the directory
>>> specified in "settings.yaml"
>>>
>>> 2) After the machine is rebuilt, this file/link is removed.
>>>
>>> Please correct me if I am wrong.
>>>
>>> Best regards,
>>> -LOhit
>>>
>>>
>>> On Mon, Feb 22, 2010 at 2:54 PM, Ohad Levy  wrote:
>>>
 Hi,

 did you read
 http://theforeman.org/wiki/foreman/Unattended_installations#How-does-Foreman-manages-TFTP

 cheers,
 Ohad


 On Mon, Feb 22, 2010 at 11:02 AM, LOhit  wrote:

> Hi,
>
> I have hit one more dead end :(. After I click on the "Build" button, I
> get the message "Host xxx enabled for installation boot away". And I can 
> see
> a link created in "/tftpboot/linux-install/pxelinux.cfg" with the MAC
> address of the machine being rebuilt.
>
> However, the symlink points to a non-existent destination in the same
> directory. Example.
>
> *lrwxrwxrwx 1 puppet puppet 15 Feb 22 11:15 01-00-1b-78-32-44-90 ->
> RedHat-4-x86_64*
>
> Any help?
>
> Regards,
> -LOhit
>
>
> On Fri, Feb 19, 2010 at 5:26 PM, LOhit  wrote:
>
>> Hi Ohad, You are a genius..!!! I owe you a beer. :)
>>
>> My SSL directory is "/etc/puppet/ssl". I wasted one whole day trying
>> to figure it out.
>>
>> Thanks a bunch.
>>
>>
>> On Fri, Feb 19, 2010 at 4:03 PM, Ohad Levy wrote:
>>
>>> the real error message is generated here:
>>> http://theforeman.org/repositories/entry/foreman/vendor/plugins/proxy/lib/proxy.rb#L80
>>>
>>> which basically tests if the ca directory is available and puppetca
>>> can be found.
>>> I'm guessing one of these two are missing (or in a non standard
>>> location).
>>>
>>> cheers,
>>> Ohad
>>>
>>>
>>>
>>> On Fri, Feb 19, 2010 at 6:14 AM, LOhit  wrote:
>>>
 Hi,

 Actually, I have built custom RPMs of  Puppet & Facter tailored to
 meet the requirements of my environment. So, when I install these 
 RPMs, the
 binaries go into "/usr/sbin" including "puppetca"
 And Pupept & Foreman are started by root. Initially, I too thought
 that foreman was not able to find the "puppetca" binary, but then I 
 wasn't
 sure.

 I couldn't find much info anywhere, so thought of taking look at the
 code.

  *def setBuild
 host = Host.find params[:id]
 if host.setBuild != false (if I set this to true, I get the
 right message in the web UI but, obviously that doesn't solve the 
 problem)
   flash[:foreman_notice] = "Enabled #{host.name} for
 installation boot away"
 else
   flash[:foreman_error] = "Failed to enable #{host.name} for
 installation"
 end
 redirect_to :back
   end*


 So, the conditions are not being met to enable the host for
 installation.


 *PS: THIS IS A TEST SETUP, SO, I CAN TRY OUT DIFFERENT THINGS,
 PLEASE FEEL FREE TO SUGGEST FIXES. :)*

 Thanks,


 On Thu, Feb 18, 2010 at 11:37 PM, Ohad Levy wrote:

> hmm.. another option, do you use a non-standard directory for
> puppet binaries ?
>
> Ohad
>
>
> On Thu, Feb 18, 2010 at 4:21 PM, Ohad Levy wrote:
>
>> Hi,
>>
>> Foreman needs to be able to execute puppetca, see
>> http://theforeman.org/repositories/entry/foreman/extras/puppet/foreman/manifests/puppetca.pp
>>
>> cheers,
>> Ohad
>>
>> On Thu, Feb 18, 2010 at 9:21 AM, LOhit  wrote:
>>
>>> Hello,
>>>
>>> I ran into this problem today, I am trying to implement "One
>>> click installation", I followed foreman howtos and set up the 
>>> pre-requisites
>>> accordingly.
>>>
>>> However, when I click on "Build" button, I get the following
>>>

Re: [Puppet Users] Rebuilding machines from foreman

2010-02-22 Thread LOhit
Ahhh!!! I thought those files would be generated automatically. One more
item added to my foreman wishlist. :)

Please let me know if I can contribute in any way.


-LOhit

On Mon, Feb 22, 2010 at 4:23 PM, Ohad Levy  wrote:

> Hi,
>
> Thats correct, but you still need to generate the config file (e.g. as in
> the examples) per OS.
>
> I guess that in the near future (some code already exist on some github
> branch) that will auto copy the kernel / ramdisks and create the pxefiles
> directly.
>
> cheers,
> Ohad
>
>
> On Mon, Feb 22, 2010 at 12:30 PM, LOhit  wrote:
>
>> Hi,
>>
>> Yes, I did. And this is what I understand,
>>
>> 1) Clicking the "Build" button creates a pxe config file in the directory
>> specified in "settings.yaml"
>>
>> 2) After the machine is rebuilt, this file/link is removed.
>>
>> Please correct me if I am wrong.
>>
>> Best regards,
>> -LOhit
>>
>>
>> On Mon, Feb 22, 2010 at 2:54 PM, Ohad Levy  wrote:
>>
>>> Hi,
>>>
>>> did you read
>>> http://theforeman.org/wiki/foreman/Unattended_installations#How-does-Foreman-manages-TFTP
>>>
>>> cheers,
>>> Ohad
>>>
>>>
>>> On Mon, Feb 22, 2010 at 11:02 AM, LOhit  wrote:
>>>
 Hi,

 I have hit one more dead end :(. After I click on the "Build" button, I
 get the message "Host xxx enabled for installation boot away". And I can 
 see
 a link created in "/tftpboot/linux-install/pxelinux.cfg" with the MAC
 address of the machine being rebuilt.

 However, the symlink points to a non-existent destination in the same
 directory. Example.

 *lrwxrwxrwx 1 puppet puppet 15 Feb 22 11:15 01-00-1b-78-32-44-90 ->
 RedHat-4-x86_64*

 Any help?

 Regards,
 -LOhit


 On Fri, Feb 19, 2010 at 5:26 PM, LOhit  wrote:

> Hi Ohad, You are a genius..!!! I owe you a beer. :)
>
> My SSL directory is "/etc/puppet/ssl". I wasted one whole day trying to
> figure it out.
>
> Thanks a bunch.
>
>
> On Fri, Feb 19, 2010 at 4:03 PM, Ohad Levy  wrote:
>
>> the real error message is generated here:
>> http://theforeman.org/repositories/entry/foreman/vendor/plugins/proxy/lib/proxy.rb#L80
>>
>> which basically tests if the ca directory is available and puppetca
>> can be found.
>> I'm guessing one of these two are missing (or in a non standard
>> location).
>>
>> cheers,
>> Ohad
>>
>>
>>
>> On Fri, Feb 19, 2010 at 6:14 AM, LOhit  wrote:
>>
>>> Hi,
>>>
>>> Actually, I have built custom RPMs of  Puppet & Facter tailored to
>>> meet the requirements of my environment. So, when I install these RPMs, 
>>> the
>>> binaries go into "/usr/sbin" including "puppetca"
>>> And Pupept & Foreman are started by root. Initially, I too thought
>>> that foreman was not able to find the "puppetca" binary, but then I 
>>> wasn't
>>> sure.
>>>
>>> I couldn't find much info anywhere, so thought of taking look at the
>>> code.
>>>
>>>  *def setBuild
>>> host = Host.find params[:id]
>>> if host.setBuild != false (if I set this to true, I get the
>>> right message in the web UI but, obviously that doesn't solve the 
>>> problem)
>>>   flash[:foreman_notice] = "Enabled #{host.name} for
>>> installation boot away"
>>> else
>>>   flash[:foreman_error] = "Failed to enable #{host.name} for
>>> installation"
>>> end
>>> redirect_to :back
>>>   end*
>>>
>>>
>>> So, the conditions are not being met to enable the host for
>>> installation.
>>>
>>>
>>> *PS: THIS IS A TEST SETUP, SO, I CAN TRY OUT DIFFERENT THINGS,
>>> PLEASE FEEL FREE TO SUGGEST FIXES. :)*
>>>
>>> Thanks,
>>>
>>>
>>> On Thu, Feb 18, 2010 at 11:37 PM, Ohad Levy wrote:
>>>
 hmm.. another option, do you use a non-standard directory for puppet
 binaries ?

 Ohad


 On Thu, Feb 18, 2010 at 4:21 PM, Ohad Levy wrote:

> Hi,
>
> Foreman needs to be able to execute puppetca, see
> http://theforeman.org/repositories/entry/foreman/extras/puppet/foreman/manifests/puppetca.pp
>
> cheers,
> Ohad
>
> On Thu, Feb 18, 2010 at 9:21 AM, LOhit  wrote:
>
>> Hello,
>>
>> I ran into this problem today, I am trying to implement "One click
>> installation", I followed foreman howtos and set up the 
>> pre-requisites
>> accordingly.
>>
>> However, when I click on "Build" button, I get the following
>> errors in the foreman's console and another error in the web 
>> interface
>> indicating that the installation failed. Any ideas?
>>
>> *"PuppetCA: SSL/CA or puppetca unavailable on this machine"*
>>
>> *"Failed to enable hostname_here for installa

Re: [Puppet Users] Rebuilding machines from foreman

2010-02-22 Thread Ohad Levy
Hi,

Thats correct, but you still need to generate the config file (e.g. as in
the examples) per OS.

I guess that in the near future (some code already exist on some github
branch) that will auto copy the kernel / ramdisks and create the pxefiles
directly.

cheers,
Ohad

On Mon, Feb 22, 2010 at 12:30 PM, LOhit  wrote:

> Hi,
>
> Yes, I did. And this is what I understand,
>
> 1) Clicking the "Build" button creates a pxe config file in the directory
> specified in "settings.yaml"
>
> 2) After the machine is rebuilt, this file/link is removed.
>
> Please correct me if I am wrong.
>
> Best regards,
> -LOhit
>
>
> On Mon, Feb 22, 2010 at 2:54 PM, Ohad Levy  wrote:
>
>> Hi,
>>
>> did you read
>> http://theforeman.org/wiki/foreman/Unattended_installations#How-does-Foreman-manages-TFTP
>>
>> cheers,
>> Ohad
>>
>>
>> On Mon, Feb 22, 2010 at 11:02 AM, LOhit  wrote:
>>
>>> Hi,
>>>
>>> I have hit one more dead end :(. After I click on the "Build" button, I
>>> get the message "Host xxx enabled for installation boot away". And I can see
>>> a link created in "/tftpboot/linux-install/pxelinux.cfg" with the MAC
>>> address of the machine being rebuilt.
>>>
>>> However, the symlink points to a non-existent destination in the same
>>> directory. Example.
>>>
>>> *lrwxrwxrwx 1 puppet puppet 15 Feb 22 11:15 01-00-1b-78-32-44-90 ->
>>> RedHat-4-x86_64*
>>>
>>> Any help?
>>>
>>> Regards,
>>> -LOhit
>>>
>>>
>>> On Fri, Feb 19, 2010 at 5:26 PM, LOhit  wrote:
>>>
 Hi Ohad, You are a genius..!!! I owe you a beer. :)

 My SSL directory is "/etc/puppet/ssl". I wasted one whole day trying to
 figure it out.

 Thanks a bunch.


 On Fri, Feb 19, 2010 at 4:03 PM, Ohad Levy  wrote:

> the real error message is generated here:
> http://theforeman.org/repositories/entry/foreman/vendor/plugins/proxy/lib/proxy.rb#L80
>
> which basically tests if the ca directory is available and puppetca can
> be found.
> I'm guessing one of these two are missing (or in a non standard
> location).
>
> cheers,
> Ohad
>
>
>
> On Fri, Feb 19, 2010 at 6:14 AM, LOhit  wrote:
>
>> Hi,
>>
>> Actually, I have built custom RPMs of  Puppet & Facter tailored to
>> meet the requirements of my environment. So, when I install these RPMs, 
>> the
>> binaries go into "/usr/sbin" including "puppetca"
>> And Pupept & Foreman are started by root. Initially, I too thought
>> that foreman was not able to find the "puppetca" binary, but then I 
>> wasn't
>> sure.
>>
>> I couldn't find much info anywhere, so thought of taking look at the
>> code.
>>
>>  *def setBuild
>> host = Host.find params[:id]
>> if host.setBuild != false (if I set this to true, I get the right
>> message in the web UI but, obviously that doesn't solve the problem)
>>   flash[:foreman_notice] = "Enabled #{host.name} for installation
>> boot away"
>> else
>>   flash[:foreman_error] = "Failed to enable #{host.name} for
>> installation"
>> end
>> redirect_to :back
>>   end*
>>
>>
>> So, the conditions are not being met to enable the host for
>> installation.
>>
>>
>> *PS: THIS IS A TEST SETUP, SO, I CAN TRY OUT DIFFERENT THINGS, PLEASE
>> FEEL FREE TO SUGGEST FIXES. :)*
>>
>> Thanks,
>>
>>
>> On Thu, Feb 18, 2010 at 11:37 PM, Ohad Levy wrote:
>>
>>> hmm.. another option, do you use a non-standard directory for puppet
>>> binaries ?
>>>
>>> Ohad
>>>
>>>
>>> On Thu, Feb 18, 2010 at 4:21 PM, Ohad Levy wrote:
>>>
 Hi,

 Foreman needs to be able to execute puppetca, see
 http://theforeman.org/repositories/entry/foreman/extras/puppet/foreman/manifests/puppetca.pp

 cheers,
 Ohad

 On Thu, Feb 18, 2010 at 9:21 AM, LOhit  wrote:

> Hello,
>
> I ran into this problem today, I am trying to implement "One click
> installation", I followed foreman howtos and set up the pre-requisites
> accordingly.
>
> However, when I click on "Build" button, I get the following errors
> in the foreman's console and another error in the web interface 
> indicating
> that the installation failed. Any ideas?
>
> *"PuppetCA: SSL/CA or puppetca unavailable on this machine"*
>
> *"Failed to enable hostname_here for installation"*
>
> Thanks in advance.
>
> --
> LOhit
>
> --
> 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
>>

Re: [Puppet Users] Rebuilding machines from foreman

2010-02-22 Thread LOhit
Hi,

Yes, I did. And this is what I understand,

1) Clicking the "Build" button creates a pxe config file in the directory
specified in "settings.yaml"

2) After the machine is rebuilt, this file/link is removed.

Please correct me if I am wrong.

Best regards,
-LOhit

On Mon, Feb 22, 2010 at 2:54 PM, Ohad Levy  wrote:

> Hi,
>
> did you read
> http://theforeman.org/wiki/foreman/Unattended_installations#How-does-Foreman-manages-TFTP
>
> cheers,
> Ohad
>
>
> On Mon, Feb 22, 2010 at 11:02 AM, LOhit  wrote:
>
>> Hi,
>>
>> I have hit one more dead end :(. After I click on the "Build" button, I
>> get the message "Host xxx enabled for installation boot away". And I can see
>> a link created in "/tftpboot/linux-install/pxelinux.cfg" with the MAC
>> address of the machine being rebuilt.
>>
>> However, the symlink points to a non-existent destination in the same
>> directory. Example.
>>
>> *lrwxrwxrwx 1 puppet puppet 15 Feb 22 11:15 01-00-1b-78-32-44-90 ->
>> RedHat-4-x86_64*
>>
>> Any help?
>>
>> Regards,
>> -LOhit
>>
>>
>> On Fri, Feb 19, 2010 at 5:26 PM, LOhit  wrote:
>>
>>> Hi Ohad, You are a genius..!!! I owe you a beer. :)
>>>
>>> My SSL directory is "/etc/puppet/ssl". I wasted one whole day trying to
>>> figure it out.
>>>
>>> Thanks a bunch.
>>>
>>>
>>> On Fri, Feb 19, 2010 at 4:03 PM, Ohad Levy  wrote:
>>>
 the real error message is generated here:
 http://theforeman.org/repositories/entry/foreman/vendor/plugins/proxy/lib/proxy.rb#L80

 which basically tests if the ca directory is available and puppetca can
 be found.
 I'm guessing one of these two are missing (or in a non standard
 location).

 cheers,
 Ohad



 On Fri, Feb 19, 2010 at 6:14 AM, LOhit  wrote:

> Hi,
>
> Actually, I have built custom RPMs of  Puppet & Facter tailored to meet
> the requirements of my environment. So, when I install these RPMs, the
> binaries go into "/usr/sbin" including "puppetca"
> And Pupept & Foreman are started by root. Initially, I too thought that
> foreman was not able to find the "puppetca" binary, but then I wasn't 
> sure.
>
> I couldn't find much info anywhere, so thought of taking look at the
> code.
>
>  *def setBuild
> host = Host.find params[:id]
> if host.setBuild != false (if I set this to true, I get the right
> message in the web UI but, obviously that doesn't solve the problem)
>   flash[:foreman_notice] = "Enabled #{host.name} for installation
> boot away"
> else
>   flash[:foreman_error] = "Failed to enable #{host.name} for
> installation"
> end
> redirect_to :back
>   end*
>
>
> So, the conditions are not being met to enable the host for
> installation.
>
>
> *PS: THIS IS A TEST SETUP, SO, I CAN TRY OUT DIFFERENT THINGS, PLEASE
> FEEL FREE TO SUGGEST FIXES. :)*
>
> Thanks,
>
>
> On Thu, Feb 18, 2010 at 11:37 PM, Ohad Levy wrote:
>
>> hmm.. another option, do you use a non-standard directory for puppet
>> binaries ?
>>
>> Ohad
>>
>>
>> On Thu, Feb 18, 2010 at 4:21 PM, Ohad Levy wrote:
>>
>>> Hi,
>>>
>>> Foreman needs to be able to execute puppetca, see
>>> http://theforeman.org/repositories/entry/foreman/extras/puppet/foreman/manifests/puppetca.pp
>>>
>>> cheers,
>>> Ohad
>>>
>>> On Thu, Feb 18, 2010 at 9:21 AM, LOhit  wrote:
>>>
 Hello,

 I ran into this problem today, I am trying to implement "One click
 installation", I followed foreman howtos and set up the pre-requisites
 accordingly.

 However, when I click on "Build" button, I get the following errors
 in the foreman's console and another error in the web interface 
 indicating
 that the installation failed. Any ideas?

 *"PuppetCA: SSL/CA or puppetca unavailable on this machine"*

 *"Failed to enable hostname_here for installation"*

 Thanks in advance.

 --
 LOhit

 --
 You received this message because you are subscribed to the Google
 Groups "Puppet Users" group.
 To post to this group, send email to puppet-us...@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-us...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> puppet-users+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.goog

[Puppet Users] parsedfile provider documentation?

2010-02-22 Thread Frederik Wagner
Hi .*,

I'm looking for a more or less thorough documentation of the usage of
the parsedfile provider. I'm already scanning through all the existing
providers but some open questions remain.

In particular I want to write a provider editing the /etc/sysconf/
files, in particular I need to alter the MODULES_LOADED_ON_BOOT in the
/etc/sysconfig/kernel (on SLES). The entry looks like:

MODULES_LOADED_ON_BOOT="module1 module2"

My goal ist to have a type, which can append a "module3" to this
entry, or replace the whole list, etc. (to stay generic for different
files in /etc/sysconfig).

I already manage to get the file scanned etc. (using also post_parse,
process, to_line) and have the entry manipulated.
But for appending I would need to have the resource checked in a
custom way (like the 'retrive' method to scan if the module already
exists is already in the list). Furthermore I don't understand how to
access the parameters in the provider, which are given in the resource
definition.
This kind of question arise more and more while working on the
provider. Therefore a 'complete' documentation would be nice, or a
'complete' example using all the possible hooks.

Thanks a lot for some more hints,
Frederik

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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] Rebuilding machines from foreman

2010-02-22 Thread Ohad Levy
Hi,

did you read
http://theforeman.org/wiki/foreman/Unattended_installations#How-does-Foreman-manages-TFTP

cheers,
Ohad

On Mon, Feb 22, 2010 at 11:02 AM, LOhit  wrote:

> Hi,
>
> I have hit one more dead end :(. After I click on the "Build" button, I get
> the message "Host xxx enabled for installation boot away". And I can see a
> link created in "/tftpboot/linux-install/pxelinux.cfg" with the MAC address
> of the machine being rebuilt.
>
> However, the symlink points to a non-existent destination in the same
> directory. Example.
>
> *lrwxrwxrwx 1 puppet puppet 15 Feb 22 11:15 01-00-1b-78-32-44-90 ->
> RedHat-4-x86_64*
>
> Any help?
>
> Regards,
> -LOhit
>
>
> On Fri, Feb 19, 2010 at 5:26 PM, LOhit  wrote:
>
>> Hi Ohad, You are a genius..!!! I owe you a beer. :)
>>
>> My SSL directory is "/etc/puppet/ssl". I wasted one whole day trying to
>> figure it out.
>>
>> Thanks a bunch.
>>
>>
>> On Fri, Feb 19, 2010 at 4:03 PM, Ohad Levy  wrote:
>>
>>> the real error message is generated here:
>>> http://theforeman.org/repositories/entry/foreman/vendor/plugins/proxy/lib/proxy.rb#L80
>>>
>>> which basically tests if the ca directory is available and puppetca can
>>> be found.
>>> I'm guessing one of these two are missing (or in a non standard
>>> location).
>>>
>>> cheers,
>>> Ohad
>>>
>>>
>>>
>>> On Fri, Feb 19, 2010 at 6:14 AM, LOhit  wrote:
>>>
 Hi,

 Actually, I have built custom RPMs of  Puppet & Facter tailored to meet
 the requirements of my environment. So, when I install these RPMs, the
 binaries go into "/usr/sbin" including "puppetca"
 And Pupept & Foreman are started by root. Initially, I too thought that
 foreman was not able to find the "puppetca" binary, but then I wasn't sure.

 I couldn't find much info anywhere, so thought of taking look at the
 code.

  *def setBuild
 host = Host.find params[:id]
 if host.setBuild != false (if I set this to true, I get the right
 message in the web UI but, obviously that doesn't solve the problem)
   flash[:foreman_notice] = "Enabled #{host.name} for installation
 boot away"
 else
   flash[:foreman_error] = "Failed to enable #{host.name} for
 installation"
 end
 redirect_to :back
   end*


 So, the conditions are not being met to enable the host for
 installation.


 *PS: THIS IS A TEST SETUP, SO, I CAN TRY OUT DIFFERENT THINGS, PLEASE
 FEEL FREE TO SUGGEST FIXES. :)*

 Thanks,


 On Thu, Feb 18, 2010 at 11:37 PM, Ohad Levy  wrote:

> hmm.. another option, do you use a non-standard directory for puppet
> binaries ?
>
> Ohad
>
>
> On Thu, Feb 18, 2010 at 4:21 PM, Ohad Levy  wrote:
>
>> Hi,
>>
>> Foreman needs to be able to execute puppetca, see
>> http://theforeman.org/repositories/entry/foreman/extras/puppet/foreman/manifests/puppetca.pp
>>
>> cheers,
>> Ohad
>>
>> On Thu, Feb 18, 2010 at 9:21 AM, LOhit  wrote:
>>
>>> Hello,
>>>
>>> I ran into this problem today, I am trying to implement "One click
>>> installation", I followed foreman howtos and set up the pre-requisites
>>> accordingly.
>>>
>>> However, when I click on "Build" button, I get the following errors
>>> in the foreman's console and another error in the web interface 
>>> indicating
>>> that the installation failed. Any ideas?
>>>
>>> *"PuppetCA: SSL/CA or puppetca unavailable on this machine"*
>>>
>>> *"Failed to enable hostname_here for installation"*
>>>
>>> Thanks in advance.
>>>
>>> --
>>> LOhit
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Puppet Users" group.
>>> To post to this group, send email to puppet-us...@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-us...@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.
>



 --
 LOhit

 --
 You received this message because you are subscribed to the Google
 Groups "Puppet Users" group.
 To post to this group, send email to puppet-us...@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] Proper Augeas usage

2010-02-22 Thread Tim Stoop
Hi all,

I'm trying to work with augeas to add pinnings to my /etc/apt/
preferences file. But I'm not getting my head around it. If I do the
simplest I can think of:

augeas { "Apt/preferences pinnings for augeas-lenses.":
context => "/files/etc/apt/preferences",
changes => ["set 00/Explanation 'We need these from 
backports.'",
"set 00/Package augeas-lenses",
"set 00/Pin release",
"set 00/Pin/a lenny-backports",
"set 00/Pin-Priority 999"],
}

it adds the definition to the bottom of the file each time. If I
change the context into

context => "match /files/etc/apt/preferences/*/Package augeas-
lenses",

it only works if there's already an augeas-lenses definition
available. In which "working" is a large word, because if the current
Pin-Priority is 900, it doesn't set it to 999. If there's no augeas-
lenses definition available, it *segfaults*:

/usr/lib/ruby/1.8/augeas.rb:48: [BUG] Segmentation fault
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]

Aborted

So I'm at a bit of a loss. What am I doing wrong and how should I be
handling these kind of situations?

For reference, I'm using augeas stuff from lenny-backports:
augeas-lenses 0.7.0-1~bpo50+1
augeas-tools  0.7.0-1~bpo50+1
libaugeas-ruby1.8 0.3.0-1~bpo50+1
libaugeas00.7.0-1~bpo50+1

--
Kind regards,
Tim

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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] Rebuilding machines from foreman

2010-02-22 Thread LOhit
Hi,

I have hit one more dead end :(. After I click on the "Build" button, I get
the message "Host xxx enabled for installation boot away". And I can see a
link created in "/tftpboot/linux-install/pxelinux.cfg" with the MAC address
of the machine being rebuilt.

However, the symlink points to a non-existent destination in the same
directory. Example.

*lrwxrwxrwx 1 puppet puppet 15 Feb 22 11:15 01-00-1b-78-32-44-90 ->
RedHat-4-x86_64*

Any help?

Regards,
-LOhit

On Fri, Feb 19, 2010 at 5:26 PM, LOhit  wrote:

> Hi Ohad, You are a genius..!!! I owe you a beer. :)
>
> My SSL directory is "/etc/puppet/ssl". I wasted one whole day trying to
> figure it out.
>
> Thanks a bunch.
>
>
> On Fri, Feb 19, 2010 at 4:03 PM, Ohad Levy  wrote:
>
>> the real error message is generated here:
>> http://theforeman.org/repositories/entry/foreman/vendor/plugins/proxy/lib/proxy.rb#L80
>>
>> which basically tests if the ca directory is available and puppetca can be
>> found.
>> I'm guessing one of these two are missing (or in a non standard location).
>>
>> cheers,
>> Ohad
>>
>>
>>
>> On Fri, Feb 19, 2010 at 6:14 AM, LOhit  wrote:
>>
>>> Hi,
>>>
>>> Actually, I have built custom RPMs of  Puppet & Facter tailored to meet
>>> the requirements of my environment. So, when I install these RPMs, the
>>> binaries go into "/usr/sbin" including "puppetca"
>>> And Pupept & Foreman are started by root. Initially, I too thought that
>>> foreman was not able to find the "puppetca" binary, but then I wasn't sure.
>>>
>>> I couldn't find much info anywhere, so thought of taking look at the
>>> code.
>>>
>>>  *def setBuild
>>> host = Host.find params[:id]
>>> if host.setBuild != false (if I set this to true, I get the right
>>> message in the web UI but, obviously that doesn't solve the problem)
>>>   flash[:foreman_notice] = "Enabled #{host.name} for installation
>>> boot away"
>>> else
>>>   flash[:foreman_error] = "Failed to enable #{host.name} for
>>> installation"
>>> end
>>> redirect_to :back
>>>   end*
>>>
>>>
>>> So, the conditions are not being met to enable the host for installation.
>>>
>>>
>>> *PS: THIS IS A TEST SETUP, SO, I CAN TRY OUT DIFFERENT THINGS, PLEASE
>>> FEEL FREE TO SUGGEST FIXES. :)*
>>>
>>> Thanks,
>>>
>>>
>>> On Thu, Feb 18, 2010 at 11:37 PM, Ohad Levy  wrote:
>>>
 hmm.. another option, do you use a non-standard directory for puppet
 binaries ?

 Ohad


 On Thu, Feb 18, 2010 at 4:21 PM, Ohad Levy  wrote:

> Hi,
>
> Foreman needs to be able to execute puppetca, see
> http://theforeman.org/repositories/entry/foreman/extras/puppet/foreman/manifests/puppetca.pp
>
> cheers,
> Ohad
>
> On Thu, Feb 18, 2010 at 9:21 AM, LOhit  wrote:
>
>> Hello,
>>
>> I ran into this problem today, I am trying to implement "One click
>> installation", I followed foreman howtos and set up the pre-requisites
>> accordingly.
>>
>> However, when I click on "Build" button, I get the following errors in
>> the foreman's console and another error in the web interface indicating 
>> that
>> the installation failed. Any ideas?
>>
>> *"PuppetCA: SSL/CA or puppetca unavailable on this machine"*
>>
>> *"Failed to enable hostname_here for installation"*
>>
>> Thanks in advance.
>>
>> --
>> LOhit
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Puppet Users" group.
>> To post to this group, send email to puppet-us...@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-us...@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.

>>>
>>>
>>>
>>> --
>>> LOhit
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Puppet Users" group.
>>> To post to this group, send email to puppet-us...@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-us...@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-u