[Puppet Users] Re: Looping through all registered client nodes?

2012-02-27 Thread Paul Tötterman
Hi,
 

> I'm looking to see if there's a way that I can set up a class on my 
> puppetmaster node to loop through all of the defined nodes and add a 
> hosts entry for the internal IP. I think I'm good with the actual 
> adding of the entry, but I'm curious as to how to get access to all 
> defined hosts and loop through their facts.


Not really defined nodes, but it should be possible to use exported 
resources to export the ip address of each node and then collect 
them. http://docs.puppetlabs.com/guides/exported_resources.html

Cheers,
Paul

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/yfczszBhR40J.
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.



Re: [Puppet Users] Re: Best way to test changes?

2012-02-27 Thread wen1023 wu
To avoid these problems, you can use Puppet’s dry run mode (also called
noop mode,
for ‘no operation’

puppet agent --test --noop


在 2012年2月24日 下午11:15,Jos Houtman 写道:

> We have a stable environment and an evironment for every developer.
> Upon changes we manually test the change using the different
> environments.
>
> We also have alerting on the /var/lib/puppet/state/
> last_run_summary.yaml file, which tells us if a manifest did not apply
> properly.
>
> Cheers,
>
> Jos
>
>
> On Feb 23, 2:13 pm, Felix Frank 
> wrote:
> > Hi,
> >
> > On 02/23/2012 01:27 PM, Gonzalo Servat wrote:
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > > On Thu, Feb 23, 2012 at 11:09 PM, jimbob palmer <
> jimbobpal...@gmail.com
> > > > wrote:
> >
> > > I'm worried about making bad changes to a module which will impact
> > > lots of hosts.
> >
> > > How can I avoid this?
> >
> > > Ideally I'd like every node to run in noop, and then to approve the
> > > changes if they look right.
> >
> > > Hi Jim,
> >
> > > We're not currently using this method, but we're planning on using a
> > > second Puppet server which will have a copy of the Puppet tree with
> > > whatever major changes have been made in development. We run Puppet
> from
> > > cron so every host would continue to point at the master server, but we
> > > would connect to specific hosts and try noop against the second Puppet
> > > server.
> >
> > > I'd like to hear how other people manage this sort of thing.
> >
> > similarly but using environments:
> http://docs.puppetlabs.com/guides/environment.html
> >
> > The nodes are made to do the noop run on their own and store their
> > reports on the master. A simple script digests the reports.
> >
> > 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-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.
>
>

-- 
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] Can not retrieve file from puppet master linux to puppet agent windows

2012-02-27 Thread Shirley
Hello,


As the subject described, I tried to retrieve a file from linux master
to windows agent with the init.pp below :
class test {
file { “C:/ProgramData/testfile.txt”:
ensure => present,
mode => 0644,
owner => test,
group => Administrators,
source => “puppet:///modules/test/testfile.txt”,
}
}

In the windows agent, I got the follow error message :
‘err: /Stage[main]/Test/File[C:ProgramData/testfile.txt]: Could not
evaluate: Could not intern from pson: Paths must be fully qualified
Could not retrieve file metadata for puppet:///modules/test/testfile.txt:
Could not intern from pson: Paths must be fully qualified at /etc/
puppet/modules/test/manifests/init.pp:27′

Linux master : ubuntu 11.10, puppet 2.7.1
Windows agent : 2008 r2 x64, puppet 2.7.1

I have google a lot, but didn't find out the solution.
somebody has an idea for this problem ?

-- 
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] Certificate Annoyance: Time Differential

2012-02-27 Thread Derek J. Balling
We recently had a situation where servers weren't able to use their 
auto-sign'ed certificates because their local clock was months off from 
real-time.  Of course, it was brand-new hardware straight off the dock and 
hadn't yet had a chance to have ntp sync the clock to the correct time because, 
well, puppet is what fires up NTP. :-)

Is there any way to recognize that puppet might be the thing in charge of 
bringing the clocks into sync, and allowing puppet to ignore 
certificate-verification failures that are based solely on the time-delta being 
too high?  It certainly seems like it'd be a useful feature.

D

-- 
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.



Re: [Puppet Users] Certificate Annoyance: Time Differential

2012-02-27 Thread ygor
A suggestion based on how I deal with this :
I use Cobbler to load the operating system  and do basic configurations. Then I 
hand off to Puppet.  One thing I do with Cobbler is the initial setting of the 
system clock using ntpdate or ntpd -q
Hope this helps

-Original Message-
From: Derek J. Balling
To: puppet-users
Sent: 2012-02-27 10:59:12 +
Subject: [Puppet Users] Certificate Annoyance: Time Differential

We recently had a situation where servers weren't able to use their 
auto-sign'ed certificates because their local clock was months off from 
real-time.  Of course, it was brand-new hardware straight off the dock and 
hadn't yet had a chance to have ntp sync the clock to the correct time because, 
well, puppet is what fires up NTP. :-)

Is there any way to recognize that puppet might be the thing in charge of 
bringing the clocks into sync, and allowing puppet to ignore 
certificate-verification failures that are based solely on the time-delta being 
too high?  It certainly seems like it'd be a useful feature.

D

-- 
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.

-- 
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] Tags issue

2012-02-27 Thread linuxbsdfreak
Hi ,

I am using tags according to environments Eg: prd_env and stg_env

How do i implement a default node Eg:

node default inherits basenode {
   tag("prd_eu")|("stg_eu"))
   include general
}

The above does not work.

I invoke the puppe agent

puppet agent --test --noop --server=puppetmaster.domain.local --
tags=prd_env|stg_env

Any ideas how i can allow both the env's to use the default node.?

Regards,
Kevin

-- 
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] 2.7.9 -> 2.7.11 Error 403

2012-02-27 Thread ollies...@googlemail.com
Hello,

Thought I would upgrade the masters then tried to join a new client.

