Re: [Puppet Users] Re: Puppet 'node data' when using common node_names?

2014-08-22 Thread Wil Cooley
On Aug 22, 2014 7:37 AM, "Matt W"  wrote:
>
> Anyone have any thoughts on this?
>

I have to say, using an identical node name as a way of assigning the
node's role is an "interesting" approach. I would not be surprised if you
run into other difficulties with this approach; some even harder to find.
Even something like an appended unique identifier, such as from the host
ID, MAC address, serial number, hashed SHA1, etc would have been better.

Be that as it may, life would be dull if we didn't have to live with the
sins of the past. You might check the config guide
https://docs.puppetlabs.com/references/3.6.latest/configuration.html but in
thinking about it, if you found a setting and tried to use a fact in it,
you'd probably just get the master's fact.

The reports, at least, should be easy - since they're pluggable, you could
copy the existing "lib/puppet/reports/store.rb" to a new name & module and
tweak the storage location.

Wil

> On Thursday, August 14, 2014 10:39:16 AM UTC-7, Matt W wrote:
>>
>> We noticed that our puppet reports and our puppet node data stored on
our puppet servers is always written out in the form of the 'node name'. So
when we use a node name like 'prod_webserver' across many webserver
machines, we get a tree of reports and node data like this:
>>
>>> /var/lib/puppet/yaml/node/prod_web.yaml
>>> /var/lib/puppet/yaml/facts/prod_web.yaml
>>> /var/lib/puppet/reports/prod_web
>>> /var/lib/puppet/reports/prod_web/201408130200.yaml
>>> /var/lib/puppet/reports/prod_web/201408140811.yaml
>>> /var/lib/puppet/reports/prod_web/201408121328.yaml
>>> /var/lib/puppet/reports/prod_web/201408130743.yaml
>>> /var/lib/puppet/reports/prod_web/201408140454.yaml
>>
>>
>> Where each of those reports likely reflects a compilation run for a
different host... and the facts/node files at the top are getting
constantly re-written as new clients come in.
>>
>> Is there a way to change the behavior of the data there to be written
out based on the ${::fqdn} of the host (or certname) rather than its node
name?
>>
>> (our client puppet configs ...)
>>>
>>> [main]
>>> ...
>>> node_name = facter
>>> node_name_fact = puppet_node
>>
>>
>> (a client puppet fact file...)
>>>
>>> puppet_node=prod_web
>>> puppet_environment=production
>>> package=frontend=some-version-here
>>> app_group=us1
>
> --
> You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/40c0048d-fc90-4006-99da-98bfa9ba94a7%40googlegroups.com
.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAMmm3r5MwNDV%3DCEnxVrr4pL1w_Xi3byR5xphPxPZH3%3D2XgJdXQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] SOLVED ? Re: ERROR: Could not evaluate: Could not retrieve information from environment production source(s)

2014-08-22 Thread Trevor Vaughan
Just for anyone that's having this issue in the future.

Add the directory 'facts.d' to one of your modules.

/etc/puppet/modules/foo/facts.d

Trevor


On Wed, Jun 25, 2014 at 8:11 AM,  wrote:

> This problem disappear without know reason
> So Ignore my question.
>
> On Wednesday, June 25, 2014 12:06:47 PM UTC+3, shlo@gmail.com wrote:
>>
>>
>>
>> Hi,
>>
>> I upgrade my Puppet server and agent to Puppet 3.6.2 ( I had Puppet
>> server: 3.3.1 Puppet agent: 2.7.25).
>>
>> When I run puppet on the agent I get the errors:
>>
>> Error: /File[/var/lib/puppet/facts.d]: Could not evaluate: Could not
>> retrieve information from environment production source(s) puppet://
>> iblpuppetsrv01.weizmann.ac.il/pluginfacts
>> Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve
>> information from environment production source(s) puppet://
>> iblpuppetsrv01.weizmann.ac.il/plugins
>>
>>
>> I find in google to downgrade the facter from 2.0.2 to 1.7.x.
>> Is there any other solution?
>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/3282efe1-f5a8-42cb-ad1c-60229b35eb85%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
tvaug...@onyxpoint.com

