Re: [Puppet Users] Re: error running puppetrun

2010-12-10 Thread Iain Sutton
Hi,

Nothing has changed in your puppet config?

Seems that this problem has appeared before:
http://www.mail-archive.com/puppet-users@googlegroups.com/msg06477.html

Not sure if this applies in your situation though...

Cheers,

Iain

On 8 December 2010 16:59, Himanshu Raina dopedoxy...@gmail.com wrote:

 Hi,

 The cpu is hardly busy. I'm not clear on the network part though cause
 DNS resolutions and n/w connectivity everything's fine. It's just that
 out of the blue had this problem.

 regards,

 On Wed, Dec 8, 2010 at 6:58 AM, Iain Sutton iainsut...@gmail.com wrote:
  We experience this problem too. Our puppetmaster is overloaded (was fine
  until we enabled storeconfigs against a mysql server on the same host,
 now
  it's CPU bound, but we're okay with this for the short term).
 
  Do you have something chewing CPU on your systems?
 
  On 8 December 2010 00:07, James Louis jgloui...@gmail.com wrote:
 
  I'm kind of new at all this too but has something been changed recently
 on
  the server(s) or the network? It looks like there might be a problem
 with
  accessing network information.
 
  On Tue, Dec 7, 2010 at 5:35 AM, Himanshu Raina dopedoxy...@gmail.com
  wrote:
 
  Hi,
 
  Is there anyone who can help in this regard ??
 
  On Mon, Dec 6, 2010 at 7:00 PM, Himanshu Raina dopedoxy...@gmail.com
  wrote:
   Hi,
  
   Any help in this regard would be appreciated. Also, when I run the
   puppetmasterd
   with --verbose --no-daemonize --debug mode I get the following output
  
   debug: Creating default schedules
   debug:
  
 /Settings[/etc/puppet/puppet.conf]/Settings[puppetmasterd]/File[/etc/puppet/manifests/site.pp]:
   Autorequiring File[/etc/puppet/manifests
   ]
   debug: Finishing transaction -607314048 with 0 changes
   info: Listening on port 8140
   notice: Starting Puppet server version 0.24.8
   debug: Overriding :::192.168.2.2 with cert name 192.168.2.2
   debug: Allowing authenticated client 192.168.2.2(:::192.168.2.2)
   access to puppetmaster.getconfig
   debug: Our client is remote
   info: Expiring the node cache of 192.168.2.2
   warning: Could not retrieve fact ipaddress
   warning: Could not retrieve fact fqdn
   err: Could not call: Could not find terminus plain for indirection
 node
  
   regards,
  
   On Mon, Dec 6, 2010 at 4:43 PM, dopedoxygen dopedoxy...@gmail.com
   wrote:
   Hi,
  
   I have been getting the below error for sometime now. Both master
 and
   client are using version 0.24.8.
  
   Output from /var/log/messages
  
   err: Could not call puppetmaster.getconfig: ##Class:0xb7b50a9c:
   execution expired
   err: Could not retrieve catalog: execution expired
  
  
   P.S- all of this was working absolutely fine and suddenly has
 started
   to misbehave.
  
   Regards,
  
  
 
  --
  You received this message because you are subscribed to the Google
 Groups
  Puppet Users group.
  To post to this group, send email to puppet-us...@googlegroups.com.
  To unsubscribe from this group, send email to
  puppet-users+unsubscr...@googlegroups.compuppet-users%2bunsubscr...@googlegroups.com
 .
  For more options, visit this group at
  http://groups.google.com/group/puppet-users?hl=en.
 
 
 
 
  --
  “Twenty years from now you will be more disappointed by the things that
  you didn’t do than by the ones you did do. So throw off the bowlines.
 Sail
  away from the safe harbor. Catch the trade winds in your sails. Explore.
  Dream. Discover.”
  – Mark Twain
 
  --
  You received this message because you are subscribed to the Google
 Groups
  Puppet Users group.
  To post to this group, send email to puppet-us...@googlegroups.com.
  To unsubscribe from this group, send email to
  puppet-users+unsubscr...@googlegroups.compuppet-users%2bunsubscr...@googlegroups.com
 .
  For more options, visit this group at
  http://groups.google.com/group/puppet-users?hl=en.
 
  --
  You received this message because you are subscribed to the Google Groups
  Puppet Users group.
  To post to this group, send email to puppet-us...@googlegroups.com.
  To unsubscribe from this group, send email to
  puppet-users+unsubscr...@googlegroups.compuppet-users%2bunsubscr...@googlegroups.com
 .
  For more options, visit this group at
  http://groups.google.com/group/puppet-users?hl=en.
 

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



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 

Re: [Puppet Users] Re: error running puppetrun

2010-12-10 Thread James Louis
Have you tried to run with --debug?

