[Puppet Users] Re: erb templating support for case statements?

2010-06-22 Thread CraftyTech
Whoa dude... that's like a little crash course on ruby... not that I'm
complaining... :-))

You're right, that first "$" with the variable wasn't meant to be
there... and I was wondering the same thing regarding the usage of the
memorysize variable from facter.  Thanks a lot Bellman, I now have a
good starting point...

Cheers,



On Jun 22, 12:13 pm, Thomas Bellman  wrote:
> On 2010-06-21 21:37, CraftyTech wrote:
>
> > Thanks for the response.  Right now I have it:
>
> > max_allowed_packet=<% if $memorysize.to_i <= 4 %>8M<% elseif
> > memorysize.to_i = 4.1..8 %>16M<% elseif memorysize.to_i = 8.1..16
> > %>32M<% elseif memorysize.to_i > 16 %>32M<%end %>
>
> > but for some reason ignores everything, and it just show
> > "max_allowed_packet=" with no value afterwards...
>
> When I try that exact code in an ERB template, I get an error:
>
>     Failed to parse template /tmp/trh/smurf.erb: undefined method
>     `to_i=' for "1.93 GB":String at /tmp/trh/craftytech.pp:5 on
>     node kumiko.nsc.liu.se
>
> There are actually several errors in your code.  First of all, you
> have a dollar sign in front of the first 'memorysize'.  The dollar
> signs are only valid syntax in Puppet manifests, not in ERB templates
> (or other Ruby code, for that matter).
>
> Second, in Ruby, it's not 'elseif', but 'elsif'.
>
> Third, you are trying to assign to memorysize.to_i, by using the
> = operator.  Maybe you were thinking about using the equality
> comparison operator (==)?
>
> But even using the == operator would be wrong.  To check if a value
> lies inside a range, you must use the .include? method, like this:
>
>     (8.1 .. 16).include?(memorysize.to_i)
>
> So, if I change the template to this:
>
>     max_allowed_packet=<%
>         if memorysize.to_i <= 4 %>8M<%
>         elsif (4.1 .. 8).include?(memorysize.to_i) %>16M<%
>         elsif (8.1 .. 16).include?(memorysize.to_i) %>32M<%
>         elsif memorysize.to_i > 16 %>64M<%
>     end %>
>
> then it works.  But since you are using .to_i, you might not get
> quite what you expect slightly above each limit; if memorysize is
> for example 4.99 GB, then memorysize.to_i will be 4, and you will
> get "max_allowd_packet=8M" as result.  Your use of 4.1 and 8.1
> implies to me that you wanted to get "max_allowed_packet=16M" in
> that case.  Replacing .to_i with .to_f would fix that.
>
> Also, since we are writing it as a chain of if-elsif-elsif statements,
> this would be better, IMHO:
>
>     max_allowed_packet=<%
>         if memorysize.to_f <= 4 %>8M<%
>         elsif memorysize.to_f <= 8 %>16M<%
>         elsif memorysize.to_f <= 16 %>32M<%
>         else %>64M<%
>     end %>
>
> However, the memorysize fact is unfortunately in a not very nice format.
> It is a floating point number followed by a unit ("MB" or "GB" in most
> common cases today, but can also be "kB" or "TB", or nothing at all to
> signify bytes).  Presumably you expect the memorysize to be expressed in
> Gbytes, but if you run it on a machine with less than 1 Gbyte memory or
> more that 1024 Gbyte memory, you will not get what you expect.
>
> The correct way to handle this is to parse the unit and take that
> into account.  Here is how I would do this:
>
>     <% mem,unit = memorysize.split
>        mem = mem.to_f
>        # Normalize mem to Mebibyte
>        case unit
>            when nil:  mem /= (1<<20)
>            when 'kB': mem /= (1<<10)
>            when 'MB': mem *= (1<<0)
>            when 'GB': mem *= (1<<10)
>            when 'TB': mem *= (1<<20)
>         end
>     -%>
>     max_allowed_packet=<%
>         if mem <= 4096 %>8M<%
>         elsif mem <= 8192 %>16M<%
>         elsif mem <= 16384 %>32M<%
>         else %>64M<%
>     end %>
>
> /Bellman

-- 
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: is anyone using a tool to diagram their manifests?

2010-06-22 Thread windowsrefund
Hello Trevor,

Just wondering if you've had a chance to look at this again.

All the 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-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: erb templating support for case statements?

2010-06-22 Thread Thomas Bellman
On 2010-06-21 21:37, CraftyTech wrote:

> Thanks for the response.  Right now I have it:
> 
> max_allowed_packet=<% if $memorysize.to_i <= 4 %>8M<% elseif
> memorysize.to_i = 4.1..8 %>16M<% elseif memorysize.to_i = 8.1..16
> %>32M<% elseif memorysize.to_i > 16 %>32M<%end %>
> 
> but for some reason ignores everything, and it just show
> "max_allowed_packet=" with no value afterwards...

When I try that exact code in an ERB template, I get an error:

Failed to parse template /tmp/trh/smurf.erb: undefined method
`to_i=' for "1.93 GB":String at /tmp/trh/craftytech.pp:5 on
node kumiko.nsc.liu.se