-- This account not approved for unencrypted proprietary information --

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CANs%2BFoVQn2DA%3DbFoXzy5JVpStsFDvbgrwtPKdjvcfdDpEyYBew%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Cisco: No error, but no Applying

2014-08-22 Thread Nan Liu
On Fri, Aug 22, 2014 at 12:10 PM, Nathan Brito  wrote:

> I'm trying to apply settings on a Cisco Catalyst 2960S through the puppet,
> but I can not.
>
> When I give the "device #puppet verbose" command, the puppet does not
> return me error but does not apply the manifest.
>
>
> *Follows the return of the command:*
>
> #puppet device --verbose
>> Info: starting applying configuration to switch.mydomain at
>> telnet://admin:admin@switch.mydomain
>> Info: Retrieving pluginfacts
>> Info: Retrieving plugin
>> Info: Caching catalog for switch.mydomain
>> Info: Applying configuration version '1408732346'
>> Notice: Finished catalog run in 0.05 seconds
>
>
>
> */etc/puppet/puppet.conf:*
>
> [main]
>> logdir=/var/log/puppet
>> vardir=/var/lib/puppet
>> ssldir=/var/lib/puppet/ssl
>> rundir=/var/run/puppet
>> factpath=$vardir/lib/facter
>> #templatedir=$confdir/templates
>> [master]
>> # These are needed when the puppetmaster is run by passenger
>> # and can safely be removed if webrick is used.
>> ssl_client_header = SSL_CLIENT_S_DN
>> ssl_client_verify_header = SSL_CLIENT_VERIFY
>> dns_alt_names = puppetmaster,puppetmaster.mydomain
>
>
> */etc/puppet/device.conf*
>
> [switch.mydomain]
>> type cisco
>> url telnet://admin:admin@switch.mydomain
>>
>
>
> *Manifest: /etc/puppet/manifests/switch.pp*
>
>
>> interface {
>>   "GigabitEthernet0/1":
>> description => "puppet test",
>> }
>> }
>
>

I think this needs to be under a node that matches your device.conf
setting, so site.pp:

node switch.mydomain {
  interface { ...
  }
}

HTH,

Nan

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CACqVBqAiHGEQ3AemE_7-4EXO7D2uxBK2mecAEv%2Bp%3DqWHuTmg9w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet on Windows running in no daemon mode...how to handle required reboots?

2014-08-22 Thread Rob Reynolds
On Fri, Aug 22, 2014 at 10:38 AM, Charlie Baum 
wrote:

> Running Puppet on Windows 2008r2 and 2012 in no daemon mode for a few
> applications.  Issue we are having is some tools/apps such as .net 4.5 and
> some MSI files we are installing require a reboot.  In no daemon mode, when
> the system reboots and comes back up the puppet recipe doesn't continue
> where it left off, so you have to run the puppet command again to kick it
> off.  If there's a couple reboots, there are multiple interactions here.
>  If this is on 10 systems, it's a little ridiculous.
>
> Any idea how we can get around this?  How we can get the recipe to pick up
> where it left off?  Can't seem to find anything out there related to this
> issue.
>

Puppet does need to be kicked back off. The agent runs when the system is
booted, so it just picks back up and starts processing puppet again (the
whole idempotent catalog, the net affect is that it picks up where it left
off).

To achieve the same with a no daemon mode you need to set up something to
make puppet apply run when the box is first booted.  The least fancy way is
to just set up a script to run when the box is first turned on.  The harder
part is getting it to work without having to login. A scheduled task could
achieve this with the trigger "At startup"[1]. Be aware that networking may
or may not be available yet. Note that while "at startup" is a valid
trigger and it is in the win32-taskscheduler[2] gem version that we use, it
will likely not work with the scheduled_task resource[3] without changes to
validation of win32_taskscheduler[4] and other areas to allow for
at_startup to be considered a valid trigger schedule value.