On Tue, Dec 7, 2010 at 11:59 PM, Himanshu Raina dopedoxy...@gmail.comwrote:

 Hi,

 The cpu is hardly busy. I'm not clear on the network part though cause
 DNS resolutions and n/w connectivity everything's fine. It's just that
 out of the blue had this problem.

 regards,

 On Wed, Dec 8, 2010 at 6:58 AM, Iain Sutton iainsut...@gmail.com wrote:
  We experience this problem too. Our puppetmaster is overloaded (was fine
  until we enabled storeconfigs against a mysql server on the same host,
 now
  it's CPU bound, but we're okay with this for the short term).
 
  Do you have something chewing CPU on your systems?
 
  On 8 December 2010 00:07, James Louis jgloui...@gmail.com wrote:
 
  I'm kind of new at all this too but has something been changed recently
 on
  the server(s) or the network? It looks like there might be a problem
 with
  accessing network information.
 
  On Tue, Dec 7, 2010 at 5:35 AM, Himanshu Raina dopedoxy...@gmail.com
  wrote:
 
  Hi,
 
  Is there anyone who can help in this regard ??
 
  On Mon, Dec 6, 2010 at 7:00 PM, Himanshu Raina dopedoxy...@gmail.com
  wrote:
   Hi,
  
   Any help in this regard would be appreciated. Also, when I run the
   puppetmasterd
   with --verbose --no-daemonize --debug mode I get the following output
  
   debug: Creating default schedules
   debug:
  
 /Settings[/etc/puppet/puppet.conf]/Settings[puppetmasterd]/File[/etc/puppet/manifests/site.pp]:
   Autorequiring File[/etc/puppet/manifests
   ]
   debug: Finishing transaction -607314048 with 0 changes
   info: Listening on port 8140
   notice: Starting Puppet server version 0.24.8
   debug: Overriding :::192.168.2.2 with cert name 192.168.2.2
   debug: Allowing authenticated client 192.168.2.2(:::192.168.2.2)
   access to puppetmaster.getconfig
   debug: Our client is remote
   info: Expiring the node cache of 192.168.2.2
   warning: Could not retrieve fact ipaddress
   warning: Could not retrieve fact fqdn
   err: Could not call: Could not find terminus plain for indirection
 node
  
   regards,
  
   On Mon, Dec 6, 2010 at 4:43 PM, dopedoxygen dopedoxy...@gmail.com
   wrote:
   Hi,
  
   I have been getting the below error for sometime now. Both master
 and
   client are using version 0.24.8.
  
   Output from /var/log/messages
  
   err: Could not call puppetmaster.getconfig: ##Class:0xb7b50a9c:
   execution expired
   err: Could not retrieve catalog: execution expired
  
  
   P.S- all of this was working absolutely fine and suddenly has
 started
   to misbehave.
  
   Regards,
  
  
 
  --
  You received this message because you are subscribed to the Google
 Groups
  Puppet Users group.
  To post to this group, send email to puppet-us...@googlegroups.com.
  To unsubscribe from this group, send email to
  puppet-users+unsubscr...@googlegroups.compuppet-users%2bunsubscr...@googlegroups.com
 .
  For more options, visit this group at
  http://groups.google.com/group/puppet-users?hl=en.
 
 
 
 
  --
  “Twenty years from now you will be more disappointed by the things that
  you didn’t do than by the ones you did do. So throw off the bowlines.
 Sail
  away from the safe harbor. Catch the trade winds in your sails. Explore.
  Dream. Discover.”
  – Mark Twain
 
  --
  You received this message because you are subscribed to the Google
 Groups
  Puppet Users group.
  To post to this group, send email to puppet-us...@googlegroups.com.
  To unsubscribe from this group, send email to
  puppet-users+unsubscr...@googlegroups.compuppet-users%2bunsubscr...@googlegroups.com
 .
  For more options, visit this group at
  http://groups.google.com/group/puppet-users?hl=en.
 
  --
  You received this message because you are subscribed to the Google Groups
  Puppet Users group.
  To post to this group, send email to puppet-us...@googlegroups.com.
  To unsubscribe from this group, send email to
  puppet-users+unsubscr...@googlegroups.compuppet-users%2bunsubscr...@googlegroups.com
 .
  For more options, visit this group at
  http://groups.google.com/group/puppet-users?hl=en.
 

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




-- 
“Twenty years from now you will be more disappointed by the things that you
didn’t do than by the ones you did do. So throw off the bowlines. Sail away
from the safe harbor. Catch the trade winds in your sails. Explore. Dream.
Discover.”
– Mark Twain

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more 

[Puppet Users] Re: Could not evaluate: 'test' is not executable

2010-12-10 Thread luke.bigum
Thanks for the suggestion Patrick, it led me to the cause of the
problem :)

I wrote a very simple local test manifest to emulate the Exec problem
with 'puppet apply' and it still occurred. Out of pure habit, I often
execute 'ls -l' when I switch between terminals (so I know where I am)
and noticed that in /root on the server in question there was an empty
file called 'grep'... Removing this stray file and puppet now runs
fine :)

It seems that something to do with Ruby's FileTest module is
searching ./ before the specified Path in the exec resource, thus
finding a non executable 'grep' in CWD and complaining that it's not
executable. The touching of exec.rb was a red herring as I was
changing into the Ruby lib directory before hand :)

This doesn't appear to affect the actual execution of commands, so
don't be worried about the wrong commands being executed based on the
CWD of Puppet.

I've raised a bug for this: http://projects.puppetlabs.com/issues/5495