There are actually several errors in your code.  First of all, you
have a dollar sign in front of the first 'memorysize'.  The dollar
signs are only valid syntax in Puppet manifests, not in ERB templates
(or other Ruby code, for that matter).

Second, in Ruby, it's not 'elseif', but 'elsif'.

Third, you are trying to assign to memorysize.to_i, by using the
= operator.  Maybe you were thinking about using the equality
comparison operator (==)?

But even using the == operator would be wrong.  To check if a value
lies inside a range, you must use the .include? method, like this:

(8.1 .. 16).include?(memorysize.to_i)

So, if I change the template to this:

max_allowed_packet=<%
if memorysize.to_i <= 4 %>8M<%
elsif (4.1 .. 8).include?(memorysize.to_i) %>16M<%
elsif (8.1 .. 16).include?(memorysize.to_i) %>32M<%
elsif memorysize.to_i > 16 %>64M<%
end %>

then it works.  But since you are using .to_i, you might not get
quite what you expect slightly above each limit; if memorysize is
for example 4.99 GB, then memorysize.to_i will be 4, and you will
get "max_allowd_packet=8M" as result.  Your use of 4.1 and 8.1
implies to me that you wanted to get "max_allowed_packet=16M" in
that case.  Replacing .to_i with .to_f would fix that.

Also, since we are writing it as a chain of if-elsif-elsif statements,
this would be better, IMHO:

max_allowed_packet=<%
if memorysize.to_f <= 4 %>8M<%
elsif memorysize.to_f <= 8 %>16M<%
elsif memorysize.to_f <= 16 %>32M<%
else %>64M<%
end %>

However, the memorysize fact is unfortunately in a not very nice format.
It is a floating point number followed by a unit ("MB" or "GB" in most
common cases today, but can also be "kB" or "TB", or nothing at all to
signify bytes).  Presumably you expect the memorysize to be expressed in
Gbytes, but if you run it on a machine with less than 1 Gbyte memory or
more that 1024 Gbyte memory, you will not get what you expect.

The correct way to handle this is to parse the unit and take that
into account.  Here is how I would do this:

<% mem,unit = memorysize.split
   mem = mem.to_f
   # Normalize mem to Mebibyte
   case unit
   when nil:  mem /= (1<<20)
   when 'kB': mem /= (1<<10)
   when 'MB': mem *= (1<<0)
   when 'GB': mem *= (1<<10)
   when 'TB': mem *= (1<<20)
end
-%>
max_allowed_packet=<%
if mem <= 4096 %>8M<%
elsif mem <= 8192 %>16M<%
elsif mem <= 16384 %>32M<%
else %>64M<%
end %>


/Bellman

-- 
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: erb templating support for case statements?

2010-06-22 Thread CraftyTech
It works now... The syntax was right all along.  I was testing it on a
VM which has less than a gig of mem, hence why it'd omit the logic,
since it didn't apply.  Sometimes the hurtles are a lot closer than
you expect them to be :-)