[1] http://technet.microsoft.com/en-us/library/cc748841.aspx
[2]
https://github.com/djberg96/win32-taskscheduler/blob/win32-taskscheduler-0.2.2/lib/win32/taskscheduler.rb#L110
[3]
https://docs.puppetlabs.com/references/3.6.latest/type.html#scheduled_task-attribute-trigger
[4]
https://github.com/puppetlabs/puppet/blob/3.6.2/lib/puppet/provider/scheduled_task/win32_taskscheduler.rb#L347-L348

>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/1bdf4074-61a7-4a1f-892e-61f2f75b74f1%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Rob Reynolds
Developer, Puppet Labs

*Join us at PuppetConf 2014 , September
20-24 in San Francisco*
*Register by September 8th to take advantage of the Final Countdown

*
*--**save $149!*

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAMJiBK5mRFUh3zwDXcymBRpZcExL%3DYNgZHNszLPBYJ8DLY5c%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Cisco: No error, but no Applying

2014-08-22 Thread Nathan Brito
I'm trying to apply settings on a Cisco Catalyst 2960S through the puppet, 
but I can not. 

When I give the "device #puppet verbose" command, the puppet does not 
return me error but does not apply the manifest. 


*Follows the return of the command:*

#puppet device --verbose
> Info: starting applying configuration to switch.mydomain at 
> telnet://admin:admin@switch.mydomain
> Info: Retrieving pluginfacts
> Info: Retrieving plugin
> Info: Caching catalog for switch.mydomain
> Info: Applying configuration version '1408732346'
> Notice: Finished catalog run in 0.05 seconds



*/etc/puppet/puppet.conf:*

[main]
> logdir=/var/log/puppet
> vardir=/var/lib/puppet
> ssldir=/var/lib/puppet/ssl
> rundir=/var/run/puppet
> factpath=$vardir/lib/facter
> #templatedir=$confdir/templates
> [master]
> # These are needed when the puppetmaster is run by passenger
> # and can safely be removed if webrick is used.
> ssl_client_header = SSL_CLIENT_S_DN
> ssl_client_verify_header = SSL_CLIENT_VERIFY
> dns_alt_names = puppetmaster,puppetmaster.mydomain


*/etc/puppet/device.conf*

[switch.mydomain]
> type cisco
> url telnet://admin:admin@switch.mydomain
>

 
*Manifest: /etc/puppet/manifests/switch.pp*
 

> interface {
>   "GigabitEthernet0/1":
> description => "puppet test",
> }
> }


*PS: after that I see that nothing has changed on the switch*

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/d366038c-1062-4e1c-b21f-2bb7cbacc2ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet on Windows running in no daemon mode...how to handle required reboots?

2014-08-22 Thread Charlie Baum
Running Puppet on Windows 2008r2 and 2012 in no daemon mode for a few 
applications.  Issue we are having is some tools/apps such as .net 4.5 and 
some MSI files we are installing require a reboot.  In no daemon mode, when 
the system reboots and comes back up the puppet recipe doesn't continue 
where it left off, so you have to run the puppet command again to kick it 
off.  If there's a couple reboots, there are multiple interactions here. 
 If this is on 10 systems, it's a little ridiculous.

Any idea how we can get around this?  How we can get the recipe to pick up 
where it left off?  Can't seem to find anything out there related to this 
issue.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1bdf4074-61a7-4a1f-892e-61f2f75b74f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Confused Puppet Manifest ... Possible caching issue?

2014-08-22 Thread Matt W
Even with the caching disabled, I think we ran into this again. Can one of 
the puppet-devs chime in here and let me know what might be going on?

