[Puppet Users] is splay used with puppetrun?

2009-09-17 Thread Dan Bode
Hi All,

Is splay time used when puppetrun triggers the run?

thanks,

Dan

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



[Puppet Users] Re: foreman

2009-09-17 Thread Matt

The default for puppet is production, so I don't set a [production]
setting in the puppet.conf, I just have a [main] and [puppetmasterd] -
so I guess foreman should take the [main] as production right?

# RAILS_ENV=production rake puppet:import:puppet_classes
(in /var/www/html/foreman)
Environment   old:2 current:2
PuppetClasses old:0 current:0

Do I require to have storedconfigs working on the same DB for
importing of classes to work?

Thanks,

Matt

2009/9/16 Moty mot...@gmail.com:


 You can have both.

 Just declare all of your environment with environments parameter in /
 etc/puppet/puppet.conf file
 then run:

 RAILS_ENV=production rake puppet:import:puppet_classes

 and it will import all your environments classes.

 Moty

 On Sep 16, 7:30 pm, Matt mattmora...@gmail.com wrote:
 Hi folks,

 I'm setting up the foreman and wondering what path to give it for the
 import of puppet classes? I have the common module structure

 /etc/puppet/production/modules
 /etc/puppet/development/modules

 Is there anything special that needs to be done for foreman to load them in?

 Thanks,

 Matt
 


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



[Puppet Users] Re: foreman

2009-09-17 Thread Moty
- I had the same puppet.conf style you have an I had to change it a bit so
I'll have a [production] section and [development] section for the import to
work. I simply moved stuff like smodulepath,templatedir...etc from
[puppetmasterd] section to a newly created [production] section. But since I
declare environments parameter and create a new [production] section at
the same time  one of them might be enough ... :-)

- regarding your second point I have it configure to the same db like
storeconfig and I do think it is necessary for the import to work.

Moty

On Thu, Sep 17, 2009 at 11:08 AM, Matt mattmora...@gmail.com wrote:


 The default for puppet is production, so I don't set a [production]
 setting in the puppet.conf, I just have a [main] and [puppetmasterd] -
 so I guess foreman should take the [main] as production right?

 # RAILS_ENV=production rake puppet:import:puppet_classes
 (in /var/www/html/foreman)
 Environment   old:2 current:2
 PuppetClasses old:0 current:0

 Do I require to have storedconfigs working on the same DB for
 importing of classes to work?

 Thanks,

 Matt

 2009/9/16 Moty mot...@gmail.com:
 
 
  You can have both.
 
  Just declare all of your environment with environments parameter in /
  etc/puppet/puppet.conf file
  then run:
 
  RAILS_ENV=production rake puppet:import:puppet_classes
 
  and it will import all your environments classes.
 
  Moty
 
  On Sep 16, 7:30 pm, Matt mattmora...@gmail.com wrote:
  Hi folks,
 
  I'm setting up the foreman and wondering what path to give it for the
  import of puppet classes? I have the common module structure
 
  /etc/puppet/production/modules
  /etc/puppet/development/modules
 
  Is there anything special that needs to be done for foreman to load them
 in?
 
  Thanks,
 
  Matt
  
 

 



-- 

Moty

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



[Puppet Users] Re: foreman installation questions

2009-09-17 Thread Ohad Levy
Hi Dan,

I've just copy paste the instructions from the wiki
http://theforeman.org/wiki/foreman/Installation_instructions, and everything
seems fine.

I do know that http cloneing from github could not work well, it depends a
lot on your http proxy as well.
if you choose to download from github using the download link, it will not
provide all additional sub modules which are requried for Foreman
(you would need to do git submodules command)

thats why I've added in the foreman website the ability to download the
latest stable version (link from the installation instruction above).

nevertheless, the latest dev version has support for puppet reports, so it
might worth using it..

cheers,
Ohad

On Thu, Sep 17, 2009 at 6:39 PM, Dan Bode bod...@gmail.com wrote:

 Hi Ohad,

 I wasnt able to install foreman over http from git using you installation
 instructions.

 [u...@machine local]$ git clone http://github.com/ohadlevy/foreman.gitforeman2
 Initialized empty Git repository in /usr/local/foreman2/.git/
 Cannot get remote repository information.
 Perhaps git-update-server-info needs to be run there?

 so I got the source from the master as a zip

 I get the following error when running

 rake db:migrate

 rake aborted!
 undefined method `to_label' for class `Host'
 /usr/local/foreman/app/models/host.rb:19


 I after moving the alias to after the method declaration it works fine

   # Returns the name of this host as a string
   # String: the host's name
   def to_label
 name
   end
   alias to_s to_label

 do I have the wrong source version somehow?

 regards,

 Dan


 


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