On Jun 22, 9:20 am, CraftyTech  wrote:
> Can anyone help out, and let me know why the line below omits
> everything after the "=" sign, and just puts out the
> "max_allowed_packet="?  It seems pretty straight forward, but for some
> reason it doesn't work.  Can anyone spot what I'm missing?
>
> Thanks,
>
> Henry
>
> On Jun 21, 3:37 pm, CraftyTech  wrote:
>
> > Thanks for the response.  Right now I have it:
>
> > max_allowed_packet=<% if $memorysize.to_i <= 4 %>8M<% elseif
> > memorysize.to_i = 4.1..8 %>16M<% elseif memorysize.to_i = 8.1..16
> > %>32M<% elseif memorysize.to_i > 16 %>32M<%end %>
>
> > but for some reason ignores everything, and it just show
> > "max_allowed_packet=" with no value afterwards...
>
> > On Jun 21, 11:41 am, Benoit Cattié  wrote:
>
> > > CraftyTech a écrit, le 21/06/2010 17:07:> Hello All,
>
> > > Hey,
> > > >       Can you guys point out to me, how do I do a case statement within
> > > > a template?  i.g: my.cnf
>
> > > > max_allowed_packet=<% case ($memorysize<=4) = 8M, case
> > > > ($memorysize<=8) = 16M)?
>
> > > I think case dont support "order" comparaison. You can do it with if / 
> > > else.
>
> > > Otherwise case statement is :
> > > max_allowed_packet=<% case memorysize when 4 %>8M<% when 8 %>16M<% end %>
>
> > > or
>
> > > max_allowed_packet=<% if memorysize.to_i <= 4 %>8M<% elsif
> > > memorysize.to_i <= 8 %>16M<% end %>> I've tried different combinations, 
> > > but so far no luck.  The syntax
> > > > checker coughs up hair balls
>
> > > > Thanks,
>
> > > > Henry
>
> > > Benoit

-- 
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] Refreshing puppetd from within puppetd

2010-06-22 Thread Patrick Mohr

On Jun 22, 2010, at 2:43 AM, David Schmitt wrote:

> On 6/22/2010 3:03 AM, Patrick Mohr wrote:
>> I push out changes to puppet.conf using puppet.  (I have gsh as a
>> backup for if I really screw things up, but I've never had to use it
>> yet.)  Is there any safe and/or good way to restart puppet after a
>> change is made o it's config?  I'm assuming that just defining puppet
>> as a service and subscribing to puppet.conf is bad because it will
>> stop puppet in the middle of a run which might make other subscribes
>> not work.
> 
> Puppetd does reload its configuration automatically when the config file 
> changes. Any settings that do not get reloaded should be considered bugs and 
> reported to the bug tracker.
> 

It seemed to me that adding report=true to [puppetd] using augeas didn't cause 
puppetd to start sending reports each run.  I'll check to see that's actually 
true later today.
-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] Re: Automated installation of Puppetmaster and Dashboard

2010-06-22 Thread Bryan Ross
> On Thu, Jun 17, 2010 at 4:23 PM, PBWebGuy  wrote:
>> I was just looking over your puppet-puppet recipe and I was curious on
>> how you are managing your different target environments.  I see that
>> you have defined different trees for each environment:
>> ...
>> So I am assuming that you must need to maintain 3 different trees of
>> code for all of your classes?  What I am trying to do is avoid that
>> but am concerned about edits of classes, etc that can trickle out to
>> production before they have been properly QA'd.  I haven't read much
>> on how best to do this and have been working on a completely different
>> approach.  I would be interested in how you are handling that.

My actual usage gets a bit more complicated, but as Nigel suggested, I
generally have a single repository of code and each environment
represents a different point in time "snapshot" of that codebase.  All
my changes are checked in to 'development'.  When I'm happy that the
dev codebase is fairly stable, I'll then copy/tag that codebase, which
can be checked out to the 'testing' environment.  If that codebase
performs as expected, then it gets checked out to production.  Im
currently using SVN, so this fairly trivial to do - just create a
'cheap copy' of the current repo and tag it with an appropriate name
(based on release version / date for me)