On Thursday, August 14, 2014 10:25:06 AM UTC-7, Matt W wrote:
>
> I've got a pretty strange issue here. Imagine we have two servers... 
> *ServerA* and *ServerB*. Last night *ServerB* pulled down some 
> configuration bits from our puppet servers and tried to re-name itself to 
> *ServerA*.
>
> How? Well theres two things that may have triggered this behavior.
>
> 1. We use a custom Puppet Node Name fact to set our node names, rather 
> than the hostnames:
>
> [main]
>> ...
>> # Use the fact 'puppet_node' as our node classifier rather than the 
>> hostname.
>> node_name = facter
>> node_name_fact = puppet_node
>
>
> 2. We have Nginx proxy_cache all of our GET/HEAD requests to avoid 
> hammering the Puppet Master processes with calls to the mostly static 
> content like templates:
>
> # Never, ever, ever cache our certificate or API requests... 
>> always pass them to the puppet master.
>> location ~ /(.*)/certificate(.*)/(.*)$ { proxy_pass 
>> http://unicorn; }
>> # If a request comes in for the 'master' environment, do not cache it at 
>> all
>> location ~ /master/(.*)$ { proxy_pass http://unicorn; }
>> location / {
>> # Cache all requests to the Puppet Unicorn process for at 
>> least 10 minutes.
>> proxy_cache nginx;
>> proxy_cache_methods GET HEAD;
>> proxy_cache_key "$scheme$proxy_host$request_uri";
>> proxy_cache_valid 10m;
>> proxy_cache_valid 404 1m;
>> proxy_ignore_headers X-Accel-Expires Expires Cache-Control 
>> Set-Cookie;
>> proxy_pass http://unicorn;
>> }
>
>
> Digging into the logs, it looks like we're caching a bit too much and are 
> actually caching the //node/ queries. Here you can 
> see that we generate the results once, then return cached results on the 
> next several queries:
>
> "GET /production/node/nsp_node_prod? HTTP/1.1" 200 13834 "-" "-" 0.021
>> "GET /production/node/nsp_node_prod? HTTP/1.1" 200 13834 "-" "-" 0.000
>> "GET /production/node/nsp_node_prod? HTTP/1.1" 200 13834 "-" "-" 0.000
>> "GET /production/node/nsp_node_prod? HTTP/1.1" 200 13834 "-" "-" 0.000
>> "GET /production/node/nsp_node_prod? HTTP/1.1" 200 13834 "-" "-" 0.000
>> "GET /production/node/nsp_node_prod? HTTP/1.1" 200 13834 "-" "-" 0.000
>
>
> So, I have two questions ..
>
> 1. What is the purpose of calling the Node API? Is the agent doing this? 
> Why?
> 2. Is it possible that if an agent called the node api and got "its own 
> node information" that was wrong, it could then request an invalid catalog?
>
> (Note, we're running Puppet 3.4.3 behind Nginx with Unicorn... and yes, 
> even though we use a single node name for these machines, they use 
> different 'facts' to define which packages and roles they are serving up...)
>
> Matt Wise
> Sr. Systems Architect
> Nextdoor.com
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/92841fde-fd41-4d87-889c-90fa7d302352%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet 'node data' when using common node_names?

2014-08-22 Thread Matt W
Anyone have any thoughts on this?

On Thursday, August 14, 2014 10:39:16 AM UTC-7, Matt W wrote:
>
> We noticed that our puppet reports and our puppet node data stored on our 
> puppet servers is always written out in the form of the 'node name'. So 
> when we use a node name like 'prod_webserver' across many webserver 
> machines, we get a tree of reports and node data like this:
>
> /var/lib/puppet/yaml/node/prod_web.yaml
>> /var/lib/puppet/yaml/facts/prod_web.yaml
>> /var/lib/puppet/reports/prod_web
>> /var/lib/puppet/reports/prod_web/201408130200.yaml
>> /var/lib/puppet/reports/prod_web/201408140811.yaml
>> /var/lib/puppet/reports/prod_web/201408121328.yaml
>> /var/lib/puppet/reports/prod_web/201408130743.yaml
>> /var/lib/puppet/reports/prod_web/201408140454.yaml
>
>
> Where each of those reports likely reflects a compilation run for a 
> different host... and the facts/node files at the top are getting 
> constantly re-written as new clients come in.
>
> Is there a way to change the behavior of the data there to be written out 
> based on the ${::fqdn} of the host (or certname) rather than its node name?
>
> (our client puppet configs ...)
>
>> [main]
>> ...
>> node_name = facter
>> node_name_fact = puppet_node
>
>
> (a client puppet fact file...)
>
>> puppet_node=prod_web
>> puppet_environment=production
>> package=frontend=some-version-here
>> app_group=us1
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/40c0048d-fc90-4006-99da-98bfa9ba94a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Could not set 'file on ensure: undefined method `&' for "760"

2014-08-22 Thread Michael Wörz
Hello, 

i could narrow this down a little bit

`&' for "760":String
stands for the file permissions declared as

mode => '0760',

so there must be a problem when setting file permissions.



-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b3de1255-6f1b-44f1-83e7-51a87a624e2e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Script to track orphaned resources

2014-08-22 Thread Martin Langhoff
For context... Our puppet setup is complex, with many behaviors controlled
by facter facts, in part controlled by a .INI file that support personnel
can edit. We manage thousands of VMs.

So unit tests are interesting but offer very limited coverage. Tracking
orphans on live nodes is much more comprehensive. In particular it catches
things folks haven't thought about.

For example, a node had a class webserver applied. For whatever (bad)
reasons that class is no longer applied... hey this node has apache
installed and running, but now unmanaged! We sure as heck want an alert
over that.

Any long-term puppet infra has high risk of orphaned resources. There's so
many ways this can happen.

cheers,

m
On Aug 21, 2014 6:08 PM, "Garrett Honeycutt" 
wrote:

> On 8/21/14 5:45 PM, Manuel Quiñones wrote:
> > Hello,
> >
> > I'm working on a utility script to track orphaned resources.  With
> > orphans I mean: resources that were previously managed by Puppet, but
> > they no longer are.  I want to track those while I do a refactor in my
> > manifests.
> >
> > Here is the script I wrote:
> >
> > https://gist.github.com/manuq/eec269ce7ba00974f46e
> >
> > It is based on some assumptions, and here is my question: are these
> > assumptions correct?
> >
> > - Puppet generates the following files on each run, even when called
> > with --noop:
> > - last_run_report.yaml: contains the resources currently managed, in
> > full detail (serialized Puppet objects)
> > - state.yaml: contains the resources Puppet ever managed since the file
> > was created, only their name and some timestamps "checked" and "synced"
> > - last_run_summary.yaml: among other things, contain the timestamp of
> > the run, and the total time it took
> >
> > Based on that, I have two methods that output the orphans:
> >
> > Method 1: use state.yaml and read the "checked" timestamp. If it was not
> > checked in the last run, then it is an orphan.
> > Method 2: orphans are the subset of resources that are contained in
> > state.yaml and are not contained in last_run_report.yaml.
> >
> > Critics and suggestions welcome.  Also I hope this can be useful to
> others.
> > Cheers,
> >
> > PS Note that this topic was discussed earlier in May.  I took it as
> > initial reference:
> >
> https://groups.google.com/forum/#!searchin/puppet-users/orphan/puppet-users/ghKfRBkPD5A/m7KTeymd2XwJ
>
> Hi Manuel,
>
> Your plan is quite clever though if your goal is to refactor your puppet
> modules and not leave anything out, spec tests are the way to go.
>
> http://rspec-puppet.com/tutorial/
>
> Best regards,
> -g
>
> --
> Garrett Honeycutt
> @learnpuppet
> Puppet Training with LearnPuppet.com
> Mobile: +1.206.414.8658
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/53F66DE9.4020705%40garretthoneycutt.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CACPiFCJsMK0oOMOZH6WcL27VDk3At3Dz8Pp1Q2o27zPv%2BsmvaQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] agent needs to get info from another agent (dependency)

2014-08-22 Thread Sai Kothapalle
Hi,

 Here is my unique case. I have a speech search application for which the 
standard installation is to install the application components on 3 nodes 
or agents. The components have the following depency


   -  Agent 1 needs hostname of agent 2 and agent 3 which is written into a 
   config file
   -  Agent 2 and Agent 3 need the private IP address of Agent 1 to be 
   written into a config file which it uses while starting up the service.
   
I am able to install the packages using puppet and load the config files 
using erb templates. However, I am unsure of how to go about the dependency 
between agents. Did lookup Exported resources but while the syntax gives an 
option to export a type, how do I export IP address etc. is there a better 
option> Thanks for the help


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/2a1950aa-dfc9-4251-8209-009827e78f34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Could not set 'file on ensure: undefined method `&' for "760"

2014-08-22 Thread Michael Wörz
Hello, i have a error that occurs randomly on my Suse 11.3 boxes with 
puppet agent 2.6.18

err: /Stage[main]/Staging::Register/File[/tmp/registersmt.sh]/ensure: 
change from absent to file failed: Could not set 'file on ensure: undefined 
method `&' for "760":String at 
/etc/puppet/environments/test/modules/staging/manifests/register.pp:40

this error occured also in other classes where files are copied.

Downgrading  to an oder package for just one run helps.
 
zypper install --oldpackage puppet-2.6.17-0.3.1.x86_64

Is this a known bug?

cheers

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/779915a7-df6b-4bd6-8679-e9d86cd4529e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Install local rpm with puppet

2014-08-22 Thread Yanis Guenane
Hi Juliano,

>> package epel-release-7-0.2.noarch.rpm is already installed

You are using -ivh, so if package is already installed it will fail.
Which is apparently the case.
You should use -Uvh, (U for upgrade) meaning in case the package you try
to install is more recent that the one that is installed, it will
upgrade it.

Also not sure why you don't use the EPEL module on the forge
https://forge.puppetlabs.com/stahnma/epel, which does install EPEL
pretty well.

Hope it helps,

--
Yanis Guenane




On 08/21/2014 02:55 PM, Juliano Resende wrote:
> Hi,
> 
> I made a mistake, the name of the rpm package is wrong, the correct form is
> 
>  package {'epel-release-7-0.2.noarch':
>  ensure => present,
>  provider => 'rpm',
>  install_options => ['-ivh'],
>  source => "/tmp/epel-release-6-8.noarch.rpm",
>  require => File["/tmp/epel-release-6-8.noarch.rpm"],
>  }
>  file { "/tmp/epel-release-6-8.noarch.rpm":
>  source => 
> "puppet:///modules/core/repository/epel-release-6-8.noarch.rpm"
>  }
> 
> Thanks any way
> 
> Em quinta-feira, 21 de agosto de 2014 14h50min56s UTC-3, Juliano Resende 
> escreveu:
>>
>> Hi people,
>>
>> I created a module to install some rpms, but after rpm is installed, in 
>> the next time the agent go check for new changes in my puppet master, i get 
>> the error with the information that rpm packages is already installed.
>>
>> My module 
>>
>>  package {'epel-repo-centos7':
>>   ensure => present,
>>   provider => 'rpm',
>>   install_options => ['-ivh'],
>>   source => "/tmp/epel-release-7-0.2.noarch.rpm",
>>   require => File["/tmp/epel-release-7-0.2.noarch.rpm"],
>>   }
>>  file { "/tmp/epel-release-7-0.2.noarch.rpm":
>>   source => 
>> "puppet:///modules/repository/epel-release-7-0.2.noarch.rpm"
>>  }
>>
>> Error
>>
>> LevelMessageSourceFileLineTimeerrExecution of '/bin/rpm -i -ivh /tmp/
>> epel-release-7-0.2.noarch.rpm' returned 1: Preparing... 
>> ## package 
>> puppetlabs-release-6-10.noarch is already installedPuppet2014-08-21 13:46 
>> BRTerrchange from absent to present failed: Execution of '/bin/rpm -i 
>> -ivh /tmp/epel-release-7-0.2.noarch.rpm' returned 1: Preparing... 
>> ## package 
>> epel-release-7-0.2.noarch.rpm is already installed
>> /Stage[main]/Core::Repository/Package[epel-release-7]/ensure
>> /etc/puppet/environments/production/modules/core/manifests/repository.pp572014-08-21
>>  
>> 13:46 BRT
>> Somebody knows why?
>>
>> Thanks.
>>
>> At,
>>
>> Juliano Resende - Brasil
>>
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/53F72FC0.3060608%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Error 406 while communicating with puppet on port 443

2014-08-22 Thread Ed Lima
I'm using puppet enterprise 3.3.1 and all my nodes/master are running on 
Ubuntu 14.04.1. This is my puppet.conf:


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *root@puppet:~# cat /etc/puppetlabs/puppet/puppet.conf[main] certname = 
> puppet.openstacklocal dns_alt_names = puppet,puppet.lan vardir = 
> /var/opt/lib/pe-puppet logdir = /var/log/pe-puppet rundir = 
> /var/run/pe-puppet basemodulepath = 
> /etc/puppetlabs/puppet/modules:/opt/puppet/share/puppet/modules server = 
> puppet.openstacklocal user = pe-puppet group = pe-puppet archive_files = 
> true archive_file_server = puppet.openstacklocal[master] certname = 
> puppet.openstacklocal ca_name = 'Puppet CA generated on puppet at 
> 2014-08-14 05:03:59 +' reports = console,puppetdb node_terminus = 
> console ssl_client_header = SSL_CLIENT_S_DN ssl_client_verify_header = 
> SSL_CLIENT_VERIFY storeconfigs = true storeconfigs_backend = 
> puppetdb[agent] report = true classfile = $vardir/classes.txt localconfig = 
> $vardir/localconfig graph = true pluginsync = true environment = production*


I'm have 7 nodes so far but there are 2 of them giving me lots of grief. I 
cannot get them to work properly with the current puppet master. I used 
them with the free version in the past and they worked fine. Since there 
are 2 different problems I'll mention one of them here and will create 
another topic for the second one. I already looked all over google to try 
and fix it but couldn't find anything helpful.

Basically this is what I get:


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *root@search:~# puppet agent -tWarning: Unable to fetch my node 
> definition, but the agent run will continue:Warning: Error 400 on SERVER: 
> Error 406 while communicating with puppet.openstacklocal on port 443:Info: 
> Retrieving pluginInfo: Loading facts in 
> /var/opt/lib/pe-puppet/lib/facter/platform_tag.rbInfo: Loading facts in 
> /var/opt/lib/pe-puppet/lib/facter/postgres_default_version.rbInfo: Loading 
> facts in 
> /var/opt/lib/pe-puppet/lib/facter/pe_puppetdb_server_status.rbInfo: Loading 
> facts in /var/opt/lib/pe-puppet/lib/facter/concat_basedir.rbInfo: Loading 
> facts in /var/opt/lib/pe-puppet/lib/facter/staging_http_get.rbInfo: Loading 
> facts in 
> /var/opt/lib/pe-puppet/lib/facter/iptables_persistent_version.rbInfo: 
> Loading facts in /var/opt/lib/pe-puppet/lib/facter/custom_auth_conf.rbInfo: 
> Loading facts in 
> /var/opt/lib/pe-puppet/lib/facter/ip6tables_version.rbInfo: Loading facts 
> in /var/opt/lib/pe-puppet/lib/facter/windows.rbInfo: Loading facts in 
> /var/opt/lib/pe-puppet/lib/facter/root_home.rbInfo: Loading facts in 
> /var/opt/lib/pe-puppet/lib/facter/pe_version.rbInfo: Loading facts in 
> /var/opt/lib/pe-puppet/lib/facter/pe_postgres_default_version.rbInfo: 
> Loading facts in /var/opt/lib/pe-puppet/lib/facter/facter_dot_d.rbInfo: 
> Loading facts in /var/opt/lib/pe-puppet/lib/facter/pe_build.rbInfo: Loading 
> facts in /var/opt/lib/pe-puppet/lib/facter/puppet_vardir.rbInfo: Loading 
> facts in /var/opt/lib/pe-puppet/lib/facter/iptables_version.rbError: Could 
> not retrieve catalog from remote server: Error 400 on SERVER: Failed when 
> searching for node search.openstacklocal: Error 406 while communicating 
> with puppet.openstacklocal on port 443:Warning: Not using cache on failed 
> catalogError: Could not retrieve catalog; skipping run*


I can get to port 443 on the master fine from the node:

root@search:~# telnet puppet.openstacklocal 443
> Trying x.x.x.x...
> Connected to puppet.lan.
> Escape character is '^]'.
> ^]
> telnet> quit
> Connection closed.


The node shows up on the dashboard however the catalog is empty. I also 
cannot execute any manifests from the master on it.

I already tried several times to remove puppet from the node and reinstall 
from scratch, same thing with the master but I always get the same error.

Any ideas?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/0f62ceac-3787-481e-ae2b-92f8b6d43a1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.