All the /etc/puppet/*.conf files are the same. This is running split
CA/Masters running behind F5 and running under Passenger on RHEL6

Now getting 403 errors.


info: Retrieving plugin
err: /File[/var/lib/puppet/lib]: Failed to generate additional
resources using 'eval_generate: Error 403 on SERVER: Forbidden
request: (10.) access to /file_metadata/plugins
[search] at line 99
err: /File[/var/lib/puppet/lib]: Could not evaluate: Error 403 on
SERVER: Forbidden request: (10.) access to /
file_metadata/plugins [find] at line 99 Could not retrieve file
metadata for puppet:///plugins: Error 403 on SERVER:
Forbidden request: (10.) access to /file_metadata/
plugins [find] at line 99
err: Could not retrieve catalog from remote server: Error 403 on
SERVER: Forbidden request: (10.) access to /catalog/
 [find] at line 99

Removed names, IP's etc.

Now the auth.conf looks the same so I am unsure about why this has
started happening.

Cheers
Paul

-- 
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: Connections from any host to puppetmaster server times out

2012-02-27 Thread jcbollinger


On Feb 24, 3:21 pm, weloki  wrote:
> Thanks for the response John.
>
> I was able to ping the master from the hosts and port 8140 was open/
> listening. The only firewall on the master was UFW, but I hadn't
> modified it. The master was actually a VM and the hosts were a mix of
> VMs and physical boxes. I decided to backup all my Puppet stuff, tear
> down the master VM and rebuild it. After that was done and I replaced
> all my Puppet work, everything worked fine. I'm still unsure what was
> happening to cause the issue, but to be fair, before rebuilding the
> master I didn't try messing with UFW in an attempt to figure it out.


I'm glad you got it working.

In case something similar should happen in the future, you should be
aware that with the master running in a VM, you probably have two
firewalls on the master side to worry about: the VM's and the VM
host's.  You must not ignore the latter.


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: 2.7.9 -> 2.7.11 Error 403

2012-02-27 Thread ollies...@googlemail.com
Never mind found I did indeed screw with auth.conf - my bad.

Nice to see facts only loading once this time...

On Feb 27, 1:43 pm, "ollies...@googlemail.com"
 wrote:
> Hello,
>
> Thought I would upgrade the masters then tried to join a new client.
>
> All the /etc/puppet/*.conf files are the same. This is running split
> CA/Masters running behind F5 and running under Passenger on RHEL6
>
> Now getting 403 errors.
>
> info: Retrieving plugin
> err: /File[/var/lib/puppet/lib]: Failed to generate additional
> resources using 'eval_generate: Error 403 on SERVER: Forbidden
> request: (10.) access to /file_metadata/plugins
> [search] at line 99
> err: /File[/var/lib/puppet/lib]: Could not evaluate: Error 403 on
> SERVER: Forbidden request: (10.) access to /
> file_metadata/plugins [find] at line 99 Could not retrieve file
> metadata for puppet:///plugins: Error 403 on SERVER:
> Forbidden request: (10.) access to /file_metadata/
> plugins [find] at line 99
> err: Could not retrieve catalog from remote server: Error 403 on
> SERVER: Forbidden request: (10.) access to /catalog/
>  [find] at line 99
>
> Removed names, IP's etc.
>
> Now the auth.conf looks the same so I am unsure about why this has
> started happening.
>
> Cheers
> Paul

-- 
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: Deploying puppet via NFS

2012-02-27 Thread jcbollinger


On Feb 24, 1:38 pm, Forrie  wrote:
> Also, the puppet I'm using (on all systems) is installed from the gem.

You did not directly answer the key question, which I now think is
this:
>Is it possible that you used the system's Ruby (or the system's gem)
>to install the openssl or puppet gem into the shared location?  You
>should be sure to use only the Ruby toolset on the share to manipulate
>the Ruby install there.

It sounds like you used the system's gem binary to perform the
installation, which (to the best of my knowledge) is normally
configured for the system's Ruby.  I suppose you installed Puppet with
a command such as

gem install --install-dir /local/lib/ruby/gems/1.8/gems/

The trick is, that's probably wrong.  It will drop the Puppet gem's
files into the specified directory, but gem (and the Ruby underneath
it) still know that the standard lib directory for that ruby is /usr/
lib/ruby.

You may be able to rescue the situation by ensuring that appropriate
values of $RUBYLIB and $GEM_HOME are set in the agent's environment.
Better, however, would be to build (if necessary), install, and
configure a 'gem' binary on your share.  Ensure that it is set to run
using the ruby from the share (something like /local/bin/ruby) instead
of the system ruby.  Then use (only) *that* gem binary to manage the
gems installed on the share.

The big picture is this: you should bootstrap the whole Ruby stack
from scratch, being certain not to configuration, tools, or files from
one stack with those from a different one.  If I were doing this, I
might perform the build in a VM that had no other ruby in the first
place, to be certain that I didn't accidentally mix things.


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: Mounts occasionally not applied on first run

2012-02-27 Thread jcbollinger


On Feb 24, 9:16 am, Gonzalo Servat  wrote:
> On Sat, Feb 25, 2012 at 2:06 AM, jcbollinger wrote:
>
>
>
> > I have not noticed this behavior, but you're a little vague.
>
> Yes, I guess I wasn't sure what I could provide in terms of detail so your
> questions help!
>
> When you say that the Mount resources are not applied, what exactly does
>
> > that
> > mean?  Is /etc/fstab not modified? Is fstab modified but the filesystem is
> > not mounted?
>
> /etc/fstab is not modified at all. I rebooted the server and made it
> rebuild again and this time Puppet ran fine and all the mounts were applied
> correctly.
>
> > Either way, does the mount point exist (and is it a directory) before the
> > Mount is applied?  What shows up in
> > the client log?  Can you provide a simple manifest that exhibits the
> > behavior you describe (even if only intermitently)?
>
> I have a define that creates the directory and then mounts it. Nothing in
> the client log indicating an error with the mounts.


Does the client log show any errors at all?  Are there any other
resources that don't always get applied?

If Puppet neither applies the Mount resource nor logs any client-side
message about it, then almost certainly the agent isn't even *trying*
to apply the Mount.  That would imply that either the master doesn't
think the client should have it (based on the classes assigned to the
node and/or conditional statements in them), or that some other
resource failed that must be applied first (because of resource
relationships).


> Unfortunately I don't
> have a simple manifest that shows this behaviour. I was hoping someone
> would say "oh yeah, seen that happen" based on my description, as it's not
> something I can easily show in a manifest.


It doesn't look like that's happening.  Although we cannot rule out a
Puppet bug, I am inclined to think that the problem is in your
manifests.


> It happens occasionally too
> making the troubleshooting effort even harder. If I run Puppet again right
> after the first run, it gets all the mounts done correctly. Most of the
> time the first run is enough to get the entire catalog applied including
> mounts.


Are you sure that Puppet *always* gets it on the second run, or could
your observation simply be a result of the unexpected behavior being
intermitent and not node-specific?  I mean, if it happens 10% of the
time, randomly, then there's only a 1% chance of it happening twice in
a row on the same node.

Without seeing any code I don't have much specific insight on the
problem, but here are some things you can try, individually or in
combination:

1) Run the agent in --debug mode
2) Sprinkle Notify resources through strategic parts of your manifests
to help you track which classes and definition resources are applied.
3) Run the agent many times in --noop mode to try to trigger the
misbehavior (and determine whether the misbehavior occurs via the
client-side log or YAML catalog).  When the misbehavior is detected,
look carefully at which resources are applied and which aren't.
4) When the problem occurs, look at the client node's facts as cached
on the master to verify that they don't include anything unexpected
that might be related to the problem


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: roolback to previouse configuration

2012-02-27 Thread jcbollinger


On Feb 25, 2:19 pm, ruslan usifov  wrote:
> Thanks jcbollinger for detailed answer
>
> >>>For many resource types, another alternative to to purge unmanaged
> >>>resources via the 'Resources' meta-resource type.
>
> I misunderstand what you talking about? Could you share some links?


http://docs.puppetlabs.com/references/stable/type.html#resources


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] About dashboard with parameterized classes

2012-02-27 Thread Smith
Hi all,

I'll use puppet to manage +/- 10 servers, but I'm facing some problems
about facter variables, dashboard and parameters.

I try to use this module :

http://projects.puppetlabs.com/projects/1/wiki/Resolv_Conf_Patterns

class resolver {
# noop
}

define resolv_conf($domainname = "$domain", $searchpath, $nameservers)
{
file { "/etc/resolv.conf":
owner   => root,
group   => root,
mode=> 644,
content => template("resolver/resolv.conf.erb"),
}
}

with this template :

domain <%= domainname %>
<% if !searchpath.empty? %>search <%= searchpath.join(" ") %>
<% end -%>
<% nameservers.each do |ns| %>nameserver <%= ns %>
<% end -%>

But ... I wish to pass the parameters via the dashboard and use facter
as source.

For exemple :

searchpath $domain <-- returned by facter in the inventory.

The problem is the define keyword, the class is never taken into
account in the dashboard.

Could you help me ?

Many thanks

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



[Puppet Users] Re: About dashboard with parameterized classes

2012-02-27 Thread Smith
Sorry, forgot to include relevant infos :

I'm using puppet 2.6.13 from epel repository with dashboard 1.2.6

On Feb 27, 3:56 pm, Smith  wrote:
> Hi all,
>
> I'll use puppet to manage +/- 10 servers, but I'm facing some problems
> about facter variables, dashboard and parameters.
>
> I try to use this module :
>
> http://projects.puppetlabs.com/projects/1/wiki/Resolv_Conf_Patterns
>
> class resolver {
>         # noop
>
> }
>
> define resolv_conf($domainname = "$domain", $searchpath, $nameservers)
> {
>         file { "/etc/resolv.conf":
>                 owner   => root,
>                 group   => root,
>                 mode    => 644,
>                 content => template("resolver/resolv.conf.erb"),
>         }
>
> }
>
> with this template :
>
> domain <%= domainname %>
> <% if !searchpath.empty? %>search <%= searchpath.join(" ") %>
> <% end -%>
> <% nameservers.each do |ns| %>nameserver <%= ns %>
> <% end -%>
>
> But ... I wish to pass the parameters via the dashboard and use facter
> as source.
>
> For exemple :
>
> searchpath $domain <-- returned by facter in the inventory.
>
> The problem is the define keyword, the class is never taken into
> account in the dashboard.
>
> Could you help me ?
>
> Many thanks

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



Re: [Puppet Users] Can not retrieve file from puppet master linux to puppet agent windows

2012-02-27 Thread Craig White

On Feb 27, 2012, at 2:41 AM, Shirley wrote:

> Hello,
> 
> 
> As the subject described, I tried to retrieve a file from linux master
> to windows agent with the init.pp below :
> class test {
>file { “C:/ProgramData/testfile.txt”:
>ensure => present,
>mode => 0644,
>owner => test,
>group => Administrators,
>source => “puppet:///modules/test/testfile.txt”,
>}
> }
> 
> In the windows agent, I got the follow error message :
> ‘err: /Stage[main]/Test/File[C:ProgramData/testfile.txt]: Could not
> evaluate: Could not intern from pson: Paths must be fully qualified
> Could not retrieve file metadata for puppet:///modules/test/testfile.txt:
> Could not intern from pson: Paths must be fully qualified at /etc/
> puppet/modules/test/manifests/init.pp:27′
> 
> Linux master : ubuntu 11.10, puppet 2.7.1
> Windows agent : 2008 r2 x64, puppet 2.7.1
> 
> I have google a lot, but didn't find out the solution.
> somebody has an idea for this problem ?

does the file exist?

ls -l /etc/puppet/modules/test/files/test.txt  ?

Craig

-- 
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] Coder Society, Doing Instead of Talking

2012-02-27 Thread Adron Hall
Hello All,

  Recently a new group, organized around coding, implementing, hacking
on, and generally doing things to better ourselves as developers,
devops, or otherwise has been formed called Coder Society. At this
time we're putting together groups in Seattle, Portland, and San
Francisco. I'd like to invite everyone to weigh in on the discussions
at the Coder Society Group: http://groups.google.com/group/coder-society

It'd be great to get some Puppet ideas on the list of future meetings.
Please jump into the thread and add anything that comes to mind!  :)

Also, if anyone is interested in helping to find space, help co-
organize, or otherwise please message me at adronh...@gmail.com!  I
look forward to coding & devoping with you who would like to jump into
Coder Society. Cheers!

Thanks,
-Adron (@adron) Coder Society Co-founder and Plotter

-- 
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] yum install vs yum upgrade with package resource

2012-02-27 Thread Jeff Whiting
I'm running puppet out in aws and am running into a problem
automatically ensuring the latest openssl version.

I have the package resource defined as:

package { 'openssl' :
ensure => latest,
}

Unfortunately I'm getting this error:

(/Stage[main]/Base/Package[openssl]/ensure) change from
1.0.0e-2.16.amzn1 to 1.0.0g-1.26.amzn1 failed: Could not update:
Execution of '/usr/bin/yum -d 0 -e 0 -y install openssl' returned 1:
Error: Protected multilib versions: openssl-1.0.0g-1.26.amzn1.x86_64 !
= openssl-1.0.0e-2.16.amzn1.i686#012 You could try using --skip-broken
to work around the problem#012 You could try running: rpm -Va --
nofiles --nodigest#012 at /etc/puppet/manifests/modules/base/manifests/
base.pp:106

Basically there are two openssl libraries installed on the machine:
 openssli686  1.0.0g-1.26.amzn1
amzn-updates1.5 M
 opensslx86_641.0.0g-1.26.amzn1
amzn-updates1.6 M

Puppet tries to run '/usr/bin/yum -d 0 -e 0 -y install openssl' and
yum gets confused due to 32bit and 64bit versions (Error: Protected
multilib versions) and doesn't do anything.  But if I run '/usr/bin/
yum -d 0 -e 0 -y upgrade openssl' it works just fine because yum is
doing an upgrade rather than an install.

How should I solve this problem?  I couldn't find a way in the package
definition to tell it to do an 'upgrade' rather than an 'install'.

Thanks,
~Jeff

-- 
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] Puppet-dashboard and successful exec = change

2012-02-27 Thread psyber
I have a script that I exec every puppet run that contacts a web site to 
fetch a version number for a program then compares it to the installed 
version number to determine if they match. If they match the script 
exits, if they don't match it downloads a tarball and runs a somewhat 
complex set of installation steps. The tarball, version number and 
installation script are all maintained by another process. I don't 
really want to take over that responsibility as this all works to my 
satisfaction however the exec in dashboard is seen as a change even when 
the script exits 0 after the check. Is there a way to exec a script 
without it being seen as a change in dashboard or is there possibly 
another way to do this?


--
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.



Re: [Puppet Users] Certificate Annoyance: Time Differential

2012-02-27 Thread Derek J. Balling
Well, we do it with kickstart and -- typically -- do the same thing. But for 
some reason it wasn't able to reach the NTP server during kickstart and it was 
never able to sync the clock before things really got rolling.

And it just occurred to me that since, ostensibly, puppet could be in charge of 
making sure the NTP services were installed in the first place, that it would 
make a lot of sense to have this as a feature/option in puppet, to ignore the 
time-deltas for SSL certs.

D


On Feb 27, 2012, at 6:40 AM,   wrote:

> A suggestion based on how I deal with this :
> I use Cobbler to load the operating system  and do basic configurations. Then 
> I hand off to Puppet.  One thing I do with Cobbler is the initial setting of 
> the system clock using ntpdate or ntpd -q
> Hope this helps
> 
> -Original Message-
> From: Derek J. Balling
> To: puppet-users
> Sent: 2012-02-27 10:59:12 +
> Subject: [Puppet Users] Certificate Annoyance: Time Differential
> 
> We recently had a situation where servers weren't able to use their 
> auto-sign'ed certificates because their local clock was months off from 
> real-time.  Of course, it was brand-new hardware straight off the dock and 
> hadn't yet had a chance to have ntp sync the clock to the correct time 
> because, well, puppet is what fires up NTP. :-)
> 
> Is there any way to recognize that puppet might be the thing in charge of 
> bringing the clocks into sync, and allowing puppet to ignore 
> certificate-verification failures that are based solely on the time-delta 
> being too high?  It certainly seems like it'd be a useful feature.
> 
> D
> 
> -- 
> 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.
> 
> -- 
> 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.
> 

-- 
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.



Re: [Puppet Users] Certificate Annoyance: Time Differential

2012-02-27 Thread Jon Davis
My solution was to run ntpdate before I ran the puppet join.  Since all my
client machines are ubuntu, I know it's pre-installed.  After that, puppet
installs the ntp service.

My "join" command looks something like: `apt-get install puppet -y &&
ntpdate pool.ntp.org && puppet agent --server puppet.company.com`

-Jon

On Mon, Feb 27, 2012 at 02:58, Derek J. Balling  wrote:

> We recently had a situation where servers weren't able to use their
> auto-sign'ed certificates because their local clock was months off from
> real-time.  Of course, it was brand-new hardware straight off the dock and
> hadn't yet had a chance to have ntp sync the clock to the correct time
> because, well, puppet is what fires up NTP. :-)
>
> Is there any way to recognize that puppet might be the thing in charge of
> bringing the clocks into sync, and allowing puppet to ignore
> certificate-verification failures that are based solely on the time-delta
> being too high?  It certainly seems like it'd be a useful feature.
>
> D
>
> --
> 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.
>
>


-- 
Jon
[[User:ShakataGaNai]] / KJ6FNQ
http://snowulf.com/
http://www.linkedin.com/in/shakataganai 

-- 
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.



Re: [Puppet Users] Can not retrieve file from puppet master linux to puppet agent windows

2012-02-27 Thread Josh Cooper
On Mon, Feb 27, 2012 at 1:41 AM, Shirley  wrote:

> Linux master : ubuntu 11.10, puppet 2.7.1
> Windows agent : 2008 r2 x64, puppet 2.7.1
>

Windows agent support was added in 2.7.6, however, we have fixed a number
of issues since then, including the one you are running into. You'll want
to use the latest 2.7.x release:

https://groups.google.com/group/puppet-announce/browse_thread/thread/2d5daed2291962c2

Josh

-- 
Josh Cooper
Developer, Puppet Labs

-- 
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.



Re: [Puppet Users] Puppet-dashboard and successful exec = change

2012-02-27 Thread Nan Liu
On Mon, Feb 27, 2012 at 8:34 AM, psyber  wrote:
> I have a script that I exec every puppet run that contacts a web site to
> fetch a version number for a program then compares it to the installed
> version number to determine if they match. If they match the script exits,
> if they don't match it downloads a tarball and runs a somewhat complex set
> of installation steps. The tarball, version number and installation script
> are all maintained by another process. I don't really want to take over that
> responsibility as this all works to my satisfaction however the exec in
> dashboard is seen as a change even when the script exits 0 after the check.
> Is there a way to exec a script without it being seen as a change in
> dashboard or is there possibly another way to do this?

That's what unless and onlyif attributes are intended for in exec.

exec { 'install_software':
  command => 'complex_script',
  unless => 'check_installation',
}

HTH,

Nan

-- 
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: 32bit and 64bit version of a package

2012-02-27 Thread Alan Laird
On Feb 23, 3:39 pm, Nathan Powell  wrote:
> On Thu, Feb 23, 2012 at 5:57 PM, AlanLaird wrote:
> > I'm trying to write a recipe to install the latest libstdc++ in both
> > 32bit and 64bit flavors and running into issues.  Yum only wants to
> > install the 64bit version if I do:
>
> > yum install libstdc++
>
> > If I do something like:
>
> > package { "libstdc++.i386" : ensure => latest }
>
> > It tells me "nothing to do"
>
> What does it "say" if you do:
>
>   sudo yum -q install libstdc++.i386

Yum tells me "Error: Nothing to do" in that case.

'#yum -y install libstdc++34-3.4.0-1.i386' works without issue.

Alan

-- 
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] Puppet Agent on Windows

2012-02-27 Thread Igor
I'm having issues getting puppet to work properly on our servers. we
have puppet allready running on our linux servers however are unable
to have the puppet agent run on windows.

the log displays only the following:

Puppet (notice): Starting Puppet client version 2.7.11
Puppet (err): Could not run: fork() function is unimplemented on this
machine

The only modules the servers load is:


node 'win2' {
  include windows-admin
}


This is the the contents of the module:

class windows-admin {
  user { "Administrator":
ensure  => present,
password=> 'w5&X341144!'
}

This works properly if running it as a test and sets the password. As
soon as you start the service and the log fills up with:
Puppet (err): Could not run: fork() function is unimplemented on this
machine

Thanks,
Igor

-- 
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: 32bit and 64bit version of a package

2012-02-27 Thread Alan Laird
On Feb 24, 5:52 am, jcbollinger  wrote:
> On Feb 23, 4:57 pm, AlanLaird wrote:
>
> > Any suggestions on the right way to do this?
>
> If neither of the things you already tried works, then perhaps you
> should fall back to "don't worry about it."  If you install software
> only from packages, then, since you're usign the yum provider,
> installing any other package that needs libstdc++.i386 will cause
> libstdc++.i386 to be installed too.  And installing only from packages
> is an excellent practice, even if it means you sometimes have to roll
> your own packages and maintain a local package repository (neither is
> hard).
>
> Personally, I am inclined to lean heavily on my package manager.  I
> think it's more robust and maintainable to have Puppet manage only my
> direct package requirements.

This is a third-party package with poorly constructed depends in a
mixed 32 and 64 bit environment as I support moving from Centos5 to
Centos6.  Repackaging the vendor package is easy but it would need to
be done at each release.

I've solved the problem of the day by installing the needed libstdc+
+34-3.4.0-1.i386 specifically but it's a clunky way to deal with this
issue.

I would love to find a crafty puppet way to do this.

Alan

-- 
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.



Re: [Puppet Users] Puppet Agent on Windows

2012-02-27 Thread Jeff McCune
On Mon, Feb 27, 2012 at 9:29 AM, Igor  wrote:

> I'm having issues getting puppet to work properly on our servers. we
> have puppet allready running on our linux servers however are unable
> to have the puppet agent run on windows.
>
> the log displays only the following:
>
> Puppet (notice): Starting Puppet client version 2.7.11
> Puppet (err): Could not run: fork() function is unimplemented on this
> machine
>
> The only modules the servers load is:
>
>
> node 'win2' {
>  include windows-admin
> }
>
>
> This is the the contents of the module:
>
> class windows-admin {
>  user { "Administrator":
>ensure  => present,
>password=> 'w5&X341144!'
>}
>
> This works properly if running it as a test and sets the password. As
> soon as you start the service and the log fills up with:
> Puppet (err): Could not run: fork() function is unimplemented on this
> machine
>
>
Igor,

Are you running the Puppet agent as a windows service?  If so, what is your
configuration?  Are you using a wrapper script?

-Jeff McCune

-- 
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.



Re: [Puppet Users] About dashboard with parameterized classes

2012-02-27 Thread Nan Liu
On Mon, Feb 27, 2012 at 6:56 AM, Smith  wrote:
> Hi all,
>
> I'll use puppet to manage +/- 10 servers, but I'm facing some problems
> about facter variables, dashboard and parameters.
>
> I try to use this module :
>
> http://projects.puppetlabs.com/projects/1/wiki/Resolv_Conf_Patterns

That example is out of date in terms of best practices, modules should
be written without requiring import function.

> class resolver {
>        # noop
> }
>
> define resolv_conf($domainname = "$domain", $searchpath, $nameservers)
> {
>        file { "/etc/resolv.conf":
>                owner   => root,
>                group   => root,
>                mode    => 644,
>                content => template("resolver/resolv.conf.erb"),
>        }
> }

There's no reason for the configuration to be a define since there's
one specific file /etc/resolv.conf. The parameter should be part of
the class and looked up from top scope which will allow you to specify
the class and parameter in dashboard.

This is probably a better starting point:
https://github.com/saz/puppet-resolv_conf, and you'll need to either
change the module to accept parameters from top scope or write a
wrapper class that passes the parameter from dashboard.

Thanks,

Nan

-- 
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.



Re: [Puppet Users] Error at the end of a puppet agent run...

2012-02-27 Thread Olaf Reitmaier Veracierta
I think the problem happens when you configure agents to send reports. 

In this case when you run the agent in the console the output is not cached 
just showed and the log is empty so the report is also empty.

# puppet agent --verbose --trace --no-daemonize

My output is...

notice: Starting Puppet client version 2.6.2
info: Retrieving plugin
info: Caching catalog for ccsdtfdempup01.dem.int
info: Applying configuration version '1330364775'
notice: /Stage[main]/Clamav/Service[clamav-freshclam]/ensure: ensure 
changed 'stopped' to 'running'
notice: Detected operating system major version: 6
notice: /Stage[main]/Local-repository/Notify[Detected operating system 
major version: 6]/message: defined 'message' as 'Detected operating system 
major version: 6'
notice: /Stage[main]/Zabbix-agent/Service[zabbix-agent]/ensure: ensure 
changed 'stopped' to 'running'
notice: /Stage[main]/Grub/Exec[/root/puppet.grub.sh]/returns: executed 
successfully
notice: No custom file, applying default files/etc/security/limits.conf
notice: /Stage[main]/Limites/Notify[No custom file, applying default 
files/etc/security/limits.conf]/message: defined 'message' as 'No custom 
file, applying default files/etc/security/limits.conf'
notice: /Stage[main]/Tape-backup/Package[sendEmail]/ensure: ensure changed 
'purged' to 'present'
notice: Finished catalog run in 4.15 seconds
/usr/lib/ruby/1.8/net/protocol.rb:135:in `sysread'
/usr/lib/ruby/1.8/net/protocol.rb:135:in `rbuf_fill'
/usr/lib/ruby/1.8/timeout.rb:67:in `timeout'
/usr/lib/ruby/1.8/timeout.rb:101:in `timeout'
/usr/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill'
/usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
/usr/lib/ruby/1.8/net/protocol.rb:126:in `readline'
/usr/lib/ruby/1.8/net/http.rb:2028:in `read_status_line'
/usr/lib/ruby/1.8/net/http.rb:2017:in `read_new'
/usr/lib/ruby/1.8/net/http.rb:1051:in `request'
/usr/lib/ruby/1.8/net/http.rb:1037:in `request'
/usr/lib/ruby/1.8/net/http.rb:543:in `start'
/usr/lib/ruby/1.8/net/http.rb:1035:in `request'
/usr/lib/ruby/1.8/net/http.rb:857:in `put'
/usr/lib/ruby/1.8/puppet/indirector/rest.rb:90:in `save'
/usr/lib/ruby/1.8/puppet/indirector/indirection.rb:253:in `save'
/usr/lib/ruby/1.8/puppet/indirector.rb:64:in `save'
/usr/lib/ruby/1.8/puppet/configurer.rb:178:in `send_report'
/usr/lib/ruby/1.8/puppet/configurer.rb:172:in `run'
/usr/lib/ruby/1.8/puppet/agent.rb:39:in `run'
/usr/lib/ruby/1.8/puppet/agent/locker.rb:21:in `lock'
/usr/lib/ruby/1.8/puppet/agent.rb:39:in `run'
/usr/lib/ruby/1.8/sync.rb:230:in `synchronize'
/usr/lib/ruby/1.8/puppet/agent.rb:39:in `run'
/usr/lib/ruby/1.8/puppet/agent.rb:103:in `with_client'
/usr/lib/ruby/1.8/puppet/agent.rb:37:in `run'
/usr/lib/ruby/1.8/puppet/application.rb:171:in `call'
/usr/lib/ruby/1.8/puppet/application.rb:171:in `controlled_run'
/usr/lib/ruby/1.8/puppet/agent.rb:35:in `run'
/usr/lib/ruby/1.8/puppet/agent.rb:78:in `start'
/usr/lib/ruby/1.8/puppet/external/event-loop/signal-system.rb:95:in `call'
/usr/lib/ruby/1.8/puppet/external/event-loop/signal-system.rb:95:in 
`__signal__'
/usr/lib/ruby/1.8/puppet/external/event-loop/signal-system.rb:95:in `each'
/usr/lib/ruby/1.8/puppet/external/event-loop/signal-system.rb:95:in 
`__signal__'
(eval):2:in `signal'
/usr/lib/ruby/1.8/puppet/external/event-loop/event-loop.rb:317:in 
`sound_alarm'
/usr/lib/ruby/1.8/puppet/agent.rb:82:in `start'
/usr/lib/ruby/1.8/puppet/daemon.rb:125:in `start'
/usr/lib/ruby/1.8/puppet/application/agent.rb:132:in `main'
/usr/lib/ruby/1.8/puppet/application/agent.rb:89:in `run_command'
/usr/lib/ruby/1.8/puppet/application.rb:287:in `run'
/usr/lib/ruby/1.8/puppet/application.rb:393:in `exit_on_fail'
/usr/lib/ruby/1.8/puppet/application.rb:287:in `run'
/usr/lib/ruby/1.8/puppet/util/command_line.rb:55:in `execute'
/usr/bin/puppet:4
err: Could not send report: end of file reached

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/qVZNPtNfGeQJ.
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: Deploying puppet via NFS

2012-02-27 Thread Forrie
I installed this using the full path to the shared gem, simply:

/local/bin/gem install puppet

The puppet code, et al, is in the proper place under /local/lib/

I don't need to worry about the installation, I can overwrite it any
time -- this is my test platform.

I did bootstrap ruby and installed it in /local via "./configure --
prefix=/local" and it installed fine, too.

-- 
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: Deploying puppet via NFS

2012-02-27 Thread Forrie
Here are the errors in full, and demonstrating the entire path:


[ /local]# bin/gem list

*** LOCAL GEMS ***

facter (1.6.5)
puppet (2.7.11)


[ /local]# bin/puppet --version

/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require': no such file to load -- openssl (LoadError)
from /local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
from /local/lib/ruby/gems/1.8/gems/puppet-2.7.11/lib/puppet/ssl.rb:3
from /local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require'
from /local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
from /local/lib/ruby/gems/1.8/gems/puppet-2.7.11/lib/puppet.rb:155
from /local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require'
from /local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
from /local/lib/ruby/gems/1.8/gems/puppet-2.7.11/lib/puppet/
application.rb:272:in `initialize'
from /local/lib/ruby/gems/1.8/gems/puppet-2.7.11/lib/puppet/util/
command_line.rb:60:in `new'
from /local/lib/ruby/gems/1.8/gems/puppet-2.7.11/lib/puppet/util/
command_line.rb:60:in `execute'
from /local/lib/ruby/gems/1.8/gems/puppet-2.7.11/bin/puppet:4
from bin/puppet:19:in `load'
from bin/puppet:19


[ /local]# bin/ruby --version
ruby 1.8.7 (2012-02-08 patchlevel 358) [i686-linux]

-- 
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.



RE: [Puppet Users] Re: Deploying puppet via NFS

2012-02-27 Thread Kinzel, David
>Here are the errors in full, and demonstrating the entire path:
>
>
>[ /local]# bin/gem list
>
>*** LOCAL GEMS ***
>
>facter (1.6.5)
>puppet (2.7.11)
>
>
>[ /local]# bin/puppet --version
>
>/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
>`gem_original_require': no such file to load -- openssl (LoadError)
>   from 

Did you build this on a system with openssl-devel or equivalent installed? Or 
install openssl+devel headers into your /local location?

>/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
>`require'
>   from 
>/local/lib/ruby/gems/1.8/gems/puppet-2.7.11/lib/puppet/ssl.rb:3
>   from 
>/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
>`gem_original_require'
>   from 
>/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
>`require'
>   from 
>/local/lib/ruby/gems/1.8/gems/puppet-2.7.11/lib/puppet.rb:155
>   from 
>/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
>`gem_original_require'
>   from 
>/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
>`require'
>   from /local/lib/ruby/gems/1.8/gems/puppet-2.7.11/lib/puppet/
>application.rb:272:in `initialize'
>   from 
>/local/lib/ruby/gems/1.8/gems/puppet-2.7.11/lib/puppet/util/
>command_line.rb:60:in `new'
>   from 
>/local/lib/ruby/gems/1.8/gems/puppet-2.7.11/lib/puppet/util/
>command_line.rb:60:in `execute'
>   from /local/lib/ruby/gems/1.8/gems/puppet-2.7.11/bin/puppet:4
>   from bin/puppet:19:in `load'
>   from bin/puppet:19
>
>
>[ /local]# bin/ruby --version
>ruby 1.8.7 (2012-02-08 patchlevel 358) [i686-linux]
>
>-- 
>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.
>
>


This email communication and any files transmitted with it may contain
confidential and or proprietary information and is provided for the use of the
intended recipient only. Any review, retransmission or dissemination of this
information by anyone other than the intended recipient is prohibited. If you
receive this email in error, please contact the sender and delete this
communication and any copies immediately. Thank you.

http://www.encana.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: Puppet Agent on Windows

2012-02-27 Thread Igor
Yes, we are running it as a windows service.

We are using nssm as a wrapper, here is how we created the service:

nssm.exe install puppet-agent c:\ruby187\bin\puppet.bat agent --
logdest c:\puppet.log


The puppet.bat is the default that the install script creates.

Thanks,
Igor

On Feb 27, 12:48 pm, Jeff McCune  wrote:
> On Mon, Feb 27, 2012 at 9:29 AM, Igor  wrote:
> > I'm having issues getting puppet to work properly on our servers. we
> > have puppet allready running on our linux servers however are unable
> > to have the puppet agent run on windows.
>
> > the log displays only the following:
>
> > Puppet (notice): Starting Puppet client version 2.7.11
> > Puppet (err): Could not run: fork() function is unimplemented on this
> > machine
>
> > The only modules the servers load is:
>
> > node 'win2' {
> >  include windows-admin
> > }
>
> > This is the the contents of the module:
>
> > class windows-admin {
> >  user { "Administrator":
> >    ensure      => present,
> >    password    => 'w5&X341144!'
> >    }
>
> > This works properly if running it as a test and sets the password. As
> > soon as you start the service and the log fills up with:
> > Puppet (err): Could not run: fork() function is unimplemented on this
> > machine
>
> Igor,
>
> Are you running the Puppet agent as a windows service?  If so, what is your
> configuration?  Are you using a wrapper script?
>
> -Jeff McCune

-- 
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: 32bit and 64bit version of a package

2012-02-27 Thread jcbollinger


On Feb 27, 11:28 am, Alan Laird  wrote:
> On Feb 23, 3:39 pm, Nathan Powell  wrote:
>
>
>
>
>
> > On Thu, Feb 23, 2012 at 5:57 PM, AlanLaird wrote:
> > > I'm trying to write a recipe to install the latest libstdc++ in both
> > > 32bit and 64bit flavors and running into issues.  Yum only wants to
> > > install the 64bit version if I do:
>
> > > yum install libstdc++
>
> > > If I do something like:
>
> > > package { "libstdc++.i386" : ensure => latest }
>
> > > It tells me "nothing to do"
>
> > What does it "say" if you do:
>
> >   sudo yum -q install libstdc++.i386
>
> Yum tells me "Error: Nothing to do" in that case.


And that says that the package is already installed.  You could verify
that in a variety of ways, such as "rpm -q libstdc++" or "yum list
installed libstdc++" or even "yum list installed 'libstdc++*'".  Why
is "Nothing to do" not an acceptable answer?


> '#yum -y install libstdc++34-3.4.0-1.i386' works without issue.


Part of your problem may be that libstdc++.{i386,x86_64} is not the
same package as libstdc++34.{i386,i686,x86_64}.  The latter is
probably a "compatibility library" that provides an _old_ version of
libstdc++ (apparently 3.4.0) on systems whose standard version is
newer (possibly alongside the standard version).  I'm guessing based
on naming conventions, however, because there is no such package
distributed from the standard CentOS 5/6 repositories.

If libstdc++34 is the package you really want, then that's what you
should ask Puppet to ensure present.  If you ask for a diferent
package, then you should not be surprised when that's the package
Puppet tries to give you.


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] Using puppet cert generate on a client -- why doesn't this work?

2012-02-27 Thread Rich Rauenzahn
I'm running a two headed puppetmaster and have disabled crl's.   Let's
call them the primary and the secondary.  The primary and secondary
both use the primary as their master.  The secondary only is used when
the primary isn't responding (I wrap the puppetd call in cron with a
short shell script)

I'm managing these ca files on the masters, pushing them with puppet itself...

$ grep file\ { certs.pp
file { "/var/lib/puppet/ssl/ca/ca_crt.pem":
file { "/var/lib/puppet/ssl/ca/ca_key.pem":
file { "/var/lib/puppet/ssl/ca/private/ca.pass":
file { "/var/lib/puppet/ssl/certs/ca.pem":
file { "/var/lib/puppet/ssl/ca/ca_crl.pem":  (ensures absent, we
don't need them in our environment.)

Then, in order to generate the ssl certs for the webservice, I generate this:

# If this isn't working, try puppet cert clean $::fqdn first
exec {"/usr/bin/puppet cert --generate --certdnsnames $aliases $::fqdn":
creates => ["/var/lib/puppet/ssl/certs/${::fqdn}.pem",
"/var/lib/puppet/ssl/private_keys/${::fqdn}.pem",
"/var/lib/puppet/ssl/public_keys/${::fqdn}.pem",
"/var/lib/puppet/ssl/ca/signed/${::fqdn}.pem",
   ],
user=> root,
notify  => Service['httpd'],
}

I create these manually so I can pass the --certdnsnames $aliases for
the puppetmaster DNS cname.

This seems to work fine for the primary.  But when the secondary tries
to run against the primary, it fails with

err: /File[/var/lib/puppet/lib]: Failed to generate additional
resources using 'eval_generate: certificate verify failed
err: /File[/var/lib/puppet/lib]: Could not evaluate: certificate
verify failed Could not retrieve file metadata for
puppet:///plugins: certificate verify failed

I would think that the certs would be good because I generate them
with the exact same CA's as the primary.  If I remove the certs and go
through a normal signing process, it works.  It is only when I use
puppet cert --generate on the secondary do the certs fail.

I'm almost considering running puppet cert --generate with --ssldir to
point it someplace else to generate certs with cnames ONLY for the web
server (apache), and then have another set of certs in the normal
place generated for client/master signing.

But it is bothering me that I don't understand what is going on.  How
does signing work?

My impression is that the client connects to the SSL port on the
master, verifies that the SSL keys are good (validates against
/var/lib/puppet/ssl/certs/ca.pem for authenticity and verifies it has
the right hostname signed (or aliased)).

What happens next?  Does the client present a cert also signed by the
CA to prove it is allowed to perform queries?

What's the cleanest way around this?

-- 
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] Could not find node. cannot compile

2012-02-27 Thread Mohamed Lrhazi
>From my ENC, I return something like, for a given node:

  nfs_mounts:
  - [/data, fas3319-518.example.com:/vol/crddb_data/test]

and in my manifests I added:

   define mount_nfs_shares() {
$mount_point = $name[0]
$mount_device = $name[1]

notice("mount_point: ",$mount_point)
notice("mount_device: ",$mount_device)

file{ $mout_point: ensure => directory }
mount { $mount_point:
device => $mount_device,
name => $mount_point,
require => File[$mount_point],
}
}
mount_nfs_shares { $nfs_mounts: }

This results in error:


Feb 27 16:10:07 pirates puppet-master[16073]: [daemon.err] Could not
find node 'nodename.example.com'; cannot compile

The idea of course is for me to be able to specify for each node, in
my ENC, a list of NFS mount it needs, and have the corresponding
puppet resources created and compiled for each.

Why is this not working? And what would be better way of achieve my goal?

Thanks a lot,
Mohamed.

-- 
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.



Re: [Puppet Users] Could not find node. cannot compile

2012-02-27 Thread Kelsey Hightower
On Mon, Feb 27, 2012 at 4:17 PM, Mohamed Lrhazi  wrote:

> From my ENC, I return something like, for a given node:
>
>  nfs_mounts:
>  - [/data, fas3319-518.example.com:/vol/crddb_data/test]
>
> and in my manifests I added:
>
>   define mount_nfs_shares() {
>$mount_point = $name[0]
>$mount_device = $name[1]
>
>notice("mount_point: ",$mount_point)
>notice("mount_device: ",$mount_device)
>
>file{ $mout_point: ensure => directory }
>mount { $mount_point:
>device => $mount_device,
>name => $mount_point,
>require => File[$mount_point],
>}
>}
>mount_nfs_shares { $nfs_mounts: }
>
> This results in error:
>
>
> Feb 27 16:10:07 pirates puppet-master[16073]: [daemon.err] Could not
> find node 'nodename.example.com'; cannot compile
>

The first thing we need to do is resolve this error. What do you get when
you pass 'nodename.example.com' to your external node script? What exit
code do you get?

-- 
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: Could not find node. cannot compile

2012-02-27 Thread Mohamed Lrhazi
Chaging my ENC to output this, adding double quotes:

  nfs_mounts:
  - ["/data", "fas3319-518.uis.georgetown.edu:/vol/onecrddb_data/test"]

and adding a  notice($nfs_mounts)  to the manifests, gives this log:

[daemon.notice] (Scope(Class[Gu_misc])) nfs_mounts:
/datafas3319-518.example.com:/vol/onecrddb_data/test
[daemon.notice] (Scope(Class[Gu_misc])) nfs_mounts:  /data
fas3319-518.example.com:/vol/onecrddb_data/test

[daemon.err] name is not an hash or array when accessing it with 0 at
/etc/puppet/environments/production_ml623/modules/gu_misc/manifests/init.pp:68
on node nodename.example.com
[daemon.err] name is not an hash or array when accessing it with 0 at
/etc/puppet/environments/production_ml623/modules/gu_misc/manifests/init.pp:68
on node nodename.example.com


On Mon, Feb 27, 2012 at 4:17 PM, Mohamed Lrhazi  wrote:
> From my ENC, I return something like, for a given node:
>
>  nfs_mounts:
>      - [/data, fas3319-518.example.com:/vol/crddb_data/test]
>
> and in my manifests I added:
>
>   define mount_nfs_shares() {
>        $mount_point = $name[0]
>        $mount_device = $name[1]
>
>        notice("mount_point: ",$mount_point)
>        notice("mount_device: ",$mount_device)
>
>        file{ $mout_point: ensure => directory }
>        mount { $mount_point:
>            device => $mount_device,
>            name => $mount_point,
>            require => File[$mount_point],
>        }
>    }
>    mount_nfs_shares { $nfs_mounts: }
>
> This results in error:
>
>
> Feb 27 16:10:07 pirates puppet-master[16073]: [daemon.err] Could not
> find node 'nodename.example.com'; cannot compile
>
> The idea of course is for me to be able to specify for each node, in
> my ENC, a list of NFS mount it needs, and have the corresponding
> puppet resources created and compiled for each.
>
> Why is this not working? And what would be better way of achieve my goal?
>
> Thanks a lot,
> Mohamed.

-- 
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.



Re: [Puppet Users] Could not find node. cannot compile

2012-02-27 Thread Nan Liu
On Mon, Feb 27, 2012 at 1:17 PM, Mohamed Lrhazi  wrote:
> From my ENC, I return something like, for a given node:
>
>  nfs_mounts:
>      - [/data, fas3319-518.example.com:/vol/crddb_data/test]
>
> and in my manifests I added:
>
>   define mount_nfs_shares() {
>        $mount_point = $name[0]
>        $mount_device = $name[1]

$name is not an array, but rather just the resource title, so you
can't do this, you need to pass parameters to the define such as:

define mount_nfs(
  $mount_point = $name,
  $mount_device
) {
...
}

This is now a resource which can be declared as:

mount_nfs { '/data':
  mount_device => 'fas3319-518.example.com:/vol/crddb_data/test',
}

>        notice("mount_point: ",$mount_point)
>        notice("mount_device: ",$mount_device)
>
>        file{ $mout_point: ensure => directory }
>        mount { $mount_point:
>            device => $mount_device,
>            name => $mount_point,
>            require => File[$mount_point],
>        }
>    }
>    mount_nfs_shares { $nfs_mounts: }
>
> This results in error:
>
>
> Feb 27 16:10:07 pirates puppet-master[16073]: [daemon.err] Could not
> find node 'nodename.example.com'; cannot compile
>
> The idea of course is for me to be able to specify for each node, in
> my ENC, a list of NFS mount it needs, and have the corresponding
> puppet resources created and compiled for each.
>
> Why is this not working? And what would be better way of achieve my goal?

Defines are resources, you can not pass resources via ENC. You have
two options, create a class that passes the options, or in your
example, I think you are looking for something like create_resources
function and pass the resources hash to create mount

Thanks,

Nan

-- 
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.



Re: [Puppet Users] Re: Puppet Agent on Windows

2012-02-27 Thread Josh Cooper
Hi Igor,

On Mon, Feb 27, 2012 at 12:54 PM, Igor  wrote:

> Yes, we are running it as a windows service.
>
> We are using nssm as a wrapper, here is how we created the service:
>
> nssm.exe install puppet-agent c:\ruby187\bin\puppet.bat agent --
> logdest c:\puppet.log
>

Can you set the trace[1] option in puppet.conf[2]. Restart the service, and
reply with the backtrace?

Thanks,
Josh

[1] http://docs.puppetlabs.com/references/stable/configuration.html#trace
[2] http://projects.puppetlabs.com/projects/1/wiki/Puppet_Windows#Settings
-- 
Josh Cooper
Developer, Puppet Labs

-- 
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.



Re: [Puppet Users] Re: Could not find node. cannot compile

2012-02-27 Thread Kelsey Hightower
On Mon, Feb 27, 2012 at 4:32 PM, Mohamed Lrhazi  wrote:

> Chaging my ENC to output this, adding double quotes:
>
>  nfs_mounts:
>  - ["/data", "fas3319-518.uis.georgetown.edu:/vol/onecrddb_data/test"]
>
> and adding a  notice($nfs_mounts)  to the manifests, gives this log:
>
> [daemon.notice] (Scope(Class[Gu_misc])) nfs_mounts:
> /datafas3319-518.example.com:/vol/onecrddb_data/test
> [daemon.notice] (Scope(Class[Gu_misc])) nfs_mounts:  /data
> fas3319-518.example.com:/vol/onecrddb_data/test
>
> [daemon.err] name is not an hash or array when accessing it with 0 at
>
> /etc/puppet/environments/production_ml623/modules/gu_misc/manifests/init.pp:68
> on node nodename.example.com
> [daemon.err] name is not an hash or array when accessing it with 0 at
>
> /etc/puppet/environments/production_ml623/modules/gu_misc/manifests/init.pp:68
> on node nodename.example.com


Ok, so now your ENC is returning data for the node, good. Now you seem to
be reference some var $name, but based on your example it seems that you
should be using $nfs_mounts.

Also, looks like in you ENC it should be:

 nfs_mounts: ["/data", "fas3319-518.uis.georgetown.edu:
/vol/onecrddb_data/test"]

-- 
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.



Re: [Puppet Users] Could not find node. cannot compile

2012-02-27 Thread Kelsey Hightower
On Mon, Feb 27, 2012 at 4:33 PM, Nan Liu  wrote:

> On Mon, Feb 27, 2012 at 1:17 PM, Mohamed Lrhazi  wrote:
> > From my ENC, I return something like, for a given node:
> >
> >  nfs_mounts:
> >  - [/data, fas3319-518.example.com:/vol/crddb_data/test]
> >
> > and in my manifests I added:
> >
> >   define mount_nfs_shares() {
> >$mount_point = $name[0]
> >$mount_device = $name[1]
>
> $name is not an array, but rather just the resource title, so you
> can't do this, you need to pass parameters to the define such as:
>
> define mount_nfs(
>  $mount_point = $name,
>  $mount_device
> ) {
> ...
> }
>
> This is now a resource which can be declared as:
>
> mount_nfs { '/data':
>  mount_device => 'fas3319-518.example.com:/vol/crddb_data/test',
> }
>
> >notice("mount_point: ",$mount_point)
> >notice("mount_device: ",$mount_device)
> >
> >file{ $mout_point: ensure => directory }
> >mount { $mount_point:
> >device => $mount_device,
> >name => $mount_point,
> >require => File[$mount_point],
> >}
> >}
> >mount_nfs_shares { $nfs_mounts: }
> >
> > This results in error:
> >
> >
> > Feb 27 16:10:07 pirates puppet-master[16073]: [daemon.err] Could not
> > find node 'nodename.example.com'; cannot compile
> >
> > The idea of course is for me to be able to specify for each node, in
> > my ENC, a list of NFS mount it needs, and have the corresponding
> > puppet resources created and compiled for each.
> >
> > Why is this not working? And what would be better way of achieve my goal?
>
> Defines are resources, you can not pass resources via ENC. You have
> two options, create a class that passes the options, or in your
> example, I think you are looking for something like create_resources
> function and pass the resources hash to create mount
>

+1

-- 
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: Puppet Agent on Windows

2012-02-27 Thread Igor
Here you go:

Mon Feb 27 13:41:20 -0800 2012 Puppet (notice): Starting Puppet client
version 2.7.11
Mon Feb 27 13:41:20 -0800 2012 Puppet (err): Could not run: fork()
function is unimplemented on this machine
Mon Feb 27 13:41:20 -0800 2012 Puppet (err): c:/Ruby187/bin/c:/Ruby187/
lib/ruby/site_ruby/1.8/puppet/agent.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/external/event-
loop/signal-system.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/external/event-
loop/signal-system.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/external/event-
loop/signal-system.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/external/event-
loop/signal-system.rb
c:/Ruby187/bin/(eval):2
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/external/event-
loop/event-loop.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/daemon.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application/
agent.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application/
agent.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util/
command_line.rb
c:/Ruby187/bin/c:/Ruby187/bin/puppet
Mon Feb 27 13:41:23 -0800 2012 Puppet (notice): Starting Puppet client
version 2.7.11
Mon Feb 27 13:41:23 -0800 2012 Puppet (err): Could not run: fork()
function is unimplemented on this machine
Mon Feb 27 13:41:24 -0800 2012 Puppet (err): c:/Ruby187/bin/c:/Ruby187/
lib/ruby/site_ruby/1.8/puppet/agent.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/external/event-
loop/signal-system.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/external/event-
loop/signal-system.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/external/event-
loop/signal-system.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/external/event-
loop/signal-system.rb
c:/Ruby187/bin/(eval):2
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/external/event-
loop/event-loop.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/daemon.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application/
agent.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application/
agent.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb
c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util/
command_line.rb
c:/Ruby187/bin/c:/Ruby187/bin/puppet


Thanks,
Igor

On Feb 27, 4:33 pm, Josh Cooper  wrote:
> Hi Igor,
>
> On Mon, Feb 27, 2012 at 12:54 PM, Igor  wrote:
> > Yes, we are running it as a windows service.
>
> > We are using nssm as a wrapper, here is how we created the service:
>
> > nssm.exe install puppet-agent c:\ruby187\bin\puppet.bat agent --
> > logdest c:\puppet.log
>
> Can you set the trace[1] option in puppet.conf[2]. Restart the service, and
> reply with the backtrace?
>
> Thanks,
> Josh
>
> [1]http://docs.puppetlabs.com/references/stable/configuration.html#trace
> [2]http://projects.puppetlabs.com/projects/1/wiki/Puppet_Windows#Settings
> --
> Josh Cooper
> Developer, Puppet Labs

-- 
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: Deploying puppet via NFS

2012-02-27 Thread Forrie

>
> Did you build this on a system with openssl-devel or equivalent installed? Or 
> install openssl+devel headers into your /local location?


BINGO!  That was the problem.  THANK YOU.

What really gets me is that I would never have figured this out, based
on the ambiguous error message.

I just recompiled, reinstalled and now puppet works.

I'm going to now test deploying this via NFS -- separate 32bit and
64bit mounts.

Has anyone done this before.  I realize the next step will be
storedconfigs so that a minimal amount of data is needed on each
host.   I just haven't found any information out there about anyone
having done this via NFS.



Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
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: Puppet Agent on Windows

2012-02-27 Thread Josh Cooper
Hi Igor,

Are you using the ruby interpreter from rubyinstaller.org? Or cygwin?

On Mon, Feb 27, 2012 at 1:43 PM, Igor  wrote:

> Here you go:
>
> Mon Feb 27 13:41:20 -0800 2012 Puppet (notice): Starting Puppet client
> version 2.7.11
> Mon Feb 27 13:41:20 -0800 2012 Puppet (err): Could not run: fork()
> function is unimplemented on this machine
> Mon Feb 27 13:41:20 -0800 2012 Puppet (err): c:/Ruby187/bin/c:/Ruby187/
> lib/ruby/site_ruby/1.8/puppet/agent.rb

c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb
> c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb
> c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb
> c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb
>

Something is wrong here. The path should be
c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb. Also, the backtrace
normally contains line numbers. How did you install ruby and puppet?

Can you run the following:

cd c:\Ruby187\bin
ruby -v
ruby -e "require 'puppet'; puts Puppet[:daemonize]"
ruby -e "require 'puppet'; puts Puppet.features.microsoft_windows?"

Thanks,
Josh

-- 
Josh Cooper
Developer, Puppet Labs

-- 
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.



Re: [Puppet Users] Could not find node. cannot compile

2012-02-27 Thread Mohamed Lrhazi
Thank you guys, and thanks Nan. I see my mistakes now.

Mohamed.

On Mon, Feb 27, 2012 at 4:39 PM, Kelsey Hightower  wrote:
> On Mon, Feb 27, 2012 at 4:33 PM, Nan Liu  wrote:
>>
>> On Mon, Feb 27, 2012 at 1:17 PM, Mohamed Lrhazi  wrote:
>> > From my ENC, I return something like, for a given node:
>> >
>> >  nfs_mounts:
>> >      - [/data, fas3319-518.example.com:/vol/crddb_data/test]
>> >
>> > and in my manifests I added:
>> >
>> >   define mount_nfs_shares() {
>> >        $mount_point = $name[0]
>> >        $mount_device = $name[1]
>>
>> $name is not an array, but rather just the resource title, so you
>> can't do this, you need to pass parameters to the define such as:
>>
>> define mount_nfs(
>>  $mount_point = $name,
>>  $mount_device
>> ) {
>> ...
>> }
>>
>> This is now a resource which can be declared as:
>>
>> mount_nfs { '/data':
>>  mount_device => 'fas3319-518.example.com:/vol/crddb_data/test',
>> }
>>
>> >        notice("mount_point: ",$mount_point)
>> >        notice("mount_device: ",$mount_device)
>> >
>> >        file{ $mout_point: ensure => directory }
>> >        mount { $mount_point:
>> >            device => $mount_device,
>> >            name => $mount_point,
>> >            require => File[$mount_point],
>> >        }
>> >    }
>> >    mount_nfs_shares { $nfs_mounts: }
>> >
>> > This results in error:
>> >
>> >
>> > Feb 27 16:10:07 pirates puppet-master[16073]: [daemon.err] Could not
>> > find node 'nodename.example.com'; cannot compile
>> >
>> > The idea of course is for me to be able to specify for each node, in
>> > my ENC, a list of NFS mount it needs, and have the corresponding
>> > puppet resources created and compiled for each.
>> >
>> > Why is this not working? And what would be better way of achieve my
>> > goal?
>>
>> Defines are resources, you can not pass resources via ENC. You have
>> two options, create a class that passes the options, or in your
>> example, I think you are looking for something like create_resources
>> function and pass the resources hash to create mount
>
>
> +1
>
> --
> 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.

-- 
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] how to test a single class?

2012-02-27 Thread Sonia Hamilton
(Puppet 0.25.4).

Is there an easy way of doing a puppet client run with just one class,
so I can test it?

I've inherited an old, crufty puppet setup with lots of classes, and I
want to go through each class one by one and watch the puppet client
running against puppetd.

Thanks, Sonia.

-- 
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: Puppet Agent on Windows

2012-02-27 Thread Igor
We are using the ruby installer from the Puppet windows page:

http://rubyforge.org/frs/download.php/74293/rubyinstaller-1.8.7-p334.exe

http://projects.puppetlabs.com/projects/1/wiki/Puppet_Windows

Here are the command you wanted me to run:


C:\Ruby187\bin>ruby -v
ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32]

C:\Ruby187\bin>ruby -e "require 'puppet'; puts Puppet[:daemonize]"
false

C:\Ruby187\bin>ruby -e "require 'puppet'; puts
Puppet.features.microsoft_windows?"
true



Thanks,
Igor



On Feb 27, 6:26 pm, Josh Cooper  wrote:
> Hi Igor,
>
> Are you using the ruby interpreter from rubyinstaller.org? Or cygwin?
>
> On Mon, Feb 27, 2012 at 1:43 PM, Igor  wrote:
> > Here you go:
>
> > Mon Feb 27 13:41:20 -0800 2012 Puppet (notice): Starting Puppet client
> > version 2.7.11
> > Mon Feb 27 13:41:20 -0800 2012 Puppet (err): Could not run: fork()
> > function is unimplemented on this machine
> > Mon Feb 27 13:41:20 -0800 2012 Puppet (err): c:/Ruby187/bin/c:/Ruby187/
> > lib/ruby/site_ruby/1.8/puppet/agent.rb
>
> c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb
>
> > c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb
> > c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb
> > c:/Ruby187/bin/c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb
>
> Something is wrong here. The path should be
> c:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb. Also, the backtrace
> normally contains line numbers. How did you install ruby and puppet?
>
> Can you run the following:
>
> cd c:\Ruby187\bin
> ruby -v
> ruby -e "require 'puppet'; puts Puppet[:daemonize]"
> ruby -e "require 'puppet'; puts Puppet.features.microsoft_windows?"
>
> Thanks,
> Josh
>
> --
> Josh Cooper
> Developer, Puppet Labs

-- 
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.



Re: [Puppet Users] how to test a single class?

2012-02-27 Thread Nan Liu
On Mon, Feb 27, 2012 at 4:13 PM, Sonia Hamilton  wrote:
> (Puppet 0.25.4).
>
> Is there an easy way of doing a puppet client run with just one class,
> so I can test it?
>
> I've inherited an old, crufty puppet setup with lots of classes, and I
> want to go through each class one by one and watch the puppet client
> running against puppetd.
>
> Thanks, Sonia.

Rather than trying to do this in agent/master, probably much easier to
replicate all your modules to your agent for testing. I think you can
run:

puppet -e "include 'sample' " --noop
...

In 2.6+ should be:
puppet apply -e "class { 'sample': }" --noop

Most likely your modules will have interdependencies between each
other, so it probably won't be this straightforward. If the authors of
the modules provided tests directories and manifests in them, maybe
you can run against them instead.

HTH,

Nan

-- 
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.



Re: [Puppet Users] how to test a single class?

2012-02-27 Thread Sonia Hamilton
* Nan Liu  [2012-02-27 17:02:49 -0800]:

> On Mon, Feb 27, 2012 at 4:13 PM, Sonia Hamilton  wrote:
> > (Puppet 0.25.4).
> >
> > Is there an easy way of doing a puppet client run with just one class,
> > so I can test it?
> >
> > I've inherited an old, crufty puppet setup with lots of classes, and I
> > want to go through each class one by one and watch the puppet client
> > running against puppetd.
> >
> > Thanks, Sonia.
> 
> Rather than trying to do this in agent/master, probably much easier to
> replicate all your modules to your agent for testing. I think you can
> run:
> 
> puppet -e "include 'sample' " --noop
> ...
> 
> In 2.6+ should be:
> puppet apply -e "class { 'sample': }" --noop
> 
> Most likely your modules will have interdependencies between each
> other, so it probably won't be this straightforward. If the authors of
> the modules provided tests directories and manifests in them, maybe
> you can run against them instead.

Thanks for your help Nan. I have some scripts setup that allow me to run
my workstation as an adhoc puppetmaster, so I won't try replicating my
modules. Also, the key facts are pulled out of LDAP'ish backend, so
"it's complicated"...

But the "puppet -e" trick looks good, I'll try it later. If I have this
heirarchy, what would I put in the include statement to run foo's
init.pp?

puppet/
  unstable/
modules/
  foo/
manifests/
  init.pp


-- 
Sonia Hamilton
http://www.snowfrog.net

-- 
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.