On Dec 9, 6:17 pm, Patrick kc7...@gmail.com wrote:
 On Dec 9, 2010, at 9:14 AM, luke.bigum wrote:

  Interesting, I've noticed that puppet runs triggered from a daemonised
  puppetd aren't affected by the problem (as Dashboard and /var/log/
  messages says their is no errors), but when run from the command line
  as puppetd --test it fails as usual for me:

  err: /Stage[main]/Fh_freetds/Exec[change /etc/freetds.conf version]:
  Could not evaluate: 'grep' is not executable

  Can't spot any difference in the environments so far.

 Here's something to try, can you reproduce this problem using the local 
 puppet program that directly evaluates the manifest.  Not the client 
 puppetd.  If so, that's a lot less code you've narrowed to down to.

  On Dec 9, 4:42 pm, luke.bigum luke.bi...@fasthosts.co.uk wrote:
  Hi Rudy,

  I'm not sure if you fixed this yet, but I ran into the same problem
  using grep in an unless parameter of an exec resource.

  I went looking through the Ruby code, in /usr/lib/ruby/site_ruby/1.8/
  puppet/type/exec.rb on line 571. I changed these four lines:

        unless FileTest.executable?(exe)
          raise ArgumentError,
            '#{exe}' is not executable
        end

  To just a single line like the one above:

        raise ArgumentError, '#{exe}' is not executable unless
  FileTest.executable?(exe)

  And then Puppet stopped complaining. I thought this doesn't make any
  sense at all, so I changed it back... Puppet still worked. I removed
  and reinstalled the RPM, Puppet is back to complaining about grep not
  being executable. I then just touched exec.rb and the problem is
  magically fixed again.

  I don't know very much about Ruby, so I'm just going to back away
  very, very slowly, arms raised in the air to ward off evil ;)

  But seriously, is there a Ruby guru who might know what's going on
  here? I can even reproduce the issue by uninstalling and reinstalling
  the puppet RPM - not sure how long it's going to stay broken though,
  we'll see.

  -Luke

  On Dec 2, 10:30 am, Rudy Gevaert rudy.geva...@gmail.com wrote:

  Hi

  I'm seeing a strange thing here.  I only have this on one machine!  3
  others that are 'identical' don't have that issue...

  err: /Stage[main]/Vim/Exec[update-alternatives --set editor /usr/bin/
  vim.basic]: Could not evaluate: 'test' is not executable

  class vim{

    $vim_package= vim

    package {
      $vim_package:
        ensure = installed,
        provider = $operatingsystem ? {
          Solaris = 'pkgutil',
          default = undef
        }
    }

    case $operatingsystem{
      Debian: {
        exec { update-alternatives --set editor /usr/bin/vim.basic:
          path = /bin:/sbin:/usr/bin:/usr/sbin,
          unless = test /etc/alternatives/editor -ef /usr/bin/
  vim.basic
        }
      }
    }

  }

  Manual output:

  r...@cyrprd1:~# puppet agent --test
  info: Retrieving plugin
  info: Loading facts in ugentinfo
  info: Loading facts in configured_ntp_servers
  info: Loading facts in ugentinfo
  info: Loading facts in configured_ntp_servers
  info: Caching catalog for cyrprd1.ugent.be
  info: Applying configuration version '1291285388'
  notice: /Stage[main]/Debian_os/Exec[apt-get-update]/returns: executed
  successfully
  notice: /Stage[main]/Mailstore/Package[cyrus-ugent]/ensure: ensure
  changed '0.1-33' to '0.1-34'
  err: /Stage[main]/Vim/Exec[update-alternatives --set editor /usr/bin/
  vim.basic]: Could not evaluate: 'test' is not executable
  notice: Finished catalog run in 7.66 seconds

  r...@cyrprd1:~# test /etc/alternatives/editor -ef /usr/bin/vim.basic
  r...@cyrprd1:~# which test
  /usr/bin/test
  r...@cyrprd1:~# ls -l /usr/bin/test
  -rwxr-xr-x 1 root root 30136 Apr 28  2010 /usr/bin/test
  r...@cyrprd1:~#

  --
  You received this message because you are subscribed to the Google Groups 
  Puppet Users group.
  To post to this group, send email to puppet-us...@googlegroups.com.
  To unsubscribe from this group, send email to 
  

[Puppet Users] variables with no value

2010-12-10 Thread Arnau Bria
Hi all,

We'd like to share a class, and do something like:

class common_defaults {
[...]
 user { 'root':
   ensure  = present,
   password= $root_password ? {
  'serviceA'= 'passwdA',
  default   = 'passwdB',
 },
[...]
}

$root_passwd  only has value if someone has defined it. So, i.e:

nodes.pp 
nodea {
$root_passwd=serviceA
include common_defaults
}

nodeb {
include common_defaults
}


so, we'd like nodea to has passwdA and nodeb to have the default value
passwdB. I've tried with default and '' empty var, but I does not works
neither.

When I run the client in nodeb, and add a notify of root_password, I see
that nodeb's root_password has a value and it's serviceA!?!?

I'm quite lost here, I've been reading variable scope section in
puppet's doc, but it talks about class inheritance, not class
including. I don't understand why the var has a value, I've not found
any ref about value of not defined varibales.

Could anyone give a hand on this?

TIA,
Arnau

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



Re: [Puppet Users] variables with no value

2010-12-10 Thread Felix Frank
 nodes.pp 
 nodea {
   $root_passwd=serviceA
   include common_defaults
 }
 
 nodeb {
   include common_defaults
 }

Hi,

could you be a little less cryptic about the node definitions? (I
understand there may be privacy issues, but the above is censored too
drastically.)

Is it possible they overlap in some way?

Cheers,
Felix

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



Re: [Puppet Users] Re: Could not evaluate: 'test' is not executable

2010-12-10 Thread Patrick

On Dec 10, 2010, at 2:34 AM, luke.bigum wrote:

 Thanks for the suggestion Patrick, it led me to the cause of the
 problem :)
 
 I wrote a very simple local test manifest to emulate the Exec problem
 with 'puppet apply' and it still occurred. Out of pure habit, I often
 execute 'ls -l' when I switch between terminals (so I know where I am)
 and noticed that in /root on the server in question there was an empty
 file called 'grep'... Removing this stray file and puppet now runs
 fine :)
 
 It seems that something to do with Ruby's FileTest module is
 searching ./ before the specified Path in the exec resource, thus
 finding a non executable 'grep' in CWD and complaining that it's not
 executable. The touching of exec.rb was a red herring as I was
 changing into the Ruby lib directory before hand :)
 
 This doesn't appear to affect the actual execution of commands, so
 don't be worried about the wrong commands being executed based on the
 CWD of Puppet.