Hope that helps,

Cheers,
Bryan

-- 
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 and double quotes

2010-06-22 Thread Guus Houtzager
On Mon, Jun 21, 2010 at 11:40 PM, Patrick Mohr  wrote:

> First, quotes probably aren't needed unless the value has a space in it.
>  Second, single quotes should work fine.
>
> Anyway, here's an example that will work for something that has a space in
> it, and needs to be quoted:
>
>augeas { "auto start tftpd" :
>context => "/files/etc/default/tftpd-hpa",
>changes => 'set RUN_DAEMON \'"start now"\'',
>}
>
> Gives a line that looks like:
> RUN_DAEMON="start now"
>
> Here's why it works:
> http://osdir.com/ml/puppet-users/2009-10/msg00133.html


Bingo, problem solved, thanks :)
I had tried quite a lot of quote variations, but not this one.

Regards,

Guus

-- 
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: erb templating support for case statements?

2010-06-22 Thread CraftyTech
Can anyone help out, and let me know why the line below omits
everything after the "=" sign, and just puts out the
"max_allowed_packet="?  It seems pretty straight forward, but for some
reason it doesn't work.  Can anyone spot what I'm missing?

Thanks,

Henry

On Jun 21, 3:37 pm, CraftyTech  wrote:
> Thanks for the response.  Right now I have it:
>
> max_allowed_packet=<% if $memorysize.to_i <= 4 %>8M<% elseif
> memorysize.to_i = 4.1..8 %>16M<% elseif memorysize.to_i = 8.1..16
> %>32M<% elseif memorysize.to_i > 16 %>32M<%end %>
>
> but for some reason ignores everything, and it just show
> "max_allowed_packet=" with no value afterwards...
>
> On Jun 21, 11:41 am, Benoit Cattié  wrote:
>
> > CraftyTech a écrit, le 21/06/2010 17:07:> Hello All,
>
> > Hey,
> > >       Can you guys point out to me, how do I do a case statement within
> > > a template?  i.g: my.cnf
>
> > > max_allowed_packet=<% case ($memorysize<=4) = 8M, case
> > > ($memorysize<=8) = 16M)?
>
> > I think case dont support "order" comparaison. You can do it with if / else.
>
> > Otherwise case statement is :
> > max_allowed_packet=<% case memorysize when 4 %>8M<% when 8 %>16M<% end %>
>
> > or
>
> > max_allowed_packet=<% if memorysize.to_i <= 4 %>8M<% elsif
> > memorysize.to_i <= 8 %>16M<% end %>> I've tried different combinations, but 
> > so far no luck.  The syntax
> > > checker coughs up hair balls
>
> > > Thanks,
>
> > > Henry
>
> > Benoit

-- 
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] node inheritance for external nodes

2010-06-22 Thread Rob McBroom
On Jun 18, 2010, at 2:40 PM, Jon Choate wrote:

> Is it possible to express node inheritance when using external nodes.  If it 
> is could someone post what the yaml might look like?

I don’t know what you’re using to store external nodes, but if you’re using 
LDAP, each node has a parentNode attribute.

-- 
Rob McBroom


The magnitude of a problem does not affect its ownership.

-- 
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] Refreshing puppetd from within puppetd

2010-06-22 Thread Trevor Vaughan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Yes, I've never had a problem with this.

If you wanted to be sure to run it right away after the current run, I
would use an exec to fire off an 'at' job for  minutes in the future. Make sure to set
refreshonly => true on that exec.

Trevor

On 06/22/2010 05:43 AM, David Schmitt wrote:
> On 6/22/2010 3:03 AM, Patrick Mohr wrote:
>> I push out changes to puppet.conf using puppet.  (I have gsh as a
>> backup for if I really screw things up, but I've never had to use it
>> yet.)  Is there any safe and/or good way to restart puppet after a
>> change is made o it's config?  I'm assuming that just defining puppet
>> as a service and subscribing to puppet.conf is bad because it will
>> stop puppet in the middle of a run which might make other subscribes
>> not work.
> 
> Puppetd does reload its configuration automatically when the config file
> changes. Any settings that do not get reloaded should be considered bugs
> and reported to the bug tracker.
> 
> 
> Best Regards, David