[Puppet Users] Mount point permissions

2009-09-17 Thread Gajillion

All,
I'm surprised I haven't seen this here since I can't be the only one
experiencing this.  We have a class that uses the file type to create
a mount point, an exec to create a file system, and then uses the
mount type to mount it up.  The problem is, with most Unix file
systems, the permissions change on a mount point after the file system
is mounted up.  I can't call my file type which sets the permissions
on the mount point again because it creates an execution loop.  I
can't create another resource which sets the permissions because I get
a previously defined error.  The only solution using Puppet natives so
far is to run Puppet twice - which is unacceptable in most situations.

My fall back is to use another exec call to do exactly what the file
definition of the mount point already does, but that goes against the
philosophy of having Puppet aware of the state of the system.

Anyone else already solved this?

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



[Puppet Users] Re: Activerecord and 0.25 issues

2009-09-17 Thread Allan Marcus

Will do


---
Thanks,

Allan Marcus
505-667-5666



On Sep 16, 2009, at 6:11 PM, Luke Kanies wrote:


 Can you open this as a ticket, with this trace attached?

 On Sep 10, 2009, at 7:33 AM, Allan Marcus wrote:

 hard to read below due to wrapping. text file attached.

 trace.txt

 ---
 Thanks,

 Allan Marcus
 505-667-5666



 On Sep 10, 2009, at 8:26 AM, Allan Marcus wrote:


 bash-3.2# puppetmasterd --no-daemonize --trace
 /Library/Ruby/Site/1.8/facter/util/macosx.rb:1
 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
 1.8/rubygems/custom_require.rb:31:in `gem_original_require'
 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
 1.8/rubygems/custom_require.rb:31:in `require'
 /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/
 dependencies.rb:156:in `require'
 /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/
 dependencies.rb:521:in `new_constants_in'
 /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/
 dependencies.rb:156:in `require'
 /Library/Ruby/Site/1.8/facter/macosx.rb:25
 /Library/Ruby/Site/1.8/facter/util/loader.rb:72:in `load'
 /Library/Ruby/Site/1.8/facter/util/loader.rb:72:in `load_file'
 /Library/Ruby/Site/1.8/facter/util/loader.rb:38:in `load_all'
 /Library/Ruby/Site/1.8/facter/util/loader.rb:33:in `each'
 /Library/Ruby/Site/1.8/facter/util/loader.rb:33:in `load_all'
 /Library/Ruby/Site/1.8/facter/util/loader.rb:30:in `each'
 /Library/Ruby/Site/1.8/facter/util/loader.rb:30:in `load_all'
 /Library/Ruby/Site/1.8/facter/util/collection.rb:90:in `load_all'
 /Library/Ruby/Site/1.8/facter.rb:183:in `loadfacts'
 /Library/Ruby/Site/1.8/puppet/provider/nameservice/
 directoryservice.rb:
 112:in `get_macosx_version_major'
 /Library/Ruby/Site/1.8/puppet/provider/nameservice/
 directoryservice.rb:
 270:in `get_exec_preamble'
 /Library/Ruby/Site/1.8/puppet/provider/nameservice/
 directoryservice.rb:
 139:in `list_all_present'
 /Library/Ruby/Site/1.8/puppet/provider/nameservice/
 directoryservice.rb:
 232:in `single_report'
 /Library/Ruby/Site/1.8/puppet/provider/nameservice/
 directoryservice.rb:
 524:in `getinfo'
 /Library/Ruby/Site/1.8/puppet/provider/nameservice.rb:221:in
 `exists?'
 /Library/Ruby/Site/1.8/puppet/type/user.rb:250:in `exists?'
 /Library/Ruby/Site/1.8/puppet/util/settings.rb:475:in
 `service_user_available?'
 /Library/Ruby/Site/1.8/puppet/util/settings/file_setting.rb:43:in
 `use_service_user?'
 /Library/Ruby/Site/1.8/puppet/util/settings/file_setting.rb:38:in
 `owner'
 /Library/Ruby/Site/1.8/puppet/util/settings/file_setting.rb:93:in
 `to_resource'
 /Library/Ruby/Site/1.8/puppet/util/settings.rb:567:in `to_catalog'
 /Library/Ruby/Site/1.8/puppet/util/settings.rb:565:in `each'
 /Library/Ruby/Site/1.8/puppet/util/settings.rb:565:in `to_catalog'
 /Library/Ruby/Site/1.8/puppet/util/settings.rb:625:in `use'
 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
 1.8/sync.rb:229:in `synchronize'
 /Library/Ruby/Site/1.8/puppet/util/settings.rb:619:in `use'
 /Library/Ruby/Site/1.8/puppet/application/puppetmasterd.rb:151:in
 `run_setup'
 /Library/Ruby/Site/1.8/puppet/application.rb:216:in `run'
 /Library/Ruby/Site/1.8/puppet/application.rb:306:in `exit_on_fail'
 /Library/Ruby/Site/1.8/puppet/application.rb:216:in `run'
 /usr/sbin/puppetmasterd:66
 /Library/Ruby/Site/1.8/facter/util/macosx.rb:1
 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
 1.8/rubygems/custom_require.rb:31:in `gem_original_require'
 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
 1.8/rubygems/custom_require.rb:31:in `require'
 /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/
 dependencies.rb:156:in `require'
 /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/
 dependencies.rb:521:in `new_constants_in'
 /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/
 dependencies.rb:156:in `require'
 /Library/Ruby/Site/1.8/facter/macosx.rb:25
 /Library/Ruby/Site/1.8/facter/util/loader.rb:72:in `load'
 /Library/Ruby/Site/1.8/facter/util/loader.rb:72:in `load_file'
 /Library/Ruby/Site/1.8/facter/util/loader.rb:38:in `load_all'
 /Library/Ruby/Site/1.8/facter/util/loader.rb:33:in `each'
 /Library/Ruby/Site/1.8/facter/util/loader.rb:33:in `load_all'
 /Library/Ruby/Site/1.8/facter/util/loader.rb:30:in `each'
 /Library/Ruby/Site/1.8/facter/util/loader.rb:30:in `load_all'
 /Library/Ruby/Site/1.8/facter/util/collection.rb:90:in `load_all'
 /Library/Ruby/Site/1.8/facter.rb:183:in `loadfacts'
 /Library/Ruby/Site/1.8/puppet/provider/nameservice/
 directoryservice.rb:
 112:in `get_macosx_version_major'
 /Library/Ruby/Site/1.8/puppet/provider/nameservice/
 directoryservice.rb:
 270:in `get_exec_preamble'
 /Library/Ruby/Site/1.8/puppet/provider/nameservice/
 directoryservice.rb:
 139:in `list_all_present'
 /Library/Ruby/Site/1.8/puppet/provider/nameservice/
 directoryservice.rb:
 232:in `single_report'
 

[Puppet Users] Re: help please

2009-09-17 Thread jcbollinger



On Sep 16, 4:55 pm, Allan Marcus al...@lanl.gov wrote:

 warning: Configuration could not be instantiated: Could not find  
 dependent Pkgdmg_install[Office2008-1211UpdateEN.dmg] for  
 Package[Office2008-1220UpdateEN.dmg] at /var/puppet/environments/
 development/modules/lanl-baseline/manifests/definitions/pkg_install.pp:
 31; using cached catalog

 pkgdmg_install is a definition that looks like this:

 {
          $sourcedir_real = $sourcedir ? {
                  false = http://puppet.lanl.gov;,
                  default = $sourcedir
          }
         $dirpath_real = $dirpath ? {
                 false = ,
                 default = $dirpath
         }
          package { $name:
                  ensure = installed,
                  provider = pkgdmg,
                  source = $sourcedir_real/${dirpath_real}${name}
          }

 }

 what simple little stupid thing am I missing?

I don't think puppet supports dependencies between defined type
invocations -- at least, not the way you seem to expect.  This makes
sense to me when I consider that although defined types look a lot
like classes, they are not singletons and they function essentially as
macros.  If you look closely at your error message, in fact, you will
see that the relationship that puppet cannot satisfy has a Package
resource at one end, even though you did not explicitly specify such a
relationship.  Puppet is doing its best for you, but what you're
asking cannot be satisfied in its model.

I think you can solve your problem by making the targets of your
relationships be the appropriate Package resources.  For example:

pkgdmg_install { Office2008-1220UpdateEN.dmg:
alias = ms_office_sp2,
dirpath = iasw/msoffice/,
before =  Package[Office2008-1211UpdateEN.dmg]
}

That does rely a bit on knowledge of the implementation of
pkgdmg_install.  If you don't like that (and perhaps you shouldn't),
or if that suggestion doesn't work, then the next refinement would be
to update the definition to accept an optional before-package (or
similarly named) parameter, which you then use to directly set the
Package - Package dependency, instead of using the 'before' parameter
on the defined type.

Good Luck,

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



[Puppet Users] Array of values for (exec) return?

2009-09-17 Thread John Ingersoll
Hi,

I have an exec {} that runs a command line script, for which 0 and 1 are
both good return codes. (Specifically, spamassassin update; 1 means no new
downloads). I tried

returns = [0,1],

but it still reports an error on RC = 1. Are multiple values not appropriate
here?

My workaround is to exec a wrapper script that traps '1' and returns 0.

TIA

-- 
John Ingersoll, Jr.
Usage: fortune -P [] -a [xsz] [Q: [file]] [rKe9] -v6[+] dataspec ...
inputdir

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



[Puppet Users] Re: Mount point permissions

2009-09-17 Thread Chad Huneycutt

I ran into the same problem, and I think I used execs to create the
mount point and set permissions before mounting, and the file resource
for the mount point requires that the fs be mounted.

On 9/17/09, Gajillion gajill...@gmail.com wrote:

 All,
 I'm surprised I haven't seen this here since I can't be the only one
 experiencing this.  We have a class that uses the file type to create
 a mount point, an exec to create a file system, and then uses the
 mount type to mount it up.  The problem is, with most Unix file
 systems, the permissions change on a mount point after the file system
 is mounted up.  I can't call my file type which sets the permissions
 on the mount point again because it creates an execution loop.  I
 can't create another resource which sets the permissions because I get
 a previously defined error.  The only solution using Puppet natives so
 far is to run Puppet twice - which is unacceptable in most situations.

 My fall back is to use another exec call to do exactly what the file
 definition of the mount point already does, but that goes against the
 philosophy of having Puppet aware of the state of the system.

 Anyone else already solved this?

 Mark
 


-- 
Sent from my mobile device

Chad M. Huneycutt

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



[Puppet Users] Re: help please

2009-09-17 Thread Allan Marcus

Thanks. I tried that and it doesn't work

That said, I redid it with require instead of before and it seems  
to work now.

---
Thanks,

Allan Marcus
505-667-5666



On Sep 17, 2009, at 7:24 AM, jcbollinger wrote:




 On Sep 16, 4:55 pm, Allan Marcus al...@lanl.gov wrote:

 warning: Configuration could not be instantiated: Could not find
 dependent Pkgdmg_install[Office2008-1211UpdateEN.dmg] for
 Package[Office2008-1220UpdateEN.dmg] at /var/puppet/environments/
 development/modules/lanl-baseline/manifests/definitions/ 
 pkg_install.pp:
 31; using cached catalog

 pkgdmg_install is a definition that looks like this:

 {
  $sourcedir_real = $sourcedir ? {
  false = http://puppet.lanl.gov;,
  default = $sourcedir
  }
 $dirpath_real = $dirpath ? {
 false = ,
 default = $dirpath
 }
  package { $name:
  ensure = installed,
  provider = pkgdmg,
  source = $sourcedir_real/${dirpath_real}${name}
  }

 }

 what simple little stupid thing am I missing?

 I don't think puppet supports dependencies between defined type
 invocations -- at least, not the way you seem to expect.  This makes
 sense to me when I consider that although defined types look a lot
 like classes, they are not singletons and they function essentially as
 macros.  If you look closely at your error message, in fact, you will
 see that the relationship that puppet cannot satisfy has a Package
 resource at one end, even though you did not explicitly specify such a
 relationship.  Puppet is doing its best for you, but what you're
 asking cannot be satisfied in its model.

 I think you can solve your problem by making the targets of your
 relationships be the appropriate Package resources.  For example:

 pkgdmg_install { Office2008-1220UpdateEN.dmg:
alias = ms_office_sp2,
dirpath = iasw/msoffice/,
before =  Package[Office2008-1211UpdateEN.dmg]
 }

 That does rely a bit on knowledge of the implementation of
 pkgdmg_install.  If you don't like that (and perhaps you shouldn't),
 or if that suggestion doesn't work, then the next refinement would be
 to update the definition to accept an optional before-package (or
 similarly named) parameter, which you then use to directly set the
 Package - Package dependency, instead of using the 'before' parameter
 on the defined type.

 Good Luck,

 John
 


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



[Puppet Users] Re: Preventing concurrent puppetd updates

2009-09-17 Thread Pete Emerson

With this solution would I need to clear a cache? If I do two puppet
runs right after each other, doesn't puppet cache the recipes for a
period of time? If so, what do I need to do to wipe that local cache
out?

Pete

On Tue, Sep 15, 2009 at 2:42 PM, Pete Emerson pemer...@gmail.com wrote:

 Silviu, I think it's a pretty good solution, though.

 I'm actually contemplating writing a simple job scheduler that would
 eliminate this problem, but wanted to make sure that I'm not missing
 something obvious like a built-in queuing system or something like
 that.

 On Sep 15, 2:14 pm, Silviu Paragina sil...@paragina.ro wrote:
 Now I realize that this is not so portable :-?? you could try creating a
 simple pp file and run it with puppet (not puppetd) which would essentially
 do the same thing.

 Silviu

 On Wed, 16 Sep 2009 00:02:07 +0300, Silviu Paragina sil...@paragina.ro
 wrote:

  The error message gives you the solution, check for the existence of
  /var/lib/puppet/state/puppetdlock.

  My solution would be

  invoke-rc.d puppet stop
  #or /etc/init.d/puppet or whatever
  while [ -f /var/lib/puppet/state/puppetdlock ]
  do
  sleep 1
  done

  #do your stuff

  Silviu

  On Tue, 15 Sep 2009 13:05:37 -0700, Pete Emerson pemer...@gmail.com
  wrote:
  I'm using puppet (0.24, working on the 0.25 migration) to do rolling
  upgrades across our datacenter.

  I'm running puppet as a daemon.

  In order to change an application version, I modify a database, which
  in turn modifies the data that my puppet_node_classifier presents. I
  then ssh to the nodes that I want to upgrade and force a puppet run
  with puppetd --server=foo --test --report.

  The problem I'm running into is that on a regular basis a node is
  already in the process of doing an update, and so I get back a message
  like this:

  Lock file /var/lib/puppet/state/puppetdlock exists; skipping catalog run

  I can avoid this in some fashion by detecting this return result and
  re-sshing into the node to run puppetd again, but this doesn't seem
  very elegant. What are other people doing to avoid this sort of
  situation?

  Pete
 


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



[Puppet Users] Re: Array of values for (exec) return?

2009-09-17 Thread Nigel Kersten
On Thu, Sep 17, 2009 at 6:26 AM, John Ingersoll jh.ingers...@gmail.comwrote:

 Hi,

 I have an exec {} that runs a command line script, for which 0 and 1 are
 both good return codes. (Specifically, spamassassin update; 1 means no new
 downloads). I tried

 returns = [0,1],

 but it still reports an error on RC = 1. Are multiple values not
 appropriate here?

 My workaround is to exec a wrapper script that traps '1' and returns 0.



Is this on 0.25.0?

0.24.8 doesn't support multiple return codes, although it would be a trivial
patch to backport.

Another workaround is to or with true that we've done sometimes

command = /usr/bin/foo || true,

but that's more of a sledgehammer than specifying acceptable return codes.



 TIA

 --
 John Ingersoll, Jr.
 Usage: fortune -P [] -a [xsz] [Q: [file]] [rKe9] -v6[+] dataspec ...
 inputdir

 



-- 
Nigel Kersten
nig...@google.com
System Administrator
Google Inc.

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



[Puppet Users] cannot parse template when fact does not exist

2009-09-17 Thread Chris Blumentritt
I receive the following error when trying to do the puppet below:
Failed to parse template s_apache_site/site.conf.erb: Could not find value
for 'ipaddress_eth0_0'

As far as I can tell the ipaddress_eth0_0 fact has to exist on the client
before it will parse.  I was hoping that I could get the new ip address in
place thus creating the fact so that when the apache site is created the
information would be available.  Maybe all facts are compiled at the when
puppetd is run and there is no way to add facts during the run of puppetd?

The way I see around this is to first add the ip address with out calling
the apache::site definition and once the ip address gets on there run puppet
with apache::site definition.  There has got to be better way, any
suggestions

The reason I am doing this is I will have an arbitrary number of servers
load balancing a site and since I can keep track of what interface a site is
going to use I can use that to build my apache file.


--

node definition snippet:

ip_address::new{ eth0:0:
  iface = eth0:0,
  ip  = 192.168.0.84,
  netmask= 255.255.255.0,
  gateway= 192.168.0.1,
  iface_type = static,
  before   = Apache2::Site[test.example.com]
}

app_server class snippet:

$ipalias = ipaddress_eth0_0
apache2::site { test.example.com:
  name= test.example.com.conf,
  ensure  = present,
  require  = Apache2::Config[base],
  require  = Ip_address::New[eth0:0],
  content = template(s_apache_site/site.conf.erb),
  notify= Exec[reload-apache2]
}


erb snippet:
VirtualHost %= eval(ipalias) -%:80
---


Chris

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



[Puppet Users] puppetd --server and server option in puppetd.conf

2009-09-17 Thread David Sowder

I'm in the process of upgrading a bunch of our Puppet clients from 0.22.4 to 
0.24.8 after recently upgrading our puppetmaster similarly.

I've run into a problem that seems like it'd be so likely seen by someone else 
that if the problem isn't local, I'd be somewhat surprised, yet at the same 
time, my install is simply a locally compiled copy of a source RPM from 
Fedora's EPEL project IIRC (from the .spec file changelog: Mon Mar 23 2009 
Todd Zullinger t...@pobox.com - 0.24.8-1.1).

The client is a RHEL 5 x86_64 box and the issue seems to boil down to --server 
puppet.uta.edu not working as a command-line argument to /usr/sbin/puppetd 
(with no complaint about an unknown argument like it does with --Server 
puppet.uta.edu) but working fine if I specify a server = puppet.uta.edu line 
in my /etc/puppet/puppetd.conf file.  It looks like there is some sort of 
systematic problem since both --genconfig and --configprint all don't seem 
to have any effect.

An example of --server failing to recognized:

# /usr/sbin/puppetd --server puppet.uta.edu --test
warning: Certificate validation failed; consider using the certname 
configuration option
err: Could not retrieve catalog: Certificates were not trusted: hostname not 
match with the server certificate (hostname: puppet  CNs: puppet.uta.edu, )
warning: Not using cache on failed catalog
#

(The stuff in parenthesis at the end was a local hack I made to 
/usr/lib/ruby/1.8/openssl/ssl.rb when trying to track down the issue.)

/usr/sbin/puppetd --test --configprint all gives the same output as above.

Any ideas on what I may have screwed up that causes these command-line options 
to be ignored?  --test is not ignored, so it might have something to do with 
how the options are defined.

-- 
David R. Sowder, Linux Systems Admin (Software Systems Specialist II)
Office of Information Technology, University of Texas at Arlington
Work: 817-272-1081  dav...@uta.eduhttp://www.uta.edu/
dav...@talk.uta.edu (Jabber)
Personal:   da...@sowder.com  http://david.sowder.com/


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



[Puppet Users] Re: Best Practices Rewrite - First Draft

2009-09-17 Thread Julian Simpson

I would have assumed that you'd always want to qualify the module
names as the best practise.  Collisions in namespaces wreak havoc in
many other domains.  I'm thinking of Java class names being bound to
domain names as an approach that works elsewhere.

Am I being naive?

Best

Julian

2009/9/17 Peter Meier peter.me...@immerda.ch:

 Hi

 I think that would be terrible.  Having two different paths for the
 same namespace is confusing and will easily lead to problems.

 yeah I feel more this way as well.

 However, the example you give is correct: you can't have the same
 module name in two modulepaths and usually want to prefix the
 classnames to avoid name collisions.

 so for the Best Practises:

 If we do multiple sources for a file (and I do that a lot, as it makes
 puppet so flexible) what would you prefer?

 in module foobar and the 0.25 way:

 file{'/tmp/a':
  source = [ puppet:///files/foobar/${fqdn}/a,
              puppet:///files/foobar/a,
              puppet:///modules/foobar/${operatingsystem}/a,
              puppet:///modules/foobar/a ],
 }

 or

 file{'/tmp/a':
  source = [ puppet:///modules/site-foobar/${fqdn}/a,
              puppet:///modules/site-foobar/a,
              puppet:///modules/foobar/${operatingsystem}/a,
              puppet:///modules/foobar/a ],
 }

 ???

 cheers pete

 




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

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



[Puppet Users] Re: puppetd --server and server option in puppetd.conf

2009-09-17 Thread Neil Prockter

puppetd.conf is no more, use puppet.conf

Many people have had the same confusing situation with --noop being
similarly ignored.

Neil
David Sowder wrote:
 I'm in the process of upgrading a bunch of our Puppet clients from 0.22.4 to 
 0.24.8 after recently upgrading our puppetmaster similarly.
 
 I've run into a problem that seems like it'd be so likely seen by someone 
 else that if the problem isn't local, I'd be somewhat surprised, yet at the 
 same time, my install is simply a locally compiled copy of a source RPM from 
 Fedora's EPEL project IIRC (from the .spec file changelog: Mon Mar 23 2009 
 Todd Zullinger t...@pobox.com - 0.24.8-1.1).
 
 The client is a RHEL 5 x86_64 box and the issue seems to boil down to 
 --server puppet.uta.edu not working as a command-line argument to 
 /usr/sbin/puppetd (with no complaint about an unknown argument like it does 
 with --Server puppet.uta.edu) but working fine if I specify a server = 
 puppet.uta.edu line in my /etc/puppet/puppetd.conf file.  It looks like 
 there is some sort of systematic problem since both --genconfig and 
 --configprint all don't seem to have any effect.
 
 An example of --server failing to recognized:
 
 # /usr/sbin/puppetd --server puppet.uta.edu --test
 warning: Certificate validation failed; consider using the certname 
 configuration option
 err: Could not retrieve catalog: Certificates were not trusted: hostname not 
 match with the server certificate (hostname: puppet  CNs: puppet.uta.edu, )
 warning: Not using cache on failed catalog
 #
 
 (The stuff in parenthesis at the end was a local hack I made to 
 /usr/lib/ruby/1.8/openssl/ssl.rb when trying to track down the issue.)
 
 /usr/sbin/puppetd --test --configprint all gives the same output as above.
 
 Any ideas on what I may have screwed up that causes these command-line 
 options to be ignored?  --test is not ignored, so it might have something 
 to do with how the options are defined.
 


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



[Puppet Users] is factsync gone?

2009-09-17 Thread Allan Marcus

ok, i'm late to the party, but is factsync gone? Seems to be  
deprecated. Do I need to update the client puppet.conf files and  
change factsync = true to pluginsync = true?

If factsync is gone, then --gencongif should be updated

---
Thanks,

Allan Marcus
505-667-5666




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



[Puppet Users] help please

2009-09-17 Thread Thomas Bellman

jcbollinger wrote:

 I don't think puppet supports dependencies between defined type
 invocations -- at least, not the way you seem to expect.  This makes
 sense to me when I consider that although defined types look a lot
 like classes, they are not singletons and they function essentially as
 macros. 

You are wrong.  Puppet *does* allow you to do 'before = Foo[x]',
where 'foo' is a definition.  No problem at all.

No, the real problem Allan Marcus has, is that he has specified
a dependency for a pkgdmg_install resource that is never defined.
There is no pkgdmg_install stansa for Office2008-1211UpdateEN.dmg.
I suspect he really meant Office2008-1221UpdateEN.dmg instead
(note: 1221, not 1211).


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



[Puppet Users] Re: help please

2009-09-17 Thread Allan Marcus

doh!  1221 1211 - they look so similar!

thanks.


---
Thanks,

Allan Marcus
505-667-5666



On Sep 17, 2009, at 4:02 PM, Thomas Bellman wrote:


 jcbollinger wrote:

 I don't think puppet supports dependencies between defined type
 invocations -- at least, not the way you seem to expect.  This makes
 sense to me when I consider that although defined types look a lot
 like classes, they are not singletons and they function essentially  
 as
 macros.

 You are wrong.  Puppet *does* allow you to do 'before = Foo[x]',
 where 'foo' is a definition.  No problem at all.

 No, the real problem Allan Marcus has, is that he has specified
 a dependency for a pkgdmg_install resource that is never defined.
 There is no pkgdmg_install stansa for Office2008-1211UpdateEN.dmg.
 I suspect he really meant Office2008-1221UpdateEN.dmg instead
 (note: 1221, not 1211).


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



[Puppet Users] Re: is factsync gone?

2009-09-17 Thread James Turnbull

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Allan Marcus wrote:
 ok, i'm late to the party, but is factsync gone? Seems to be  
 deprecated. Do I need to update the client puppet.conf files and  
 change factsync = true to pluginsync = true?

Allan

It's deprecated not removed.  You should move to pluginsync but
until then factsync works fine.

Regards

James Turnbull

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

iQEVAwUBSrK42iFa/lDkFHAyAQKZXwf/a1NYQ1gEnbD6EHdJnev1DgTrOeRBprMo
nV3esphLEdNOEuJNzw4ER/uH4Le2Ej0tMO2cjIAA3PJdDuMk119Now0Won3qCVjN
ZLGCDrAEoPfI/Sob2CBp80BA5PsvMktHatkDAdKRIB7JDQ9600gfE/wCe3zXTjU8
RfrU/pAoW6rYu8DFzNWvhmcivp8eRhfvRf6aEsxkN75Thsq7kpN+89E3xrg1SA6B
2opqIU/hyoHYReTW+bvg5e5egTnupQsC4FnXm3uq7uqksYeo/yzc2XsqfF+EMgpA
ai1U+pxd6jv2HMx6FP6P9mricfXClallrKR+xQYtzUO7DKGyKjJpeA==
=Nj8G
-END PGP SIGNATURE-

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



[Puppet Users] testing branch using passenger

2009-09-17 Thread Dave O

I am trying to setup two branches on my puppet server.

/etc/puppet will be the production one
/etc/puppet.testing will be testing.

I have everything working except when on a client I run

puppetd --test --masterport=8141 (which is the testing one) it will
use
/etc/puppet.testing/manifests/nodes.pp

but when it pulls the packages in it uses the production aka

/etc/puppet/modules/sudo/files/sudoers instead of /etc/puppet.testing/
modules/sudo/files/sudoers

my thoughts are its in the config.ru somewhere but this is the file I
dont fully understand.  Both my test and production are the same and
there is a copy below.




#/etc/puppet.testing/puppetmasterd/config.ru

# This file is mostly based on puppetmasterd, which is part of
# the standard puppet distribution.

require 'rack'
require 'puppet'
require 'puppet/network/http_server/rack'

# startup code stolen from bin/puppetmasterd
Puppet.parse_config
Puppet::Util::Log.level = :info
Puppet::Util::Log.newdestination(:syslog)
# A temporary solution, to at least make the master work for now.
Puppet::Node::Facts.terminus_class = :yaml
# Cache our nodes in yaml.  Currently not configurable.
Puppet::Node.cache_class = :yaml


# The list of handlers running inside this puppetmaster
handlers = {
:Status = {},
:FileServer = {},
:Master = {},
:CA = {},
:FileBucket = {},
:Report = {}
}

# Fire up the Rack-Server instance
server = Puppet::Network::HTTPServer::Rack.new(handlers)

# prepare the rack app
app = proc do |env|
server.process(env)
end

# Go.
run app

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



[Puppet Users] Re: testing branch using passenger

2009-09-17 Thread Dave Owens
I figured out what I was missing.  In the /etc/puppet.conf I added  [main]
manifest   = /etc/puppet/manifests/site.ppmodulepath =
/etc/puppet/modules

[testing]
manifest   = /etc/puppet.testing/manifests/site.pp
modulepath = /etc/puppet.testing/modules

and then I used

puppetd --environment=testing --masterport=8141 --test

Everything is working now.

On Thu, Sep 17, 2009 at 6:11 PM, Dave O d.e.ow...@gmail.com wrote:

 I am trying to setup two branches on my puppet server.

 /etc/puppet will be the production one
 /etc/puppet.testing will be testing.

 I have everything working except when on a client I run

 puppetd --test --masterport=8141 (which is the testing one) it will
 use
 /etc/puppet.testing/manifests/nodes.pp

 but when it pulls the packages in it uses the production aka

 /etc/puppet/modules/sudo/files/sudoers instead of /etc/puppet.testing/
 modules/sudo/files/sudoers

 my thoughts are its in the config.ru somewhere but this is the file I
 dont fully understand.  Both my test and production are the same and
 there is a copy below.




 #/etc/puppet.testing/puppetmasterd/config.ru

 # This file is mostly based on puppetmasterd, which is part of
 # the standard puppet distribution.

 require 'rack'
 require 'puppet'
 require 'puppet/network/http_server/rack'

 # startup code stolen from bin/puppetmasterd
 Puppet.parse_config
 Puppet::Util::Log.level = :info
 Puppet::Util::Log.newdestination(:syslog)
 # A temporary solution, to at least make the master work for now.
 Puppet::Node::Facts.terminus_class = :yaml
 # Cache our nodes in yaml.  Currently not configurable.
 Puppet::Node.cache_class = :yaml


 # The list of handlers running inside this puppetmaster
 handlers = {
:Status = {},
:FileServer = {},
:Master = {},
:CA = {},
:FileBucket = {},
:Report = {}
 }

 # Fire up the Rack-Server instance
 server = Puppet::Network::HTTPServer::Rack.new(handlers)

 # prepare the rack app
 app = proc do |env|
server.process(env)
 end

 # Go.
 run app


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