Except it might be.  Puppet might have been trying to execute the file and then 
failing because the permissions were 644 instead of 755.

 I've raised a bug for this: http://projects.puppetlabs.com/issues/5495
 
 On Dec 9, 6:17 pm, Patrick kc7...@gmail.com wrote:
 On Dec 9, 2010, at 9:14 AM, luke.bigum wrote:
 
 Interesting, I've noticed that puppet runs triggered from a daemonised
 puppetd aren't affected by the problem (as Dashboard and /var/log/
 messages says their is no errors), but when run from the command line
 as puppetd --test it fails as usual for me:
 
 err: /Stage[main]/Fh_freetds/Exec[change /etc/freetds.conf version]:
 Could not evaluate: 'grep' is not executable
 
 Can't spot any difference in the environments so far.
 
 Here's something to try, can you reproduce this problem using the local 
 puppet program that directly evaluates the manifest.  Not the client 
 puppetd.  If so, that's a lot less code you've narrowed to down to.
 
 On Dec 9, 4:42 pm, luke.bigum luke.bi...@fasthosts.co.uk wrote:
 Hi Rudy,
 
 I'm not sure if you fixed this yet, but I ran into the same problem
 using grep in an unless parameter of an exec resource.
 
 I went looking through the Ruby code, in /usr/lib/ruby/site_ruby/1.8/
 puppet/type/exec.rb on line 571. I changed these four lines:
 
   unless FileTest.executable?(exe)
 raise ArgumentError,
   '#{exe}' is not executable
   end
 
 To just a single line like the one above:
 
   raise ArgumentError, '#{exe}' is not executable unless
 FileTest.executable?(exe)
 
 And then Puppet stopped complaining. I thought this doesn't make any
 sense at all, so I changed it back... Puppet still worked. I removed
 and reinstalled the RPM, Puppet is back to complaining about grep not
 being executable. I then just touched exec.rb and the problem is
 magically fixed again.
 
 I don't know very much about Ruby, so I'm just going to back away
 very, very slowly, arms raised in the air to ward off evil ;)
 
 But seriously, is there a Ruby guru who might know what's going on
 here? I can even reproduce the issue by uninstalling and reinstalling
 the puppet RPM - not sure how long it's going to stay broken though,
 we'll see.
 
 -Luke
 
 On Dec 2, 10:30 am, Rudy Gevaert rudy.geva...@gmail.com wrote:
 
 Hi
 
 I'm seeing a strange thing here.  I only have this on one machine!  3
 others that are 'identical' don't have that issue...
 
 err: /Stage[main]/Vim/Exec[update-alternatives --set editor /usr/bin/
 vim.basic]: Could not evaluate: 'test' is not executable
 
 class vim{
 
   $vim_package= vim
 
   package {
 $vim_package:
   ensure = installed,
   provider = $operatingsystem ? {
 Solaris = 'pkgutil',
 default = undef
   }
   }
 
   case $operatingsystem{
 Debian: {
   exec { update-alternatives --set editor /usr/bin/vim.basic:
 path = /bin:/sbin:/usr/bin:/usr/sbin,
 unless = test /etc/alternatives/editor -ef /usr/bin/
 vim.basic
   }
 }
   }
 
 }
 
 Manual output:
 
 r...@cyrprd1:~# puppet agent --test
 info: Retrieving plugin
 info: Loading facts in ugentinfo
 info: Loading facts in configured_ntp_servers
 info: Loading facts in ugentinfo
 info: Loading facts in configured_ntp_servers
 info: Caching catalog for cyrprd1.ugent.be
 info: Applying configuration version '1291285388'
 notice: /Stage[main]/Debian_os/Exec[apt-get-update]/returns: executed
 successfully
 notice: /Stage[main]/Mailstore/Package[cyrus-ugent]/ensure: ensure
 changed '0.1-33' to '0.1-34'
 err: /Stage[main]/Vim/Exec[update-alternatives --set editor /usr/bin/
 vim.basic]: Could not evaluate: 'test' is not executable
 notice: Finished catalog run in 7.66 seconds
 
 r...@cyrprd1:~# test /etc/alternatives/editor -ef /usr/bin/vim.basic
 r...@cyrprd1:~# which test
 /usr/bin/test
 r...@cyrprd1:~# ls -l /usr/bin/test
 -rwxr-xr-x 1 root root 30136 Apr 28  2010 /usr/bin/test
 r...@cyrprd1:~#
 
 --
 You received this message because you are subscribed to the Google Groups 
 Puppet 

Re: [Puppet Users] variables with no value

2010-12-10 Thread Arnau Bria
On Fri, 10 Dec 2010 11:43:59 +0100
Felix Frank wrote:

  nodes.pp 
  nodea {
  $root_passwd=serviceA
  include common_defaults
  }
  
  nodeb {
  include common_defaults
  }
 
 Hi,
Hi,
 
 could you be a little less cryptic about the node definitions? (I
 understand there may be privacy issues, but the above is censored too
 drastically.) 
 Is it possible they overlap in some way?

Each node has its own classes, and they share 3, but only one
(that one) has a variable. So, each node have other includes,
but they don't overlap, diff services, diff classes.

We could simply as my previously example.
is the selctor correct?

   password= $root_password ? {
  'serviceA'= 'passwdA',
  default   = 'passwdB',
 },

I mean, the default has any sense? if not default but ''? 
because if that selcetor should work, the problem is somewhere else and
we must carefully check our includes.

 Cheers,
 Felix
Cheers,
Arnau 

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



Re: [Puppet Users] variables with no value

2010-12-10 Thread Felix Frank

 We could simply as my previously example.
 is the selctor correct?
 
password= $root_password ? {
   'serviceA'= 'passwdA',
   default   = 'passwdB',
  },
 
 I mean, the default has any sense? if not default but ''? 
 because if that selcetor should work, the problem is somewhere else and
 we must carefully check our includes.

The selector looks fine. You stated that your notify showed that nodeB
uses a variable value it should not use.

Break the manifests down to the most simple subset that shows this
misbehaviour, then post that. (But you will probably stumble upon an
error in the process, anyway.)

Cheers,
Felix

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



[Puppet Users] Re: Could not evaluate: 'test' is not executable