- -- 
Trevor Vaughan
 Vice President, Onyx Point, Inc.
 email: tvaug...@onyxpoint.com
 phone: 410-541-ONYX (6699)
 pgp: 0x6C701E94

- -- This account not approved for unencrypted sensitive information --
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJMIJs5AAoJECNCGV1OLcyp3C8IAJrHgFxjnObmLs8BmZvYmnXZ
nHFlZtCxRxXLv3/VS2wXNjLvyIyE0Wu9uNsmnGPP0QXeIjaEXrR41tSfTNGIUqrg
rin2usvzNAtMPYJT6f+30JW5pLSleNOca4ht5nQKnK8ROUT4P0t+iKnAkoVUYACo
KjaLkVm/tu399T00j99LBoY2/amUyn3KEPBDXs5ZKiiNuwzNjMCtWor1jfyj8JFB
jNLeHI3hSYZalgPd4m7bEJugYS6NgZ4uwg/XsbOotPX/2F6wipGV8iX20TWoFfdb
Ue1r82IydJjka3dFmlBlLsnzLdBtC2vcEpFmI7KRND3tPo9M/ozubV8xzZUzEIQ=
=IBqx
-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-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] Refreshing puppetd from within puppetd

2010-06-22 Thread David Schmitt

On 6/22/2010 3:03 AM, Patrick Mohr wrote:

I push out changes to puppet.conf using puppet.  (I have gsh as a
backup for if I really screw things up, but I've never had to use it
yet.)  Is there any safe and/or good way to restart puppet after a
change is made o it's config?  I'm assuming that just defining puppet
as a service and subscribing to puppet.conf is bad because it will
stop puppet in the middle of a run which might make other subscribes
not work.


Puppetd does reload its configuration automatically when the config file 
changes. Any settings that do not get reloaded should be considered bugs 
and reported to the bug tracker.



Best Regards, David
--
dasz.at OG  Tel: +43 (0)664 2602670 Web: http://dasz.at
Klosterneuburg UID: ATU64260999

   FB-Nr.: FN 309285 g  FB-Gericht: LG Korneuburg

--
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] Storeconfigs connection pool problem

2010-06-22 Thread Jason Koppe
I didn't read anything over last weekend but I'm anxious to find out how to
fix this for my environment.

What is the OS of your puppetmaster?

I've got CentOS and there's another thread about CentOS5 leaking file
descriptors which seems to be related.

On Mon, Jun 21, 2010 at 10:30 AM, Christopher Johnston
wrote:

> Any findings?  From what I can tell it defaults to sqlite leaving me with
> an issue of my hosts bombing out when more then 6 runs are happening.  I
> would prefer to have it use mysql for a cache then let the queuing daemon
> fwd its data to a central mysql server.
>
>
>
> On Thu, Jun 10, 2010 at 1:39 PM, Jason Koppe  > wrote:
>
>> I'm not sure, I can't seem to find README.queuing or much documentation
>> about how it's supposed to work.  I'll checkout the code this weekend if
>> there aren't responses here.
>>
>>
>> On Thu, Jun 10, 2010 at 9:32 AM, Christopher Johnston > > wrote:
>>
>>> I have the same issue as well, seems puppetqd uses sqlite for
>>> caching?
>>>
>>>
>>> On Wed, Jun 9, 2010 at 4:11 PM, Jason Koppe <
>>> jason.robert.ko...@gmail.com> wrote:
>>>
 Queuing support from ActiveMQ doesn't even make a difference for me -- I
 thought the purpose of adding the queuing support was to queue the data in
 puppetqd's memory and let that flush out to the database when it could.  
 I'm
 still seeing this error from the puppetmaster (not puppetqd).

 err: could not obtain a database connection within 5 seconds.  The max
 pool size is currently 5; consider increasing it.

 Am I misunderstanding how puppetmasterd+puppetqd is supposed to
 function?


 On Wed, Jun 9, 2010 at 3:51 AM, Dan Carley wrote:

> On 9 June 2010 06:09, Jason Koppe wrote:
>
>>  On Fri, Feb 12, 2010 at 12:28 AM, Joe McDonagh <
>> joseph.e.mcdon...@gmail.com> wrote:
>>
>>> Daniel Kerwin wrote:
>>>
>>> > Hi list,
>>> >
>>> > i just enabled storeconfigs and cannot use puppetrun on more than 5
>>> > hosts. When i try 6+ i get the error message:
>>> >
>>> > puppetmasterd[16209]: could not obtain a database connection within
>>> 5
>>> > seconds.  The max pool size is currently 5; consider increasing it.
>>> >
>>> > My Mysql setup allows a lot more connections (500). Any
>>> suggestions?
>>>
>>> Do you have the proper rubygem for mysql installed? I think on
>>> deb/ubuntu it's something like libmysql-ruby1.8.
>>>
>>
>> I'm having the same problem with the mysql gem installed and the gem
>> appears to be in-use
>>
>
> The gem version is a bit of a red herring, so long are using the gem
> and not Ruby's own connector. As the warning suggests, ActiveRecord's pool
> option simply needs raising if it's to be put under any strain at all. 
> There
> is a bug/feature ticket as #2568 [0] which exposes this option to Puppet's
> configuration. But it's not due to be delivered until 2.6/rowlf.
>
> I've been slipstreaming the patch into 0.25 myself because storeconfigs
> grinds to a halt without it in my environment. Given the simplicity of the
> diff and that it seems to be affecting a number of people I think it
> probably warrants being brought forward to 0.25.
>
> [0] http://projects.puppetlabs.com/issues/2568
>
> --
> 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.
>



 --
 Jason Koppe
 jason.robert.ko...@gmail.com
 Cell (210) 445-8242

 --
 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.
>>>
>>
>>
>>
>> --
>> Jason Koppe
>> jason.robert.ko...@gmail.com
>> Cell (210) 445-8242
>>
>> --
>> 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+un

[Puppet Users] Re: Problem with dashboard using live report aggregation

2010-06-22 Thread christian
It seems to be working, Chad.
After I figured out, that you have to use one of the cities listed
with rake time:zones:local, now my time is shown correct, too.

But symlinking puppet_dashboard.rb to $libdir/reports doesn't really
work for me and still gives "warning: no report puppet-dashboard".
So I will stick to symlinking it to /usr/lib64/ruby/site_ruby/1.8/
puppet/reports. At least until your integration is complete.

Christian

