[Puppet Users] Re: Does "scripts" mean "manifests"?

2008-10-02 Thread James Turnbull

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

dd-b wrote:
> The help in puppet (the puppet executable, I mean, not necessarily the
> entire package) says things like "Runs a stand-alone +puppet+
> script".   I'm guessing that's just obsolete terminology, and it means
> "manifests"; and the example shows it being applied to a .pp file.

Correct - I've updated the documentation - it'll be in 0.24.6.

> Can I use say "puppet site.pp" to manually apply the referenced
> configuration?  And is there a "dry-run" option of some sort?

Correct again - for dry-run have a look at the --noop and --parse-only
options (http://reductivelabs.com/trac/puppet/wiki/ConfigurationReference)


> In general, I'm looking for how to test at least the syntax of what
> I'm writing in simple local ways; short of setting up a separate test
> server (I note the clever stuff to get it to use the same certificates
> in the example on the wiki).  The separate test server seems to
> require me to modify the configuration files on each transition to and
> from test mode, which seems like a big drawback.

Also see:

http://reductivelabs.com/trac/puppet/wiki/FrequentlyAskedQuestions#how-do-i-run-manifests
http://reductivelabs.com/trac/puppet/wiki/SubversionCommitHooks
http://reductivelabs.com/trac/puppet/wiki/VersionControlPuppet

Regards

James Turnbull

- --
Author of:
* Pulling Strings with Puppet
(http://www.amazon.com/gp/product/1590599780/)
* Pro Nagios 2.0
(http://www.amazon.com/gp/product/1590596099/)
* Hardening Linux
(http://www.amazon.com/gp/product/159059/)

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI5aiE9hTGvAxC30ARApy2AKDQSfFBsFf3zxPdUQsaryyMbgzTFACfTB+6
KYb3pUV8V5JSBhDG2FPQ0cg=
=+OY5
-END PGP SIGNATURE-

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Custom facts driving me insane

2008-10-02 Thread Mike Renfro

qbert980 wrote:
> I'm probably not understanding how facts work, but I'm hoping that
> somehow if a fact gets loaded by the puppetmaster, it could be used as
> a variable by all puppet clients, but this is turning out not to be
> the case.

Facts are evaluated on each client, including the puppetmaster, when it 
checks in. What are you trying to accomplish specifically? Knowing that 
may help find an alternative route for configuring your clients correctly.

-- 
Mike Renfro  / R&D Engineer, Center for Manufacturing Research,
931 372-3601 / Tennessee Technological University -- [EMAIL PROTECTED]

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Custom facts driving me insane

2008-10-02 Thread qbert980

I'm probably not understanding how facts work, but I'm hoping that
somehow if a fact gets loaded by the puppetmaster, it could be used as
a variable by all puppet clients, but this is turning out not to be
the case.

On my puppetmaster, I've got a ruby script that parses a simple text
file located on the puppetmaster to load . However when
I run puppet on the client it wants to download the ruby file that
parses the fact rather than the fact itself, so puppet errors out
saying that the template cannot be parsed since it cannot find
.

Currently my facts are separate from my modules, and I've got the
correct settings in my fileserver.conf file (I think), as the
puppetmaster parses the fact just fine, so  I don't think the facts
being separate from the module is the problem, as I've tried it with
the fact embedded in the module as well.

Is there some simple "fact" that I'm overlooking. To paraphrase Joe
Friday, I want just the facts man. . . just the facts.

--qbert




--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Ruby Openssl failure on Solaris 9

2008-10-02 Thread Luke Kanies

On Oct 1, 2008, at 3:09 PM, Silflay Hraka wrote:

> Anyone seen this error before when trying to start a blastwave- 
> installed puppet on a Solaris 9 server?
>
>  # puppetd --server ppserv.net.unc.edu --waitforcert 60 --test
> /opt/csw/lib/ruby/site_ruby/1.8/puppet/sslcertificates.rb:8: You  
> must have the Ruby openssl library installed (Puppet::Error)
> from /opt/csw/lib/ruby/site_ruby/1.8/puppet/network/xmlrpc/ 
> client.rb:1:in `require'
> from /opt/csw/lib/ruby/site_ruby/1.8/puppet/network/xmlrpc/ 
> client.rb:1
> from /opt/csw/lib/ruby/site_ruby/1.8/puppet/network/ 
> client.rb:5:in `require'
> from /opt/csw/lib/ruby/site_ruby/1.8/puppet/network/ 
> client.rb:5
> from /opt/csw/lib/ruby/site_ruby/1.8/puppet/type/ 
> pfilebucket.rb:2:in `require'
> from /opt/csw/lib/ruby/site_ruby/1.8/puppet/type/ 
> pfilebucket.rb:2
> from /opt/csw/lib/ruby/site_ruby/1.8/puppet/type.rb:392:in  
> `require'
> from /opt/csw/lib/ruby/site_ruby/1.8/puppet/type.rb:392
> from /opt/csw/lib/ruby/site_ruby/1.8/puppet.rb:423:in  
> `require'
> from /opt/csw/lib/ruby/site_ruby/1.8/puppet.rb:423
> from /opt/csw/bin/puppetd:158:in `require'
> from /opt/csw/bin/puppetd:158
>
> Ruby is installed;
>
> # pkg-get upgrade ruby
> WARNING: gpg not found
> No worries... you already have version 1.8.6,REV=2007.10.03_p110 of  
> ruby
> If you doubt this message, run 'pkg-get -U', then run
>  'pkg-get upgrade ruby'


But not ruby's openssl library:

ruby -ropenssl -e 'puts :yep'

-- 
I believe that if it were left to artists to choose their own labels,
most would choose none. -- Ben Shahn
-
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: How dangerous is...

2008-10-02 Thread Russ Allbery

dd-b <[EMAIL PROTECTED]> writes:

> package { "something": ensure => latest }  ?
>
> Do people mostly use it, mostly not use it, is it highly in dispute,
> or is there consensus?

We don't use it because we don't tightly control when things go into our
repository and sometimes upload things we don't want to deploy yet.  We
also like to stage and carefully control when packages are upgraded.

It's not an unreasonable thing to do for test/dev environments, but I'd be
nervous about using it in production.  I like to know when packages are
being upgraded and to watch.  Puppet can't prompt an administrator, so if
something goes wrong with the package installation, things can be left in
a half-installed state.

-- 
Russ Allbery ([EMAIL PROTECTED]) 

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: error when using rrdtool with puppet

2008-10-02 Thread pavel

This has info but nor sure what to make of it:
http://thr3ads.net/puppet-users/2007/03/189581-rrdgraphs

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: How dangerous is...

2008-10-02 Thread Andrew Shafer
I think the only time that makes sense is if you control the package repos,
then you can make some relatively safe assumptions and update the repo as
part of the change control process.

On Thu, Oct 2, 2008 at 1:34 PM, Jeroen van Meeuwen <[EMAIL PROTECTED]>wrote:

>
> dd-b wrote:
> > package { "something": ensure => latest }  ?
> >
> > Do people mostly use it, mostly not use it, is it highly in dispute,
> > or is there consensus?
> >
>
> It's there when you need it, but it may have unsuspected results if you
> do not have control over what updates to the package are available to
> the system.
>
> -Jeroen
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Does "scripts" mean "manifests"?

2008-10-02 Thread dd-b

The help in puppet (the puppet executable, I mean, not necessarily the
entire package) says things like "Runs a stand-alone +puppet+
script".   I'm guessing that's just obsolete terminology, and it means
"manifests"; and the example shows it being applied to a .pp file.

Can I use say "puppet site.pp" to manually apply the referenced
configuration?  And is there a "dry-run" option of some sort?

In general, I'm looking for how to test at least the syntax of what
I'm writing in simple local ways; short of setting up a separate test
server (I note the clever stuff to get it to use the same certificates
in the example on the wiki).  The separate test server seems to
require me to modify the configuration files on each transition to and
from test mode, which seems like a big drawback.

(This is in version 0.24.4)
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Newbie Question.

2008-10-02 Thread James Turnbull

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Edward wrote:
> Heh, well I guess that is why I could find it. :)
> 

http://reductivelabs.com/trac/puppet/wiki/DocumentationStart

Plus there is:

http://reductivelabs.com/trac/puppet/wiki/GettingStarted
http://reductivelabs.com/trac/puppet/wiki/GettingHelp

Regards

James Turnbull

- --
Author of:
* Pulling Strings with Puppet
(http://www.amazon.com/gp/product/1590599780/)
* Pro Nagios 2.0
(http://www.amazon.com/gp/product/1590596099/)
* Hardening Linux
(http://www.amazon.com/gp/product/159059/)

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI5UBF9hTGvAxC30ARApLmAJsE9rReK+2PBpPRRywMMtbwZIBuGACggpC0
ZF2/fNQNJoKanheXoeggCpk=
=30Rb
-END PGP SIGNATURE-

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Puppet for password management

2008-10-02 Thread Marti

I've done that on openbsd systems with something like this:

exec { "setpass $name":
  onlyif => "grep '^$name:\*' /etc/master.passwd",
  command => "usermod -p '$pwstring' $name",
  require => User[$name],
}

Note that the onlyif on this command is intended to set the password
only on accounts that have none, so you'll have to modify it to fit
your needs. $pwstring is a pre-hashed password, for obvious reasons.

HTH,
Marti

On Oct 2, 10:01 am, "Geoff Newell" <[EMAIL PROTECTED]> wrote:
> I'm working on a turnkey Linux system where the post build config is handled
> with puppet.
> One of the unique constraints with a turnkey system is that passwords are
> essentially set at build time and then stay fixed for the life of the
> product.
> I was wondering if anyone had used puppet to manage user passwords?
> The 'user' type supports an encrypted hash, but ideally I need the facility
> of passing in a plaintext password, md5 hash it and then have puppet
> idempotently check it's been set.
>
> Thoughts?
>
> Geoff.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Newbie Question.

2008-10-02 Thread Edward

Heh, well I guess that is why I could find it. :)

Thanks that is a great start!

On Oct 2, 1:22 pm, "Paul Lathrop" <[EMAIL PROTECTED]> wrote:
> First of all, File and it's ilk are not "functions", they are "types"
> or even better "resource types". Second, the reference you are looking
> for is:
>
> http://reductivelabs.com/trac/puppet/wiki/TypeReference
>
> Hope that helps!
>
> --Paul
>
> On Thu, Oct 2, 2008 at 8:38 AM, Edward <[EMAIL PROTECTED]> wrote:
>
> > Ok, I have gotten Puppet up and running. I am about to start testing
> > out some more of the functions but there does not appear to be any
> > place that describes all the options to a function.
>
> > For example File:   I have seen examples with
> > file { /etc/passwd: mode->777, ensure->file, owner->nobody, group-
> >>nobody, source->puppet://xyz.com/linux-distro, target->"/dev/null"}
>
> > but I can not find any documentation on what are all the possible
> > setting for like ensure.
>
> > Now I am only using file as an example, as I am starting to look at
> > the commonly used modules "Common, and virtual" and I don't seem to
> > find any docs that would help me get started like
>
> > Apache Virtual Host:
> > Function: apache
> > Arguments
> > url: [describe argument for url and possible settings]
> > port:
> > Allow:
> > ...
> > ...
> > ...
>
> > Is there anything like this or do I have to pick though the code of
> > ever options I want to use.
>
> > Thanks
>
> > Ed

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Idempotent file editing

2008-10-02 Thread Brian Mathis

On Thu, Oct 2, 2008 at 5:02 PM, dd-b <[EMAIL PROTECTED]> wrote:
> That article is quite a good description of one position, definitely.
> I believe in all the problems he describes happening; I've seen them
> or things closely related, in various contexts.
>
> Storing a whole file and pulling it down is the obvious alternative,
> and I've done that, but I have misgivings about that approach, too.
> When I'm doing too much of that, I feel kind of the same way he seems
> to when he sees file editing going on in config scripts.
>
> If (to go back to my original example) I keep my own copy of
> sendmail.cm, and copy it onto each managed server, I'm creating a
> Frankenstein -- all but one config file and all the executables from
> the package, this one config file from my archive.  And with the
> package being kept current by "yum update" on a regular basis, I don't
> know whether my file is going to work with the rest of the package or
> not. If I'm editing the file instead of replacing it, there's still a
> possibility that it breaks, and there are more interesting ways for it
> to break (as mentioned in the cited article), but *most* of the time
> even if the file changes somewhat in the package, my edit will apply
> (this edit replaces one line) and the file will work.  By making a
> private copy, I've locked down a bunch of stuff that the package
> maintainer *thinks* they are maintaining; not just the part I'm
> actually altering.
>
> I don't have the time in my budget to really carefully consider and
> try out each possible package change before allowing it onto my
> servers.  That's why we use an enterprise linux distribution, is to
> have automatic updates that cover security holes and still work with
> each other.  (Small site -- currently an entire *6* physical linux
> servers on the premises.)  And most of my time is budgeted as a
> developer.
>
> (The "editfiles" is a cfengine thing, right, not a puppet thing?)
>

Another reason that people use Enterprise Linux distributions is
because they don't do silly things like overwrite config files that
you've already edited every time you update the package.  No one would
stand for that.  Also, they don't change the packages around so you
suddenly have a totally new package version with a completely new
config file scheme.

At some point you have to have config files that tells the system how
to act, and you have to change them.  Any file that you didn't create
completely by yourself at some point came out of the package system
somewhere.  You would just have to edit them and the package system
would have to know how to handle it.

Based on all the evidence and discussions about it, I think you should
forget about editing files and instead keep copies as recommended.
There are so many people doing it successfully, the market has spoken.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Idempotent file editing

2008-10-02 Thread dd-b



On Oct 2, 2:55 pm, Mike Renfro <[EMAIL PROTECTED]> wrote:

> http://www.cfwiki.org/cfwiki/index.php/Editfiles_Considered_Harmfulmay
> be a good starting point for one point of view (i.e., that editing
> config files on the client systems can be a problem for auditing and
> other things). The alternative would be to have one or more sendmail.mc
> files on the puppetmaster, edit them manually, and let puppet pull down
> the new mc file, and then automatically run make afterwards.

That article is quite a good description of one position, definitely.
I believe in all the problems he describes happening; I've seen them
or things closely related, in various contexts.

Storing a whole file and pulling it down is the obvious alternative,
and I've done that, but I have misgivings about that approach, too.
When I'm doing too much of that, I feel kind of the same way he seems
to when he sees file editing going on in config scripts.

If (to go back to my original example) I keep my own copy of
sendmail.cm, and copy it onto each managed server, I'm creating a
Frankenstein -- all but one config file and all the executables from
the package, this one config file from my archive.  And with the
package being kept current by "yum update" on a regular basis, I don't
know whether my file is going to work with the rest of the package or
not. If I'm editing the file instead of replacing it, there's still a
possibility that it breaks, and there are more interesting ways for it
to break (as mentioned in the cited article), but *most* of the time
even if the file changes somewhat in the package, my edit will apply
(this edit replaces one line) and the file will work.  By making a
private copy, I've locked down a bunch of stuff that the package
maintainer *thinks* they are maintaining; not just the part I'm
actually altering.

I don't have the time in my budget to really carefully consider and
try out each possible package change before allowing it onto my
servers.  That's why we use an enterprise linux distribution, is to
have automatic updates that cover security holes and still work with
each other.  (Small site -- currently an entire *6* physical linux
servers on the premises.)  And most of my time is budgeted as a
developer.

(The "editfiles" is a cfengine thing, right, not a puppet thing?)


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Puppet clients stop talking to the puppetmaster server

2008-10-02 Thread josh

Yes I can.  The server will have a LOT of log info as it's serving up
just under 700 clients, but I can pick a few clients and enable debug
logging for them and report back.

On Oct 2, 2:32 pm, "Andrew Shafer" <[EMAIL PROTECTED]> wrote:
> Can you get debug logs on the client and server?
>
> On Thu, Oct 2, 2008 at 8:25 AM, josh <[EMAIL PROTECTED]> wrote:
>
> > Paul,
>
> > Yes puppetmasterd has been restarted several times but no luck.  I'm
> > upgrading all the clients to facter-1.5.2 now, and once that done I
> > may either upgrade all the clients to puppet-0.24.5, or downgrade the
> > server to 0.24.4, that way both the clients and the server will have
> > the same versions of facter and puppet (and ruby, which they already
> > do)
>
> > Josh
>
> > On Sep 30, 2:41 pm, "Paul Lathrop" <[EMAIL PROTECTED]> wrote:
> > > Have you restarted puppetmasterd? Often when I see changes not
> > > propagating to clients, it turns out there was a syntax error which
> > > stopped the puppetmaster from reloading changes.
>
> > > Try restarting puppetmasterd and watch the logs.
>
> > > --Paul
>
> > > On Mon, Sep 29, 2008 at 7:29 PM, josh <[EMAIL PROTECTED]> wrote:
>
> > > > The clients still check in every 30 minutes or so, but aren't
> > > > downloading the new classes from the server, and they wil still be
> > > > trying to download non-existant classes.  I'm pushing out an upgrade
> > > > of facter from 1.3.8 to 1.5.2, as of right now 500 out of 700 hosts
> > > > have the new facter version, the other 200 or so need to have puppetd
> > > > restarted.  I can enable debug mode in the logs and see if that helps
> > > > with the troubleshooting.
>
> > > > i.e.:
>
> > > > Sep 29 21:58:49  puppetd[17414]: [ID 702911 daemon.notice]
> > > > Starting catalog run
> > > > Sep 29 21:58:55  puppetd[17414]: [ID 702911 daemon.warning] (//
> > > > Node[default]/dhcp_server/File[/export/home/jrivel/dhcp-server.tar]/
> > > > ensure) No specified sources exist
> > > > Sep 29 21:58:55  puppetd[17414]: [ID 702911 daemon.warning] (//
> > > > Node[default]/dhcp_server/File[/export/home/jrivel/dhcp-server.tar]/
> > > > ensure) No specified sources exist
> > > > Sep 29 21:58:55  puppetd[17414]: [ID 702911 daemon.warning] (//
> > > > Node[default]/dhcp_server/File[/export/home/jrivel/dhcp-server.tar]/
> > > > source) No specified sources exist
> > > > Sep 29 21:59:01  puppetd[17414]: [ID 702911 daemon.notice]
> > > > Finished catalog run in 12.23 seconds
>
> > > > On Sep 29, 5:56 pm, "Andrew Shafer" <[EMAIL PROTECTED]> wrote:
> > > >> What do the logs look like on the clients that stop connecting?
>
> > > >> That's where I'd expect to see something, not on the master.
>
> > > >> On Mon, Sep 29, 2008 at 11:14 AM, josh <[EMAIL PROTECTED]> wrote:
>
> > > >> > Here's the scenario,
>
> > > >> > We have roughly 700 OpenSolaris hosts running puppet-0.24.4,
> > > >> > facter-1.3.8, and ruby 1.8.6.
> > > >> > Puppetmaster server is running OpenSolaris, puppet-0.24.5,
> > > >> > facter-1.5.2, and ruby 1.8.6.
> > > >> > I'm running 4 puppetmasterd instances with mongrel fronted by apache
> > > >> > in load balancer mode.
>
> > > >> > It seems that quite a few (roughly a third) of the boxes stop
> > checking
> > > >> > in to the puppetmaster server, or just stop downloading/creating the
> > > >> > new classes file from the puppetmaster server.  If I ssh into each
> > > >> > box, stop puppetd and restart it, it downloads the new /var/puppet/
> > > >> > state/classes.txt and everything is good again.
>
> > > >> > All of the clients are identical, same OS versions, same patch
> > levels,
> > > >> > same puppet.conf, etc.
>
> > > >> > I am not seeing anything in the logs on the puppetmaster server
> > > >> > (either in the apache logs or puppetmasterd logs) that is indicative
> > > >> > of an issue.
>
> > > >> > Any thoughts?
>
> > > >> > Thanks,
> > > >> > Josh
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: How dangerous is...

2008-10-02 Thread Jeroen van Meeuwen

Andrew Shafer wrote:
> I think the only time that makes sense is if you control the package 
> repos, then you can make some relatively safe assumptions and update the 
> repo as part of the change control process.
> 

Agreed ;-)

-Jeroen


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: error when using rrdtool with puppet

2008-10-02 Thread pavel

Hi,

Its not a permission issue i checked that. Looks like a big of some
sort. Maybe the Version of puppet and the version of rrdtool?

thanks
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: How dangerous is...

2008-10-02 Thread Evan Hisey

On Thu, Oct 2, 2008 at 2:17 PM, dd-b <[EMAIL PROTECTED]> wrote:
>
> package { "something": ensure => latest }  ?
>
> Do people mostly use it, mostly not use it, is it highly in dispute,
> or is there consensus?
>
It depends on your specific situation. I tend to just use present to
be sure the pacakge is installed and let the distro's  update-manager
keep it up to date.

Evan

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Idempotent file editing

2008-10-02 Thread Mike Renfro

On 10/2/2008 2:15 PM, dd-b wrote:

> I could have a script, check whether I'd edited sendmail.mc, edit it
> if needed, and run make in /etc/mail.  That doesn't somehow sound very
> "puppety", if I'm getting any feel for how puppet really intends
> things to work.

http://www.cfwiki.org/cfwiki/index.php/Editfiles_Considered_Harmful may 
be a good starting point for one point of view (i.e., that editing 
config files on the client systems can be a problem for auditing and 
other things). The alternative would be to have one or more sendmail.mc 
files on the puppetmaster, edit them manually, and let puppet pull down 
the new mc file, and then automatically run make afterwards. Something like:

file { "/etc/mail/sendmail.mc":
 source => "puppet:///sendmail/sendmail.mc"
}
exec { "make":
 cwd => "/etc/mail",
 path=> ["/bin", "/usr/bin" ],
 refreshonly => true,
 subscribe   => File["/etc/mail/sendmail.mc"],
}

which is generally copied from refreshonly part of 
http://reductivelabs.com/trac/puppet/wiki/TypeReference#exec

-- 
Mike Renfro  / R&D Engineer, Center for Manufacturing Research,
931 372-3601 / Tennessee Technological University

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: How dangerous is...

2008-10-02 Thread Jeroen van Meeuwen

dd-b wrote:
> package { "something": ensure => latest }  ?
> 
> Do people mostly use it, mostly not use it, is it highly in dispute,
> or is there consensus?
> 

It's there when you need it, but it may have unsuspected results if you 
do not have control over what updates to the package are available to 
the system.

-Jeroen

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] How dangerous is...

2008-10-02 Thread dd-b

package { "something": ensure => latest }  ?

Do people mostly use it, mostly not use it, is it highly in dispute,
or is there consensus?

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Idempotent file editing

2008-10-02 Thread dd-b

Or, how are people handling things like setting up sendmail to refer
all outgoing mail to a smarthost down the line?

I could have a script, check whether I'd edited sendmail.mc, edit it
if needed, and run make in /etc/mail.  That doesn't somehow sound very
"puppety", if I'm getting any feel for how puppet really intends
things to work.

I could have my own sendmail.mc to replace the stock one, I suppose.
I've already done that with a couple of files that are only a few
lines or that really are completely customized, but sendmail.mc isn't
like that.

I could look for an alternate mail transport package that did exactly
that, and required just one name dropped into a configuration
somewhere, thus sidestepping the problem.  (This might be better on a
sysadmin level, but I've still got the general file editing problem in
other places, so I need a solution.)
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Puppet clients stop talking to the puppetmaster server

2008-10-02 Thread Andrew Shafer
Can you get debug logs on the client and server?

On Thu, Oct 2, 2008 at 8:25 AM, josh <[EMAIL PROTECTED]> wrote:

>
> Paul,
>
> Yes puppetmasterd has been restarted several times but no luck.  I'm
> upgrading all the clients to facter-1.5.2 now, and once that done I
> may either upgrade all the clients to puppet-0.24.5, or downgrade the
> server to 0.24.4, that way both the clients and the server will have
> the same versions of facter and puppet (and ruby, which they already
> do)
>
> Josh
>
>
> On Sep 30, 2:41 pm, "Paul Lathrop" <[EMAIL PROTECTED]> wrote:
> > Have you restarted puppetmasterd? Often when I see changes not
> > propagating to clients, it turns out there was a syntax error which
> > stopped the puppetmaster from reloading changes.
> >
> > Try restarting puppetmasterd and watch the logs.
> >
> > --Paul
> >
> > On Mon, Sep 29, 2008 at 7:29 PM, josh <[EMAIL PROTECTED]> wrote:
> >
> > > The clients still check in every 30 minutes or so, but aren't
> > > downloading the new classes from the server, and they wil still be
> > > trying to download non-existant classes.  I'm pushing out an upgrade
> > > of facter from 1.3.8 to 1.5.2, as of right now 500 out of 700 hosts
> > > have the new facter version, the other 200 or so need to have puppetd
> > > restarted.  I can enable debug mode in the logs and see if that helps
> > > with the troubleshooting.
> >
> > > i.e.:
> >
> > > Sep 29 21:58:49  puppetd[17414]: [ID 702911 daemon.notice]
> > > Starting catalog run
> > > Sep 29 21:58:55  puppetd[17414]: [ID 702911 daemon.warning] (//
> > > Node[default]/dhcp_server/File[/export/home/jrivel/dhcp-server.tar]/
> > > ensure) No specified sources exist
> > > Sep 29 21:58:55  puppetd[17414]: [ID 702911 daemon.warning] (//
> > > Node[default]/dhcp_server/File[/export/home/jrivel/dhcp-server.tar]/
> > > ensure) No specified sources exist
> > > Sep 29 21:58:55  puppetd[17414]: [ID 702911 daemon.warning] (//
> > > Node[default]/dhcp_server/File[/export/home/jrivel/dhcp-server.tar]/
> > > source) No specified sources exist
> > > Sep 29 21:59:01  puppetd[17414]: [ID 702911 daemon.notice]
> > > Finished catalog run in 12.23 seconds
> >
> > > On Sep 29, 5:56 pm, "Andrew Shafer" <[EMAIL PROTECTED]> wrote:
> > >> What do the logs look like on the clients that stop connecting?
> >
> > >> That's where I'd expect to see something, not on the master.
> >
> > >> On Mon, Sep 29, 2008 at 11:14 AM, josh <[EMAIL PROTECTED]> wrote:
> >
> > >> > Here's the scenario,
> >
> > >> > We have roughly 700 OpenSolaris hosts running puppet-0.24.4,
> > >> > facter-1.3.8, and ruby 1.8.6.
> > >> > Puppetmaster server is running OpenSolaris, puppet-0.24.5,
> > >> > facter-1.5.2, and ruby 1.8.6.
> > >> > I'm running 4 puppetmasterd instances with mongrel fronted by apache
> > >> > in load balancer mode.
> >
> > >> > It seems that quite a few (roughly a third) of the boxes stop
> checking
> > >> > in to the puppetmaster server, or just stop downloading/creating the
> > >> > new classes file from the puppetmaster server.  If I ssh into each
> > >> > box, stop puppetd and restart it, it downloads the new /var/puppet/
> > >> > state/classes.txt and everything is good again.
> >
> > >> > All of the clients are identical, same OS versions, same patch
> levels,
> > >> > same puppet.conf, etc.
> >
> > >> > I am not seeing anything in the logs on the puppetmaster server
> > >> > (either in the apache logs or puppetmasterd logs) that is indicative
> > >> > of an issue.
> >
> > >> > Any thoughts?
> >
> > >> > Thanks,
> > >> > Josh
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Newbie Question.

2008-10-02 Thread Paul Lathrop

First of all, File and it's ilk are not "functions", they are "types"
or even better "resource types". Second, the reference you are looking
for is:

http://reductivelabs.com/trac/puppet/wiki/TypeReference

Hope that helps!

--Paul

On Thu, Oct 2, 2008 at 8:38 AM, Edward <[EMAIL PROTECTED]> wrote:
>
> Ok, I have gotten Puppet up and running. I am about to start testing
> out some more of the functions but there does not appear to be any
> place that describes all the options to a function.
>
> For example File:   I have seen examples with
> file { /etc/passwd: mode->777, ensure->file, owner->nobody, group-
>>nobody, source->puppet://xyz.com/linux-distro, target->"/dev/null"}
>
> but I can not find any documentation on what are all the possible
> setting for like ensure.
>
> Now I am only using file as an example, as I am starting to look at
> the commonly used modules "Common, and virtual" and I don't seem to
> find any docs that would help me get started like
>
> Apache Virtual Host:
> Function: apache
> Arguments
> url: [describe argument for url and possible settings]
> port:
> Allow:
> ...
> ...
> ...
>
>
> Is there anything like this or do I have to pick though the code of
> ever options I want to use.
>
> Thanks
>
> Ed
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: virtual resources: multiple exports and one collect

2008-10-02 Thread Luke Kanies

On Oct 1, 2008, at 8:02 AM, udo waechter wrote:

> Hello everybody,
> I have a question regarding virtual resources and the exporting/ 
> collection thereof.
>
> I have several hosts that should export one and the same file  
> resource. This should be collected exactly once by one host.
> The resources are exported within a define:
>
> ## this define is used by many hosts.
> ## example: sge::queue{"testqueue": ensure => present }
> define sge::queue(...){
>   @@file{"/var/lib/puppet/exported/sge/queue.template.${queue_name}":
>   content => template("sge/queue.template.erb"),
>   tag => "sge_queue_template",
>   }
> }
>
> ### one host should import the File resource above.
> class queue_collect{
>   File <<| tag == "sge_queue_template" |>>
>   #there should be exactly one file:
>   # /var/lib/puppet/exported/sge/queue.template.testqueue
> }
>
> How would I do this? If I simply do the examples above, I get the  
> "cannot override local resource" error on the host which is in the  
> queue_collect class.
>
> I would like to know how I could have many hosts export the  
> "same" (as in identical) resource. Is this possible?

As with non-exported resources, you can't have multiple instances of  
the same resource.  How would it even make sense to have multiple  
hosts trying to create the same file on a given machine?  Who would win?

>
> Looking into the database (resources table), it becomes clear that  
> every exporting host's resource is different, since it has different  
> "host_id"s.

Their meaningful data (esp. the path) are the same.

>
> I have a similar problem with "Exec" resources, but ther I have the  
> "onlyif" parameter with a test that prefents execution if the exec  
> has already been applied on the collecting node. This is not  
> possible for the File resources though.
>
> Could it be that exporting via @file{...} and collecting with  
> realize(...) would solve this issue? I do not really understand the  
> use of this approach, I must confess.

One '@' is virtual -- doesn't use Storeconfigs and doesn't allow  
multiple hosts to have access to the resource.   'realize' is exactly  
equivalent to a query like you're doing above, except for virtual  
(rather than exported) resources.


-- 
The whole secret of life is to be interested in one thing profoundly
and in a thousand things well. -- Horace Walpole
-
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Puppet for password management

2008-10-02 Thread Geoff Newell
I'm working on a turnkey Linux system where the post build config is handled
with puppet.
One of the unique constraints with a turnkey system is that passwords are
essentially set at build time and then stay fixed for the life of the
product.
I was wondering if anyone had used puppet to manage user passwords?
The 'user' type supports an encrypted hash, but ideally I need the facility
of passing in a plaintext password, md5 hash it and then have puppet
idempotently check it's been set.

Thoughts?

Geoff.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Newbie Question.

2008-10-02 Thread Edward

Ok, I have gotten Puppet up and running. I am about to start testing
out some more of the functions but there does not appear to be any
place that describes all the options to a function.

For example File:   I have seen examples with
file { /etc/passwd: mode->777, ensure->file, owner->nobody, group-
>nobody, source->puppet://xyz.com/linux-distro, target->"/dev/null"}

but I can not find any documentation on what are all the possible
setting for like ensure.

Now I am only using file as an example, as I am starting to look at
the commonly used modules "Common, and virtual" and I don't seem to
find any docs that would help me get started like

Apache Virtual Host:
Function: apache
Arguments
url: [describe argument for url and possible settings]
port:
Allow:
...
...
...


Is there anything like this or do I have to pick though the code of
ever options I want to use.

Thanks

Ed

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: error when using rrdtool with puppet

2008-10-02 Thread Luke Kanies

On Oct 1, 2008, at 6:15 PM, pavel wrote:

>
> I am trying  get puppet to write log data using rrdtool to be used by
> PuppetView. I have installed all the rrdtool packages including ruby-
> rrdtool.
>
> Here are by puppet configs:
> reports = rrdgraph, store
> reportdir   = /var/www/html/_solutionset.com/app8.autodesk/ 
> current/
> puppet/reports
> rrddir  = /var/www/html/_solutionset.com/app8.autodesk/ 
> current/
> puppet/html/rrd
> rrdinterval = $runinterval
> rrdgraph= true
>
> Here is the error I am getting on the puppet master:
>
> info: Found 132027-db2.bla.com in /etc/puppet/manifests/site.pp
> info: Found csp in /etc/puppet/manifests/site.pp
> notice: Compiled configuration for 132027-db2.bla.com in 0.01 seconds
> info: Processing reports rrdgraph, store for 132027-db2.bla.com
> err: Report rrdgraph failed: Could not create RRD file /var/www/html/
> _bla.com/app8.autodesk/current/puppet/html/rrd/132027-db2.bla.com/
> time.rrd: invalid argument


Hmm.  RRD is pretty obtuse in its errors.

If the file already exists, try removing it and letting RRD recreate  
it.  If it doesn't, check permissions (although Puppet *should* manage  
those for you).

Otherwise... I recognize the error, but I don't really remember what  
caused it.  When you do finally figure it out, please update the  
Errors page on the wiki, so others can share in your wisdom.

-- 
It's not that I'm afraid to die. I just don't want to be there when it
happens. -- Woody Allen
-
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: how to define variables in "module" scope ?

2008-10-02 Thread Luke Kanies

On Sep 29, 2008, at 12:45 PM, Felix Schäfer wrote:

>
> Hello,
>
> Am 29.09.2008 um 18:40 schrieb Marc Fournier:
>
>> I have a bunch of variables that are used in several classes and
>> definitions, all part of the same module.
>>
>> As these variables are defined automatically based on system facts, I
>> would like to avoid having to declare them in each node that uses
>> classes or definitions from my module.
>>
>> Where would be the best place to put these variables ? I tried in
>> /manifests/init.pp as well as in an external file imported
>> from
>> within classes/definitions files but none work as I would have
>> expected.
>
> That's a discussion I had several weeks ago on IRC, but I can't
> remember with whom. IIRC, it basically makes a difference wheter the
> module is autoloaded or imported. My tests so far have shown that
> "module-scope" variables, i.e. e.g. such ones defined at the beginning
> of init.pp, get included if you import the module, but not if some
> class in the module is autoloaded. I think we had concluded that it
> would be nice to have "module-scope" variables in autoloaded classes
> and definitions, but had not followed the thought or the tests any
> further.

Puppet doesn't actually currently have any concept of module-scoped  
variables.  Really, the language doesn't even know anything about  
modules -- they're convenient ways of organizing files, but they don't  
affect things like variable scope.

What you're seeing is a difference in behaviour in defining *global*  
variables -- anything outside of all classes is actually available in  
every class in the system, not just the classes in that module.

I'd consider adding module variables if we could come up with a good  
way to do it, but I can't think of a mechanism.

In the meantime, though, scoped variables should get you pretty close:

#manifests/init.pp
class mymod {
   $foo = "important stuff
}

#manifests/other.pp
class mymod::other {
   $other = "even more ${foo}"
}

-- 
I take my children everywhere, but they always find their way
back home. --Robert Orben
-
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: question about reports

2008-10-02 Thread Luke Kanies

On Sep 30, 2008, at 3:31 PM, Nicolas Arias wrote:

> when a node tries to send a report it drops the following error:
>
> err: Reporting failed: undefined method `graph' for
> #


Could you possibly be running different versions of Puppet on the hosts?

If not, can we get a stack trace (with --trace)?

-- 
A great many people think they are thinking when they are merely
rearranging their prejudices. -- William James
-
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Puppet clients stop talking to the puppetmaster server

2008-10-02 Thread josh

Paul,

Yes puppetmasterd has been restarted several times but no luck.  I'm
upgrading all the clients to facter-1.5.2 now, and once that done I
may either upgrade all the clients to puppet-0.24.5, or downgrade the
server to 0.24.4, that way both the clients and the server will have
the same versions of facter and puppet (and ruby, which they already
do)

Josh


On Sep 30, 2:41 pm, "Paul Lathrop" <[EMAIL PROTECTED]> wrote:
> Have you restarted puppetmasterd? Often when I see changes not
> propagating to clients, it turns out there was a syntax error which
> stopped the puppetmaster from reloading changes.
>
> Try restarting puppetmasterd and watch the logs.
>
> --Paul
>
> On Mon, Sep 29, 2008 at 7:29 PM, josh <[EMAIL PROTECTED]> wrote:
>
> > The clients still check in every 30 minutes or so, but aren't
> > downloading the new classes from the server, and they wil still be
> > trying to download non-existant classes.  I'm pushing out an upgrade
> > of facter from 1.3.8 to 1.5.2, as of right now 500 out of 700 hosts
> > have the new facter version, the other 200 or so need to have puppetd
> > restarted.  I can enable debug mode in the logs and see if that helps
> > with the troubleshooting.
>
> > i.e.:
>
> > Sep 29 21:58:49  puppetd[17414]: [ID 702911 daemon.notice]
> > Starting catalog run
> > Sep 29 21:58:55  puppetd[17414]: [ID 702911 daemon.warning] (//
> > Node[default]/dhcp_server/File[/export/home/jrivel/dhcp-server.tar]/
> > ensure) No specified sources exist
> > Sep 29 21:58:55  puppetd[17414]: [ID 702911 daemon.warning] (//
> > Node[default]/dhcp_server/File[/export/home/jrivel/dhcp-server.tar]/
> > ensure) No specified sources exist
> > Sep 29 21:58:55  puppetd[17414]: [ID 702911 daemon.warning] (//
> > Node[default]/dhcp_server/File[/export/home/jrivel/dhcp-server.tar]/
> > source) No specified sources exist
> > Sep 29 21:59:01  puppetd[17414]: [ID 702911 daemon.notice]
> > Finished catalog run in 12.23 seconds
>
> > On Sep 29, 5:56 pm, "Andrew Shafer" <[EMAIL PROTECTED]> wrote:
> >> What do the logs look like on the clients that stop connecting?
>
> >> That's where I'd expect to see something, not on the master.
>
> >> On Mon, Sep 29, 2008 at 11:14 AM, josh <[EMAIL PROTECTED]> wrote:
>
> >> > Here's the scenario,
>
> >> > We have roughly 700 OpenSolaris hosts running puppet-0.24.4,
> >> > facter-1.3.8, and ruby 1.8.6.
> >> > Puppetmaster server is running OpenSolaris, puppet-0.24.5,
> >> > facter-1.5.2, and ruby 1.8.6.
> >> > I'm running 4 puppetmasterd instances with mongrel fronted by apache
> >> > in load balancer mode.
>
> >> > It seems that quite a few (roughly a third) of the boxes stop checking
> >> > in to the puppetmaster server, or just stop downloading/creating the
> >> > new classes file from the puppetmaster server.  If I ssh into each
> >> > box, stop puppetd and restart it, it downloads the new /var/puppet/
> >> > state/classes.txt and everything is good again.
>
> >> > All of the clients are identical, same OS versions, same patch levels,
> >> > same puppet.conf, etc.
>
> >> > I am not seeing anything in the logs on the puppetmaster server
> >> > (either in the apache logs or puppetmasterd logs) that is indicative
> >> > of an issue.
>
> >> > Any thoughts?
>
> >> > Thanks,
> >> > Josh
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: how to define variables in "module" scope ?

2008-10-02 Thread Marc Fournier

Hello,

> > I have a bunch of variables that are used in several classes and
> > definitions, all part of the same module.
> >
> > As these variables are defined automatically based on system facts,
> > I would like to avoid having to declare them in each node that uses
> > classes or definitions from my module.
> >
> > Where would be the best place to put these variables ? I tried in
> > /manifests/init.pp as well as in an external file imported  
> > from
> > within classes/definitions files but none work as I would have  
> > expected.
> 
> That's a discussion I had several weeks ago on IRC, but I can't  
> remember with whom. IIRC, it basically makes a difference wheter the  
> module is autoloaded or imported. My tests so far have shown that  
> "module-scope" variables, i.e. e.g. such ones defined at the
> beginning of init.pp, get included if you import the module, but not
> if some class in the module is autoloaded. I think we had concluded
> that it would be nice to have "module-scope" variables in autoloaded
> classes and definitions, but had not followed the thought or the
> tests any further.
> 
> I hope this answers some of your questions, and we can find a
> solution that suits everyone. Greetings,

Thank you Felix for this idea ! It indeed helped my classes work
without having to set variables in the global scope.

For future reference, here's the idea:

modules/whatever/manifests/init.pp:

case $operatingsystem {
  RedHat: {
$wwwuser = "apache"
  }
  Debian: {
$wwwuser = "www-data"
  }
}

import "classes/*.pp"
import "definitions/*.pp"

In modules/whatever/manifests/*/*.pp I have stuff such as:

class wwwuser {
  user { "$wwwuser":
ensure  => present,
  }
}

And finally in my nodes I do:

  import "whatever"
  include wwwuser

This solution is convenient enough for my needs. But maybe should we
report this as a feature request to puppet developers ?
Does someone know if there is a good reason variables in init.pp
aren't available in autoloaded classes ?

If this is finally the designed behaviour I will put a note somewhere in
the wiki about the workaround.

Marc




--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---