2010-12-10 Thread luke.bigum
  This doesn't appear to affect the actual execution of commands, so
  don't be worried about the wrong commands being executed based on the
  CWD of Puppet.

 Except it might be.  Puppet might have been trying to execute the file and 
 then failing because the permissions were 644 instead of 755.

I thought of that and put a script in ./grep to touch another file to
see if it would be executed instead of the grep that is in the Exec
resource's path. It wasn't so I assume it's something to do with the
Ruby FileTest module 'executable?' method that's not being done right,
the actual command execution obeys the Exec's path as expected. At
least that's what I observed for the bug report.

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



Re: [Puppet Users] Mysql Admin

2010-12-10 Thread Mohit Chawla
On Fri, Dec 10, 2010 at 5:04 PM, Patrick kc7...@gmail.com wrote:

 *) The DB to have a root password.


Use a preseed template.

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



Re: [Puppet Users] variables with no value

2010-12-10 Thread Arnau Bria
On Fri, 10 Dec 2010 12:33:39 +0100
Felix Frank wrote:

 
  We could simply as my previously example.
  is the selctor correct?
  
 password= $root_password ? {
'serviceA'= 'passwdA',
default   = 'passwdB',
   },
  
  I mean, the default has any sense? if not default but ''? 
  because if that selcetor should work, the problem is somewhere else
  and we must carefully check our includes.
 
 The selector looks fine. 
Ok.

 You stated that your notify showed that nodeB
 uses a variable value it should not use.

Yep. But I thought that it could be caused by the selector, cause it's
my first one where default covers non-defined var case.
 
 Break the manifests down to the most simple subset that shows this
 misbehaviour, then post that. (But you will probably stumble upon an
 error in the process, anyway.)

Yep, I'll try the simplest example in my test server and come back.

 Cheers,
 Felix
Many thanks for your reply.
Arnau

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



Re: [Puppet Users] Mysql Admin

2010-12-10 Thread Adam Heinz
On Fri, Dec 10, 2010 at 6:34 AM, Patrick kc7...@gmail.com wrote:

 I'm trying to administer the mysql database on some servers using puppet.
  When I'm done, I want:

 *) The DB to have a root password.
 *) I want to define a few databases, users and grants.

 Any advice what to use?


I've had good success with https://github.com/blt04/puppet-mysql.

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



[Puppet Users] pp grammar test-files?

2010-12-10 Thread Henrik Lindberg
Hi,
I am working on some tools that read and write pp files, and I wonder
if there are some pp files available somewhere that can be used to test
a parser.
I am especially interested in if there are some tests written that
capture invalid syntax.


- henrik

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



Re: [Puppet Users] pp grammar test-files?

2010-12-10 Thread Dan Bode
--parseonly option will catch parsing mistakes.

On Fri, Dec 10, 2010 at 8:00 AM, Henrik Lindberg 
henrik.lindberg.priv...@gmail.com wrote:

 Hi,
 I am working on some tools that read and write pp files, and I wonder if
 there are some pp files available somewhere that can be used to test a
 parser.
 I am especially interested in if there are some tests written that capture
 invalid syntax.

 - henrik

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


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



Re: [Puppet Users] pp grammar test-files?

2010-12-10 Thread Henrik Lindberg

Hi,
I understand that - I wonder if there is a set of pp files available  
for testing the parser.


- henrik

On Dec 10, 2010, at 5:04 PM, Dan Bode wrote:


--parseonly option will catch parsing mistakes.

On Fri, Dec 10, 2010 at 8:00 AM, Henrik Lindberg henrik.lindberg.priv...@gmail.com 
 wrote:

Hi,
I am working on some tools that read and write pp files, and I  
wonder if there are some pp files available somewhere that can be  
used to test a parser.
I am especially interested in if there are some tests written that  
capture invalid syntax.


- henrik

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

To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com 
.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en 
.



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

To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com 
.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en 
.


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



Re: [Puppet Users] pp grammar test-files?

2010-12-10 Thread Felix Frank
On 12/10/2010 05:42 PM, Henrik Lindberg wrote:
 Hi,
 I understand that - I wonder if there is a set of pp files available for
 testing the parser.

http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Patterns

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



Re: [Puppet Users] pp grammar test-files?

2010-12-10 Thread Henrik Lindberg

Thanks,
that is a good starting point. Are the underlying pp files available  
in git by any chance?


- henrik

On Dec 10, 2010, at 5:47 PM, Felix Frank wrote:


On 12/10/2010 05:42 PM, Henrik Lindberg wrote:

Hi,
I understand that - I wonder if there is a set of pp files  
available for

testing the parser.


http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Patterns

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

To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com 
.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en 
.




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



Re: [Puppet Users] pp grammar test-files?

2010-12-10 Thread Felix Frank
On 12/10/2010 05:58 PM, Henrik Lindberg wrote:
 Thanks,
 that is a good starting point. Are the underlying pp files available in
 git by any chance?

If not, wget and a little awk should go a long way...

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



[Puppet Users] Re: some files are getting errors during source = puppet:///...

2010-12-10 Thread Eric Snow
I just tried using the REST API to pull the file metadata and noticed
that the environment is not part of the API for files:

  http://docs.puppetlabs.com/guides/rest_api.html

Does that mean that it will not respect my environments for the
following:

file { 'test':
source = 'puppet:///modules/somemodule/test'
}

If not then which environment from the puppet.conf does it use?
[main]?

Thanks.

-eric