On 22 Jun., 00:58, Chad Huneycutt  wrote:
> I was able to set config.time_zone in
> /config/environment.rb and that fixed the
> timezone.  Is that not what you are talking about?
>
> - Chad
>
>
>
> On Mon, Jun 21, 2010 at 6:10 PM, Rein Henrichs  wrote:
> > Hi folks,
> > Thanks for the dashboard questions. I'm glad people are using dashboard and
> > reporting these issues.
> > The dashboard installation instructions currently say to add the
> > puppet_dashboard.rb's directory to your Puppet libdir. This fails due
> > to http://projects.puppetlabs.com/issues/3094. This makes me sad as well so
> > I'm working on resolving that issue.
> > In the meantime, I'm updating the installation instructions with a work
> > around, which is: symlink dashboard's puppet_dashboard.rb into your $libdir,
> > typically to /var/lib/puppet/reports.
> > The ultimate solution is to add an http reports processor to puppet-core
> > that can be configured to point to dashboard (or any other http endpoint
> > that accepts reports). No more modifying libdir or creating symlinks. Just a
> > couple puppet settings and you're done. Yay. I've got code for this that is
> > working its way into Puppet as we speak.
> > Dashboard's (lack of) timezone support is an important issue. I don't have a
> > fix right now but I'm working on it. I'll let you guys know when that's
> > resolved.
> > Rein Henrichs
> >http://puppetlabs.com
>
> > On Mon, Jun 21, 2010 at 2:11 AM, christian  wrote:
>
> >> After I put puppet_dashboard.rb into site_ruby/1.8/puppet/reports as
> >> Don told now the aggregations seems to work just fine.
> >> But I guess it's supposed to work if you put that file in the correct
> >> directory in your puppet-homedir...so there still seems to be some
> >> unresolved problems.
>
> >> Btw, where does the dashboard get its time informaiton from? All our
> >> server run with CEST but the dashboard shows all times in WAT (CEST -2
> >> hours). The time in the report-files themselves is correct...
>
> >> christian
>
> >> On 20 Jun., 18:05, Don Jackson 
> >> wrote:
> >> > I am having all the problems that the following two threads reported.
>
> >> > Like tomholl reported, I was finally able to get reporting to work by
> >> > copying the puppet_dashboard.rb file into the directory
> >> > site_ruby/1.8/puppet/reports
>
> >> > And when I had previously attempted to specify libdir to be a colon
> >> > separated path, puppetmasterd died/crashed.
>
> >> > I am running puppet version 25.5 on OpenBSD (4.6) (Yes, I built new
> >> > packages from the tip of OpenBSD port tree), and dashboard 1.0.0
>
> >> > I would definitely appreciate any advice as to what I am doing wrong….
>
> >> > Don
>
> >> > On Dec 17, 2009, at 10:04 AM, tomholl wrote:
>
> >> > >  am still having some trouble getting this to work as per the
> >> > > README.markdown instructions.
>
> >> > > I was able to get it working by copying the puppet_dashboard.rb into /
> >> > > usr/lib/ruby/site_ruby/1.8/puppet/reports
>
> >> > > Setting the $libdir in puppet.conf seemed to work but I still kept
> >> > > getting "No report named 'puppet_dashboard' " errors after each
> >> > > successful catalog compile.
>
> >> > > The reason I think the $libdir was getting set is that the output of
> >> > > 'puppetd --configprint libdir' and 'puppetmasterd --configprint
> >> > > libdir' is /opt/puppetdashboard/lib/puppet (where I put my test
> >> > > install)
>
> >> > > Since I kept getting errors about not finding the report I ran
> >> > > 'puppetmasterd --configprint reports'  and got an output of store.
> >> > > Once I found where the store file was and copied the
> >> > > puppet_dashboard.rb file into that location (/usr/lib/ruby/site_ruby/
> >> > > 1.8/puppet/reports) everything worked.
>
> >> > > So what am I missing? Why did I have to copy the report file over to /
> >> > > usr/lib/ruby/site_ruby/1.8/puppet/reports if my $libdir was set
> >> > > properly?
>
> >> > On Jun 16, 2010, at 5:02 AM, Jon Choate wrote:
>
> >> > > I am seeing similar issues.  In my puppet.conf I set
>
> >> > > reports = store, puppet_dashboard
> >> > > and libpath = /var/puppet/lib:$RAILS_ROOT/lib/puppet
>
> >> > > (RAILS_ROOT being /opt/puppet-dashboard where I installed puppet
> >> > > dashboard)
> >> > > Using a combined path like this does not seem to work for libpath. It
> >> > > views the entire string as one path.  Is this by design?
>
> >> > > I then set libpath to just $RAILS_ROOT/lib/puppet
>
> >> > > With these settings I still get the message that it can't find the
> >> > > report named

[Puppet Users] Re: Refreshing puppetd from within puppetd

2010-06-22 Thread christian
Well depending on complexity of your manifests, you could define a
service for puppet and require certain classes to be executed before
the puppet service is checked in order to avoid that problem.
At least for me it works, but I have to admit that this solution isn't
very pretty.

Example:
service { puppet:
   require => [ class["class1"], class["class2"] ]
}

christian

On 22 Jun., 03:03, Patrick Mohr  wrote:
> I push out changes to puppet.conf using puppet.  (I have gsh as a backup for 
> if I really screw things up, but I've never had to use it yet.)  Is there any 
> safe and/or good way to restart puppet after a change is made o it's config?  
> I'm assuming that just defining puppet as a service and subscribing to 
> puppet.conf is bad because it will stop puppet in the middle of a run which 
> might make other subscribes not work.
>
> Anyone have advice?  I don't want to put puppet in cron if I can avoid it.
> -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.