On Dec 9, 8:12 pm, Eric Snow es...@verio.net wrote:
 I get the following error:

 ... Failed to retrieve current state of resource: Could not retrieve
 information from source(s) ...

 My understanding is that the file server had trouble pulling the
 metadata for the file (on the server side).  This could be due to a
 connectivity issue, or a permissions issue.  What other reasons are
 there?  Does the target affect it as well?  Where in the puppet code
 does all this happen?  (for instance that error is coming from type/
 file/source.rb, so what gets to that code?).

 I have verified all my permissions (both of files and directories).
 All the connections are fine.  However, some of my files work fine and
 others do not.  The same files in both cases, every time.

 The files that work are ones that were done back when I had one
 modules directory in my module_path.  However, now I have several.
 The ones that are in modules I have added since I split my modules
 directories are the ones that do not work.  The old ones work even
 though I moved them into the new modules directories.

 This is driving me crazy.  Any thoughts?

 -eric

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



[Puppet Users] yum repository files blank

2010-12-10 Thread Russell Perkins
So I'm using the standard yum module from example42. Every single file
ends up blank on my targets. Do I have a logic error in my file?

Here is my yum/modules/manifests/init.pp - http://pastie.org/1366030

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



[Puppet Users] Re: some files are getting errors during source = puppet:///...

2010-12-10 Thread Eric Snow
So it looks like that doc is misleading.  It would help if there were
a curl example for the API request for files...  As it is, it may be
that the environment is factored in after all.  Still trying to figure
it out.  Any ideas would be great!

-eric

On Dec 10, 11:17 am, Eric Snow es...@verio.net wrote:
 I just tried using the REST API to pull the file metadata and noticed
 that the environment is not part of the API for files:

  http://docs.puppetlabs.com/guides/rest_api.html

 Does that mean that it will not respect my environments for the
 following:

 file { 'test':
     source = 'puppet:///modules/somemodule/test'

 }

 If not then which environment from the puppet.conf does it use?
 [main]?

 Thanks.

 -eric

 On Dec 9, 8:12 pm, Eric Snow es...@verio.net wrote:







  I get the following error:

  ... Failed to retrieve current state of resource: Could not retrieve
  information from source(s) ...

  My understanding is that the file server had trouble pulling the
  metadata for the file (on the server side).  This could be due to a
  connectivity issue, or a permissions issue.  What other reasons are
  there?  Does the target affect it as well?  Where in the puppet code
  does all this happen?  (for instance that error is coming from type/
  file/source.rb, so what gets to that code?).

  I have verified all my permissions (both of files and directories).
  All the connections are fine.  However, some of my files work fine and
  others do not.  The same files in both cases, every time.

  The files that work are ones that were done back when I had one
  modules directory in my module_path.  However, now I have several.
  The ones that are in modules I have added since I split my modules
  directories are the ones that do not work.  The old ones work even
  though I moved them into the new modules directories.

  This is driving me crazy.  Any thoughts?

  -eric

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



Re: [Puppet Users] Mysql Admin

2010-12-10 Thread Patrick

On Dec 10, 2010, at 5:47 AM, Adam Heinz wrote:

 On Fri, Dec 10, 2010 at 6:34 AM, Patrick kc7...@gmail.com wrote:
 I'm trying to administer the mysql database on some servers using puppet.  
 When I'm done, I want:
 
 *) The DB to have a root password.
 *) I want to define a few databases, users and grants.
 
 Any advice what to use?
 
 I've had good success with https://github.com/blt04/puppet-mysql.

How do you set your root password?  Preseeding?  It looks like setting your 
(mysql) root password with that module isn't feasible.

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



Re: [Puppet Users] Howto check if augeas is available

2010-12-10 Thread Patrick

On Dec 9, 2010, at 7:14 AM, Martijn Grendelman wrote:

 I made a small mistake. Please see at the bottom.
 
 On 09-12-10 15:30, Martijn Grendelman wrote:
 An example: add the following to
 
 puppet_path/modules/modulename/lib/facter/augeas_available.rb
 
 -- cut here --
 require 'facter'
 
 Facter.add(augeas_available) do
 
setcode do
 
avail = no
Dir.glob(/usr/lib/libaugeas*) { |filename|
avail = yes
}
avail
end
 end
 -- cut here --
 
 It simple looks for files named /usr/lib/libaugeas*. I am not sure if that
 is appropriate for CentOS too, but it works on Debian. Of course, this is
 no guarantee that the Ruby-bindings are also available, so this is still
 not idiot-proof.
 
 After installing the fact, you can do something like this in a manifest:
 
 if $augeas_availabe {
 
augeas { foo:
}
 
 }
 
 Sorry, that should be:
 
 if $augeas_availabe == yes {
 }
 

I think this one might be better:
https://github.com/camptocamp/puppet-augeas/blob/master/lib/facter/augeasversion.rb

I think it will check if Augeas and the ruby bindings exist.

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



Re: [Puppet Users] Re: Could not evaluate: 'test' is not executable

2010-12-10 Thread Patrick

On Dec 10, 2010, at 3:40 AM, luke.bigum wrote:

 This doesn't appear to affect the actual execution of commands, so
 don't be worried about the wrong commands being executed based on the
 CWD of Puppet.
 
 Except it might be.  Puppet might have been trying to execute the file and 
 then failing because the permissions were 644 instead of 755.
 
 I thought of that and put a script in ./grep to touch another file to
 see if it would be executed instead of the grep that is in the Exec
 resource's path. It wasn't so I assume it's something to do with the
 Ruby FileTest module 'executable?' method that's not being done right,
 the actual command execution obeys the Exec's path as expected. At
 least that's what I observed for the bug report.

Ah.  Nevermind then.

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



Re: [Puppet Users] Mysql Admin

2010-12-10 Thread Justin Brehm
There's an exec in this that sets the root password (line 180).

https://github.com/blt04/puppet-mysql/blob/master/manifests/classes/server.pp


On Fri, Dec 10, 2010 at 3:35 PM, Patrick kc7...@gmail.com wrote:

 On Dec 10, 2010, at 5:47 AM, Adam Heinz wrote:

 On Fri, Dec 10, 2010 at 6:34 AM, Patrick kc7...@gmail.com wrote:

 I'm trying to administer the mysql database on some servers using puppet.
  When I'm done, I want:

 *) The DB to have a root password.
 *) I want to define a few databases, users and grants.

 Any advice what to use?

 I've had good success with https://github.com/blt04/puppet-mysql.

 How do you set your root password?  Preseeding?  It looks like setting your
 (mysql) root password with that module isn't feasible.

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


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



[Puppet Users] Re: some files are getting errors during source = puppet:///...

2010-12-10 Thread Eric Snow
So I got past the confusion.  Here is what the rest_api.html doc
should say (it was missing the underscore) for an example:

  curl -H Accept: yaml 
https://puppetmaster:8140/production/file_metadata/modules/puppet/puppet.conf

As to the problem I am having, I am guessing that I have something
configured incorrectly.  When I send the request via the REST API, the
environment is set correctly to development (for my tests) and the
metadata is pulled correctly.  However, when I do a puppet run it is
using the production environment, where only some of my files live.

So if I pass the --environment flag set to development my problem goes
away.  Why doesn't it use the environment passed from the node
classifier?

-eric

On Dec 10, 12:36 pm, Eric Snow es...@verio.net wrote:
 So it looks like that doc is misleading.  It would help if there were
 a curl example for the API request for files...  As it is, it may be
 that the environment is factored in after all.  Still trying to figure
 it out.  Any ideas would be great!

 -eric

 On Dec 10, 11:17 am, Eric Snow es...@verio.net wrote:







  I just tried using the REST API to pull the file metadata and noticed
  that the environment is not part of the API for files:

   http://docs.puppetlabs.com/guides/rest_api.html

  Does that mean that it will not respect my environments for the
  following:

  file { 'test':
      source = 'puppet:///modules/somemodule/test'

  }

  If not then which environment from the puppet.conf does it use?
  [main]?

  Thanks.

  -eric

  On Dec 9, 8:12 pm, Eric Snow es...@verio.net wrote:

   I get the following error:

   ... Failed to retrieve current state of resource: Could not retrieve
   information from source(s) ...

   My understanding is that the file server had trouble pulling the
   metadata for the file (on the server side).  This could be due to a
   connectivity issue, or a permissions issue.  What other reasons are
   there?  Does the target affect it as well?  Where in the puppet code
   does all this happen?  (for instance that error is coming from type/
   file/source.rb, so what gets to that code?).

   I have verified all my permissions (both of files and directories).
   All the connections are fine.  However, some of my files work fine and
   others do not.  The same files in both cases, every time.

   The files that work are ones that were done back when I had one
   modules directory in my module_path.  However, now I have several.
   The ones that are in modules I have added since I split my modules
   directories are the ones that do not work.  The old ones work even
   though I moved them into the new modules directories.

   This is driving me crazy.  Any thoughts?

   -eric

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



Re: [Puppet Users] Mysql Admin

2010-12-10 Thread Patrick
Thanks.  I didn't see that.

On Dec 10, 2010, at 12:45 PM, Justin Brehm wrote:

 There's an exec in this that sets the root password (line 180).
 
 https://github.com/blt04/puppet-mysql/blob/master/manifests/classes/server.pp
 
 
 On Fri, Dec 10, 2010 at 3:35 PM, Patrick kc7...@gmail.com wrote:
 
 On Dec 10, 2010, at 5:47 AM, Adam Heinz wrote:
 
 On Fri, Dec 10, 2010 at 6:34 AM, Patrick kc7...@gmail.com wrote:
 
 I'm trying to administer the mysql database on some servers using puppet.
  When I'm done, I want:
 
 *) The DB to have a root password.
 *) I want to define a few databases, users and grants.
 
 Any advice what to use?
 
 I've had good success with https://github.com/blt04/puppet-mysql.
 
 How do you set your root password?  Preseeding?  It looks like setting your
 (mysql) root password with that module isn't feasible.
 
 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To post to this group, send email to puppet-us...@googlegroups.com.
 To unsubscribe from this group, send email to
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/puppet-users?hl=en.
 
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-us...@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.
 

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



[Puppet Users] Re: yum repository files blank

2010-12-10 Thread Russell Perkins
got it, it was an issue where it was dropping the base.repo file blank
and then requiring yum-priorities to populate the files.

Russell Perkins wrote:
 So I'm using the standard yum module from example42. Every single file
 ends up blank on my targets. Do I have a logic error in my file?

 Here is my yum/modules/manifests/init.pp - http://pastie.org/1366030

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



[Puppet Users] Re: File not found during puppet fileserving

2010-12-10 Thread Eric Snow
The issue was that I was not passing the --environment flag during my
puppet run.  Apparently it ignores the environment returned by the
external node classifier.  Thanks for all the feedback.

-eric

On Dec 7, 10:15 am, Stefan Schulte stefan.schu...@taunusstein.net
wrote:
 On Mon, Dec 06, 2010 at 03:55:20PM -0800, Eric Snow wrote:
  Thanks for the reply.  The modules mount is okay:

  [modules]
    allow *

 Although a short test with your snippet in my fileserver.conf worked for me:
 can you try again with an empty fileserver.conf?

 -Stefan

  application_pgp-signature_part
  1KViewDownload

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



Re: [Puppet Users] pp grammar test-files?

2010-12-10 Thread Daniel Pittman
On Sat, Dec 11, 2010 at 03:42, Henrik Lindberg
henrik.lindberg.priv...@gmail.com wrote:

 I understand that - I wonder if there is a set of pp files available for
 testing the parser.

Puppet labs don't have a hidden repository of them to use as part of
testing or anything like that.

What I would probably do is head on over to the puppet forge, and
download a whole mess of modules from there.  A bit more searching
will also turn up a few places that have put their entire puppet
configuration - or much of it - online, such as the lab42 collection:
http://projects.puppetlabs.com/projects/1/wiki/Lab42_Infrastructure

Out of curiosity, what are you trying to do with your parser?  Luke
recently posted some notes on the puppet dev group about a portable
subset of the language for use as an interchange format (though I
don't know what subset that would be. :)

Regards,
Daniel
-- 
✣ Daniel Pittman            ✉ dan...@rimspace.net            ☎ +61 401 155 707
              ♽ made with 100 percent post-consumer electrons

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



Re: [Puppet Users] pp grammar test-files?

2010-12-10 Thread James Turnbull
Daniel Pittman wrote:
 On Sat, Dec 11, 2010 at 03:42, Henrik Lindberg
 henrik.lindberg.priv...@gmail.com wrote:
 
 I understand that - I wonder if there is a set of pp files available for
 testing the parser.
 
 Puppet labs don't have a hidden repository of them to use as part of
 testing or anything like that.

I have something that I have been using - but never fleshed out to
completion - like this for testing:

https://github.com/jamtur01/puppet-testing-module

Regards

James

-- 
Puppet Labs - http://www.puppetlabs.com
C: 503-734-8571

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



Re: [Puppet Users] pp grammar test-files?

2010-12-10 Thread Nathan Rich
Don't forget about example42.com

On Fri, Dec 10, 2010 at 3:26 PM, James Turnbull ja...@puppetlabs.comwrote:

 Daniel Pittman wrote:
  On Sat, Dec 11, 2010 at 03:42, Henrik Lindberg
  henrik.lindberg.priv...@gmail.com wrote:
 
  I understand that - I wonder if there is a set of pp files available for
  testing the parser.
 
  Puppet labs don't have a hidden repository of them to use as part of
  testing or anything like that.

 I have something that I have been using - but never fleshed out to
 completion - like this for testing:

 https://github.com/jamtur01/puppet-testing-module

 Regards

 James

 --
 Puppet Labs - http://www.puppetlabs.com
 C: 503-734-8571

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



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



Re: [Puppet Users] Re: File not found during puppet fileserving

2010-12-10 Thread Nigel Kersten
On Fri, Dec 10, 2010 at 12:55 PM, Eric Snow es...@verio.net wrote:
 The issue was that I was not passing the --environment flag during my
 puppet run.  Apparently it ignores the environment returned by the
 external node classifier.  Thanks for all the feedback.

Ahah. I was wondering if you'd perhaps hit that bug.

http://projects.puppetlabs.com/issues/3910

Feel free to watch it to help us prioritize.


 -eric

 On Dec 7, 10:15 am, Stefan Schulte stefan.schu...@taunusstein.net
 wrote:
 On Mon, Dec 06, 2010 at 03:55:20PM -0800, Eric Snow wrote:
  Thanks for the reply.  The modules mount is okay:

  [modules]
    allow *

 Although a short test with your snippet in my fileserver.conf worked for me:
 can you try again with an empty fileserver.conf?

 -Stefan

  application_pgp-signature_part
  1KViewDownload

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





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



Re: [Puppet Users] Re: some files are getting errors during source = puppet:///...

2010-12-10 Thread Nigel Kersten
On Fri, Dec 10, 2010 at 12:50 PM, Eric Snow es...@verio.net wrote:
 So I got past the confusion.  Here is what the rest_api.html doc
 should say (it was missing the underscore) for an example:

  curl -H Accept: yaml 
 https://puppetmaster:8140/production/file_metadata/modules/puppet/puppet.conf

 As to the problem I am having, I am guessing that I have something
 configured incorrectly.  When I send the request via the REST API, the
 environment is set correctly to development (for my tests) and the
 metadata is pulled correctly.  However, when I do a puppet run it is
 using the production environment, where only some of my files live.

 So if I pass the --environment flag set to development my problem goes
 away.  Why doesn't it use the environment passed from the node
 classifier?

I know this got answered in the other thread, but for the purposes of
the archive, the relevant bug is
http://projects.puppetlabs.com/issues/3910




 -eric

 On Dec 10, 12:36 pm, Eric Snow es...@verio.net wrote:
 So it looks like that doc is misleading.  It would help if there were
 a curl example for the API request for files...  As it is, it may be
 that the environment is factored in after all.  Still trying to figure
 it out.  Any ideas would be great!

 -eric

 On Dec 10, 11:17 am, Eric Snow es...@verio.net wrote:







  I just tried using the REST API to pull the file metadata and noticed
  that the environment is not part of the API for files:

   http://docs.puppetlabs.com/guides/rest_api.html

  Does that mean that it will not respect my environments for the
  following:

  file { 'test':
      source = 'puppet:///modules/somemodule/test'

  }

  If not then which environment from the puppet.conf does it use?
  [main]?

  Thanks.

  -eric

  On Dec 9, 8:12 pm, Eric Snow es...@verio.net wrote:

   I get the following error:

   ... Failed to retrieve current state of resource: Could not retrieve
   information from source(s) ...

   My understanding is that the file server had trouble pulling the
   metadata for the file (on the server side).  This could be due to a
   connectivity issue, or a permissions issue.  What other reasons are
   there?  Does the target affect it as well?  Where in the puppet code
   does all this happen?  (for instance that error is coming from type/
   file/source.rb, so what gets to that code?).

   I have verified all my permissions (both of files and directories).
   All the connections are fine.  However, some of my files work fine and
   others do not.  The same files in both cases, every time.

   The files that work are ones that were done back when I had one
   modules directory in my module_path.  However, now I have several.
   The ones that are in modules I have added since I split my modules
   directories are the ones that do not work.  The old ones work even
   though I moved them into the new modules directories.

   This is driving me crazy.  Any thoughts?

   -eric

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





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