Re: [Puppet Users] puppet4 stdlib (4.12.0) error with .find method?

2016-09-07 Thread Matthew Pounsett


On Wednesday, 7 September 2016 19:11:04 UTC-4, Henrik Lindberg wrote:
>
>
> The call to `find` is in Ruby, not in puppet. There are numerous calls 
> to find in the Ruby code base. 
>

Yeah, all the stuff I was looking at was ruby.  It hadn't occurred to me to 
check the puppet codebase itself though. 
 

> To find where the error is run the compilation with --trace and look at 
> the logged exception - it will tell you where in Ruby the error 
> occurred. From there is should be able to trace backwards. 
>

Aha.. --trace is a big help there.  It looks like a bug in the pkgng 
provider, possibly?
 

>
> If you are on the latest 4.x the backtrace will include puppet function 
> calls as well as Ruby methods to make this easier. 
>

I'm running 4.5.1.  It doesn't look like the puppet calls were included, to 
me.  
 

>
> The error: 
>Error: Failed to apply catalog: undefined method `find' for 
> nil:NilClass 
>
> may come from an `undef` value (translated to Ruby nil in Ruby if you 
> are using future parser or 4.x) 
>
> Hope this helps pin down where the problem is. 
>

Yeah, I think I found it.   zleslie/pkgng failed to create the repository 
config I asked it to, while deleting the pre-existing default repository (I 
had purge_repos_d set to true).  It looks like in the absence of a 
functioning repository, the pkgng provider fails to handle the condition of 
there being no available packages to install, or even list.

Thanks for your help!

% sudo puppet agent -t --trace
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for puppet.localdomain
Info: Applying configuration version '1473304882'
Error: Failed to apply catalog: undefined method `find' for nil:NilClass
/usr/local/lib/ruby/site_ruby/2.2/puppet/provider/package/pkgng.rb:66:in `block 
in prefetch'
/usr/local/lib/ruby/site_ruby/2.2/puppet/provider/package/pkgng.rb:65:in 
`each'
/usr/local/lib/ruby/site_ruby/2.2/puppet/provider/package/pkgng.rb:65:in 
`prefetch'
/usr/local/lib/ruby/site_ruby/2.2/puppet/transaction.rb:305:in `prefetch'
/usr/local/lib/ruby/site_ruby/2.2/puppet/transaction.rb:205:in 
`prefetch_if_necessary'
/usr/local/lib/ruby/site_ruby/2.2/puppet/transaction.rb:97:in `block in 
evaluate'
/usr/local/lib/ruby/site_ruby/2.2/puppet/graph/relationship_graph.rb:116:in 
`call'
/usr/local/lib/ruby/site_ruby/2.2/puppet/graph/relationship_graph.rb:116:in 
`traverse'
/usr/local/lib/ruby/site_ruby/2.2/puppet/transaction.rb:142:in `evaluate'
/usr/local/lib/ruby/site_ruby/2.2/puppet/resource/catalog.rb:222:in `block 
in apply'
/usr/local/lib/ruby/site_ruby/2.2/puppet/util/log.rb:155:in 
`with_destination'
/usr/local/lib/ruby/site_ruby/2.2/puppet/transaction/report.rb:118:in 
`as_logging_destination'
/usr/local/lib/ruby/site_ruby/2.2/puppet/resource/catalog.rb:221:in `apply'
/usr/local/lib/ruby/site_ruby/2.2/puppet/configurer.rb:171:in `block in 
apply_catalog'
/usr/local/lib/ruby/site_ruby/2.2/puppet/util.rb:223:in `block in benchmark'
/usr/local/lib/ruby/2.2/benchmark.rb:303:in `realtime'
/usr/local/lib/ruby/site_ruby/2.2/puppet/util.rb:222:in `benchmark'
/usr/local/lib/ruby/site_ruby/2.2/puppet/configurer.rb:170:in 
`apply_catalog'
/usr/local/lib/ruby/site_ruby/2.2/puppet/configurer.rb:315:in `run_internal'
/usr/local/lib/ruby/site_ruby/2.2/puppet/configurer.rb:186:in `block in run'
/usr/local/lib/ruby/site_ruby/2.2/puppet/context.rb:65:in `override'
/usr/local/lib/ruby/site_ruby/2.2/puppet.rb:240:in `override'
/usr/local/lib/ruby/site_ruby/2.2/puppet/configurer.rb:185:in `run'
/usr/local/lib/ruby/site_ruby/2.2/puppet/agent.rb:45:in `block (4 levels) 
in run'
/usr/local/lib/ruby/site_ruby/2.2/puppet/agent/locker.rb:21:in `lock'
/usr/local/lib/ruby/site_ruby/2.2/puppet/agent.rb:45:in `block (3 levels) 
in run'
/usr/local/lib/ruby/site_ruby/2.2/puppet/agent.rb:98:in `with_client'
/usr/local/lib/ruby/site_ruby/2.2/puppet/agent.rb:42:in `block (2 levels) in 
run'
/usr/local/lib/ruby/site_ruby/2.2/puppet/agent.rb:65:in `run_in_fork'
/usr/local/lib/ruby/site_ruby/2.2/puppet/agent.rb:41:in `block in run'
/usr/local/lib/ruby/site_ruby/2.2/puppet/application.rb:179:in `call'
/usr/local/lib/ruby/site_ruby/2.2/puppet/application.rb:179:in 
`controlled_run'
/usr/local/lib/ruby/site_ruby/2.2/puppet/agent.rb:39:in `run'
/usr/local/lib/ruby/site_ruby/2.2/puppet/application/agent.rb:353:in `
onetime'
/usr/local/lib/ruby/site_ruby/2.2/puppet/application/agent.rb:331:in 
`run_command'
/usr/local/lib/ruby/site_ruby/2.2/puppet/application.rb:344:in `block in 
run'
/usr/local/lib/ruby/site_ruby/2.2/puppet/util.rb:540:in `exit_on_fail'
/usr/local/lib/ruby/site_ruby/2.2/puppet/application.rb:344:in `run'
/usr/local/lib/ruby/site_ruby/2.2/puppet/util/command_line.rb:128:in `run'
/usr/local/lib/ruby/site_ruby/2.2/puppet/util/command_line.rb:72:in `execute
'
/usr/local/bin/puppet:5:in `'

-- 
You received this message because you are subscribed to the Google Groups 

Re: [Puppet Users] puppet4 stdlib (4.12.0) error with .find method?

2016-09-07 Thread Henrik Lindberg

On 07/09/16 20:58, Matthew Pounsett wrote:


Having just installed zleslie/pkgng in order to ma nage repositories on
my FreeBSD hosts (which in turn required and installed
puppetlabs/stdlib), I'm now getting the following error from my puppet runs:

% sudo puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for puppet.localdomain
Info: Applying configuration version '1473274285'
Error: Failed to apply catalog: undefined method `find' for nil:NilClass

I've checked, and the only place where a find method is called,
anywhere, is within stdlib in the file_line provider and resource, and
in the get_module_path function.

% sudo find . -type f |xargs fgrep -l .find

./modules/stdlib/lib/puppet/provider/file_line/ruby.rb

./modules/stdlib/lib/puppet/parser/functions/get_module_path.rb

./modules/stdlib/spec/unit/puppet/type/file_line_spec.rb


The only one of these called from outside of stdlib is file_line, and
it's called by zleslie/pkgng:

% sudo find . -type f |xargs egrep -l '(file_line|get_module_path)'
./modules/stdlib/CHANGELOG.md
./modules/stdlib/examples/file_line.pp
./modules/stdlib/lib/puppet/provider/file_line/ruby.rb
./modules/stdlib/lib/puppet/type/file_line.rb
./modules/stdlib/lib/puppet/parser/functions/load_module_metadata.rb
./modules/stdlib/lib/puppet/parser/functions/get_module_path.rb
./modules/stdlib/spec/acceptance/get_module_path_spec.rb
./modules/stdlib/spec/functions/load_module_metadata_spec.rb
./modules/stdlib/spec/functions/get_module_path_spec.rb
./modules/stdlib/spec/unit/puppet/type/file_line_spec.rb
./modules/stdlib/spec/unit/puppet/provider/file_line/ruby_spec.rb
./modules/stdlib/README.markdown
./modules/stdlib/checksums.json
./modules/pkgng/manifests/init.pp

I've tried temporarily commenting out the call to file_line that appears
in the pkgng module, and that does not make the error go away.

I'm left with the conclusion that there's a bug in stdlib, but the lack
of debug output makes this hard to track down.   Anyone have any
suggestions for further nailing down which use of 'find' is the error?



The call to `find` is in Ruby, not in puppet. There are numerous calls 
to find in the Ruby code base.
To find where the error is run the compilation with --trace and look at 
the logged exception - it will tell you where in Ruby the error 
occurred. From there is should be able to trace backwards.


If you are on the latest 4.x the backtrace will include puppet function 
calls as well as Ruby methods to make this easier.


The error:
  Error: Failed to apply catalog: undefined method `find' for nil:NilClass

may come from an `undef` value (translated to Ruby nil in Ruby if you 
are using future parser or 4.x)


Hope this helps pin down where the problem is.

Regards,
- henrik


Or is this a known bug?


--
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/4babef51-20d7-4375-9be8-d210874b2534%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.



--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

--
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/5e4bf29a-fa21-d5f5-05ed-ea6d4d3f2abd%40puppet.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppet4 stdlib (4.12.0) error with .find method?

2016-09-07 Thread Matthew Pounsett

Having just installed zleslie/pkgng in order to ma nage repositories on my 
FreeBSD hosts (which in turn required and installed puppetlabs/stdlib), I'm 
now getting the following error from my puppet runs:

% sudo puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for puppet.localdomain
Info: Applying configuration version '1473274285'
Error: Failed to apply catalog: undefined method `find' for nil:NilClass

I've checked, and the only place where a find method is called, anywhere, 
is within stdlib in the file_line provider and resource, and in the 
get_module_path function.

% sudo find . -type f |xargs fgrep -l .find

./modules/stdlib/lib/puppet/provider/file_line/ruby.rb

./modules/stdlib/lib/puppet/parser/functions/get_module_path.rb

./modules/stdlib/spec/unit/puppet/type/file_line_spec.rb

The only one of these called from outside of stdlib is file_line, and it's 
called by zleslie/pkgng:

% sudo find . -type f |xargs egrep -l '(file_line|get_module_path)'
./modules/stdlib/CHANGELOG.md
./modules/stdlib/examples/file_line.pp
./modules/stdlib/lib/puppet/provider/file_line/ruby.rb
./modules/stdlib/lib/puppet/type/file_line.rb
./modules/stdlib/lib/puppet/parser/functions/load_module_metadata.rb
./modules/stdlib/lib/puppet/parser/functions/get_module_path.rb
./modules/stdlib/spec/acceptance/get_module_path_spec.rb
./modules/stdlib/spec/functions/load_module_metadata_spec.rb
./modules/stdlib/spec/functions/get_module_path_spec.rb
./modules/stdlib/spec/unit/puppet/type/file_line_spec.rb
./modules/stdlib/spec/unit/puppet/provider/file_line/ruby_spec.rb
./modules/stdlib/README.markdown
./modules/stdlib/checksums.json
./modules/pkgng/manifests/init.pp

I've tried temporarily commenting out the call to file_line that appears in 
the pkgng module, and that does not make the error go away.

I'm left with the conclusion that there's a bug in stdlib, but the lack of 
debug output makes this hard to track down.   Anyone have any suggestions 
for further nailing down which use of 'find' is the error?  

Or is this a known bug?


-- 
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/4babef51-20d7-4375-9be8-d210874b2534%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: puppetserver unable to start after yum update

2016-09-07 Thread Matthaus Owens
John,
Thanks for the correction. I definitely mixed up my words while responding
here.

On Wed, Sep 7, 2016 at 5:54 AM, jcbollinger 
wrote:

>
>
> On Tuesday, September 6, 2016 at 12:22:03 PM UTC-5, Matthaus Litteken
> wrote:
>>
>> [...] In answer to your second question, rpmnew files are for when a
>> configuration file has been changed by the user and a package update
>> changes it. Because yum/rpm can't safely replace the configuration file, it
>> drops an rpmnew version of the file with a diff of the updated config file
>> from the package. This allows the user to manually merge in any needed
>> changes (in this case the needed change is the change to the
>> BOOTSTRAP_CONFIG setting).
>>
>>
> It's at best misleading to describe .rpmnew files as containing a diff.
> An x.rpmnew file is the version of x that RPM would have installed if x had
> no local modifications.  If you don't need to preserve the local
> modifications then you can replace x with x.rpmnew.  Otherwise, you can *make
> your own diff* between the two to judge how to merge the changes.
>
>
> John
>
> --
> 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/8c9d7ace-dceb-4fc1-bdb7-4955543dfc0e%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/CACD%3DwAd9JsZ%2BvVnBr-Uz6Hcq_QN5kiEbYqfy%3DSQ3r2oFv55Dvg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] roles/profiles in the state of the art

2016-09-07 Thread Rob Nelson
I would suggest against this. Each role should be atomic and independent.
If I change my role, and you were depending on the profiles it included,
you might be negatively affected.

However, it's about your workflow and if you have roles that are
profile-roll ups that rarely change, perhaps it fits your workflow well
enough to be reasonable.

On Wednesday, September 7, 2016, Albert Shih  wrote:

> Hi,
>
> I would like to know if it's « in the state of the art » to include inside
> a role another role.
>
> Or inside a role I should ONLY include profile.
>
> I've got a CMS running in one server. I've two other server one for the
> dev, on for the sandbox.
>
> So I got a role for the first CMS. For the other two server, because I'm
> lazzy guy I would like just include the role_first_CMS inside the dev and
> sandbox, because the only difference (beside data inside hiera) are we add
> some scripts for the synchro.
>
> Regards.
>
> JAS
> --
> Albert SHIH
> DIO bâtiment 15
> Observatoire de Paris
> 5 Place Jules Janssen
> 92195 Meudon Cedex
> France
> Téléphone : +33 1 45 07 76 26/+33 6 86 69 95 71
> xmpp: j...@obspm.fr 
> Heure local/Local time:
> mer 7 sep 2016 16:31:50 CEST
>
> --
> 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/20160907143523.gfbu22cz37iyl4qw%40pcjas.obspm.fr.
> For more options, visit https://groups.google.com/d/optout.
>


-- 

Rob Nelson
rnels...@gmail.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/CAC76iT8Gzji5LwyuAosrHn7rrGQwKSL8xWxO8Huw%2BnTCZWh3-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Problem upgrading to puppetserver 2.5.0 and exported resources

2016-09-07 Thread Andrew Grimberg
On 09/07/2016 05:19 AM, Angel L. Mateo wrote:
> Hello,
> 
> I am upgrading my puppetservers (ubuntu 14.04) from 2.4.0 to 2.5.0.
> Upgrading process it's fine, but after it whenever  I connect a node
> (puppet-agent 1.5.3 or puppet-agent 1.6.2) I'm having a lot of messages
> about creating resources that are actually defined as exported for that
> node.
> 
> I mean I'm having messages like:
> 
> Notice:
> /Stage[main]/Profile::Nagios/Omd_nagios_service[tlm_sorex12_DISCO
> /]/ensure: current_value absent, should be present (noop)
> Notice: /Stage[main]/Profile::Nagios/Omd_nagios_service[tlm_sorex12_Load
> Average]/ensure: current_value absent, should be present (noop)
> 
> but those resources are defined with:
> 
> create_resources('@@omd_nagios_service', $nagios_services,...)
> 
> (where $nagios_services is a hash read from hiera)
> 
> any help?

Greetings Angel,

There's an issue raised [0] about this already. The issue isn't exactly
with the new puppetserver but with the puppet-agent 1.6.0 - 1.6.2 on the
puppet server.

My experience has been that updating client systems to the latest
puppet-agent isn't a problem, only if you've updated the agent on the
puppetserver. Unfortunately puppetserver 2.5.0 requires an agent >=
1.6.0 :-/

-Andy-

[0] https://tickets.puppetlabs.com/browse/SERVER-1495

-- 
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/be52caff-99be-fa04-1f83-783c43f2f05d%40bardicgrove.org.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


[Puppet Users] roles/profiles in the state of the art

2016-09-07 Thread Albert Shih
Hi,

I would like to know if it's « in the state of the art » to include inside
a role another role.

Or inside a role I should ONLY include profile.

I've got a CMS running in one server. I've two other server one for the
dev, on for the sandbox.

So I got a role for the first CMS. For the other two server, because I'm
lazzy guy I would like just include the role_first_CMS inside the dev and
sandbox, because the only difference (beside data inside hiera) are we add
some scripts for the synchro.

Regards.

JAS
--
Albert SHIH
DIO bâtiment 15
Observatoire de Paris
5 Place Jules Janssen
92195 Meudon Cedex
France
Téléphone : +33 1 45 07 76 26/+33 6 86 69 95 71
xmpp: j...@obspm.fr
Heure local/Local time:
mer 7 sep 2016 16:31:50 CEST

-- 
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/20160907143523.gfbu22cz37iyl4qw%40pcjas.obspm.fr.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] simple node classification and custom facts

2016-09-07 Thread Arnau
Hi,

my 2 cents below:

2016-09-04 22:32 GMT+02:00 Berkeley :

> [...]
>
> :hierarchy:
> - "fqdn/%{clientcert}"
> - "env/%{environment}"
> - "roles/%{role}"
> - "os/%{osfamily}
> - common
>
>
> I should add that I'm very comfortable writing ruby code, but for
> something so basic I don't feel like I should be trying to write custom
> facts.  Even a simple way to just specify, per-node, an extra fact I could
> use for hiera's hierarchy would be helpful.
>

I use https://forge.puppet.com/abstractit/puppet to define custom facts.

Then, in hiera, for each node I do something like:

nodeXYZ.yaml
facts::custom_facts: { role: sge_execution_node }


during the first puppet run, it creates the custom fact, the second, the
node know what role it is and does what its expected (same when you switch
roles in a node).

I prefer using a custom fact cause I can interrogate the node about its
role:

# facter -p role
sge_execution_node


I also use the role yaml file in hiera for including classes based:

role/sge_execution_node.yaml
---
classes:
 - role::sge_execution_node
sge::node_type: 'execution'



Best,
Arnau

-- 
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/CAM69jx9Mod8c-z-Pd05DLR0hVt7qPxuV3Cj1LZnBdCfM6Z9MAw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: simple node classification and custom facts

2016-09-07 Thread jcbollinger


On Tuesday, September 6, 2016 at 6:03:33 AM UTC-5, Berkeley wrote:
>
> I'm doing a refactor of my puppet code with the profiles+roles design 
> pattern.  I'm encountering what should be a simple problem, but I'm having 
> trouble finding an answer.
>
> With roles/profiles, you instantiate classes using 'include' and fetch the 
> parameter values from hiera.
>


That's not a given.  I think choice of data binding approach is largely 
perpendicular to use of roles & profiles.

 

>  Then, for each node, you specify one role, which in turn includes all the 
> relevant classes.  Right now I have a hiera hierarchy that references the 
> node's OS, environment and host name.  However, I also want to provide 
> different data based on the role of a node.  For example, a webserver and 
> an email server might run postfix; the webserver uses it to email the admin 
> when something goes wrong, but the email server uses it for much more. 
>  However, I still don't want to instantiate the parameters of the postfix 
> class explicitly from any role or profile to avoid resource conflicts.
>


This is fine if the requirement of every class that wants Postfix is simply 
that Postfix must be installed.  But suppose two profiles want conflicting 
Postfix configurations -- then you *want* Puppet to notice the conflict.  
Puppet class / resource conflicts are not a misfeature simply to be avoided 
or worked around at any cost; they are an intentional feature serving to 
help ensure internal consistency of your configurations.  The biggest 
problem with them is that they can cast too broad a net.

 

>  So, I would like to write hiera data that applies to a particular role 
> (or even a particular profile), like in the following hierarchy below, but 
> I have no idea how to do this:
>
> :hierarchy:
> - "fqdn/%{clientcert}"
> - "env/%{environment}"
> - "roles/%{role}"
> - "os/%{osfamily}
> - common
>
>
>

And what prevents you from doing exactly that?  $role does not need to be a 
fact for that to work -- it can be an ordinary top-scope variable or a 
node-scope variable, too.  And there are other alternatives 
, too.


John

-- 
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/45c65764-abbb-4d99-b088-12d24d6954ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: puppetserver unable to start after yum update

2016-09-07 Thread jcbollinger


On Tuesday, September 6, 2016 at 12:22:03 PM UTC-5, Matthaus Litteken wrote:
>
> [...] In answer to your second question, rpmnew files are for when a 
> configuration file has been changed by the user and a package update 
> changes it. Because yum/rpm can't safely replace the configuration file, it 
> drops an rpmnew version of the file with a diff of the updated config file 
> from the package. This allows the user to manually merge in any needed 
> changes (in this case the needed change is the change to the 
> BOOTSTRAP_CONFIG setting).
>
>
It's at best misleading to describe .rpmnew files as containing a diff.  An 
x.rpmnew file is the version of x that RPM would have installed if x had no 
local modifications.  If you don't need to preserve the local modifications 
then you can replace x with x.rpmnew.  Otherwise, you can *make your own 
diff* between the two to judge how to merge the changes.


John

-- 
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/8c9d7ace-dceb-4fc1-bdb7-4955543dfc0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Problem upgrading to puppetserver 2.5.0 and exported resources

2016-09-07 Thread Angel L. Mateo

Hello,

	I am upgrading my puppetservers (ubuntu 14.04) from 2.4.0 to 2.5.0. 
Upgrading process it's fine, but after it whenever  I connect a node 
(puppet-agent 1.5.3 or puppet-agent 1.6.2) I'm having a lot of messages 
about creating resources that are actually defined as exported for that 
node.


I mean I'm having messages like:

Notice: 
/Stage[main]/Profile::Nagios/Omd_nagios_service[tlm_sorex12_DISCO 
/]/ensure: current_value absent, should be present (noop)
Notice: /Stage[main]/Profile::Nagios/Omd_nagios_service[tlm_sorex12_Load 
Average]/ensure: current_value absent, should be present (noop)


but those resources are defined with:

create_resources('@@omd_nagios_service', $nagios_services,...)

(where $nagios_services is a hash read from hiera)

any help?

--
Angel L. Mateo Martínez
Sección de Telemática
Área de Tecnologías de la Información
y las Comunicaciones Aplicadas (ATICA)
http://www.um.es/atica
Tfo: 868889150
Fax: 86337

--
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/39b86791-33f3-a5a5-c1ea-49108c853676%40um.es.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Influence hiera file selection from within hiera

2016-09-07 Thread Dirk Heinrichs
Am 07.09.2016 um 13:50 schrieb Marc Haber:

> I would like to be able to influence which files hiera reads from with
> in hiera.

You can use facts in :datadir:, like for example:

:datadir: '/etc/puppetlabs/code/environments/%{::environment}/hiera'

While the :hierarchy: stays the same, we checkout different branches of
a hiera repository in each environment to get different file content.

HTH...

Dirk
-- 
*Dirk Heinrichs* | Senior Systems Engineer, Delivery Pipeline
http://mimage.opentext.com/alt_content/binary/images/email-signature/recommind-ot.png

*Tel*: +49 2226 159666 (Ansage) 1149
*Email*: dirk.heinri...@recommind.com 
*Skype*: dirk.heinrichs.recommind

Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach

Vertretungsberechtigte Geschäftsführer John Marshall Doolittle, Gordon
Davies, Roger Illing, Registergericht Amtsgericht Bonn, Registernummer
HRB 10646

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser Mail sind nicht gestattet.





http://www.recommind.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/d8710093-96c2-541b-9a95-16e85783a8ea%40recommind.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Influence hiera file selection from within hiera

2016-09-07 Thread Marc Haber
Hi,

I would like to be able to influence which files hiera reads from with
in hiera. Here is a minimal test:

$ cat hiera.yaml
---
:backends:
  - yaml
:yaml:
  :datadir: "/home/e13itfe/hieratest/yaml/"
:logger: console
:hierarchy:
  - "0_harddefaults"
  - "6_%{::redir}"
  - "9_softdefaults"
$ head -n-0 yaml/*
==> yaml/0_harddefaults.yaml <==

---

redir: in-harddef
::redir: in-harddef-with-colons


==> yaml/6_redir.yaml <==
---
foo: file-redir

==> yaml/9_softdefaults.yaml <==

---
foo: file-softdef

redir: in-softdef
::redir: in-softdef-with-colons

I would like the redir variables that are set in 0_harddefaults.yaml
and in 9_softdefaults.yaml to influence the name of the 6_%{::redir}
file that is in hiera.yaml.

But according to my tests, this does of course not work:

$ hiera --debug --config hiera.yaml foo ::redir=redir
DEBUG: 2016-09-07 13:02:56 +0200: Hiera YAML backend starting
DEBUG: 2016-09-07 13:02:56 +0200: Looking up foo in YAML backend
DEBUG: 2016-09-07 13:02:56 +0200: Looking for data source 0_harddefaults
DEBUG: 2016-09-07 13:02:56 +0200: Looking for data source 6_redir
DEBUG: 2016-09-07 13:02:56 +0200: Found foo in 6_redir
file-redir
$ hiera --debug --config hiera.yaml foo
DEBUG: 2016-09-07 13:02:59 +0200: Hiera YAML backend starting
DEBUG: 2016-09-07 13:02:59 +0200: Looking up foo in YAML backend
DEBUG: 2016-09-07 13:02:59 +0200: Looking for data source 0_harddefaults
DEBUG: 2016-09-07 13:02:59 +0200: Looking for data source 6_
DEBUG: 2016-09-07 13:02:59 +0200: Cannot find datafile 
/home/e13itfe/hieratest/yaml/6_.yaml, skipping
DEBUG: 2016-09-07 13:02:59 +0200: Looking for data source 9_softdefaults
DEBUG: 2016-09-07 13:02:59 +0200: Found foo in 9_softdefaults
file-softdef
$

That means that I can influence the file names that hiera reads from
the command line and probably later in puppet with external variables,
but not from the hiera code itself: The second that hiera starts
reading in the files from the datadir, the list of actual files to be
read is already made and the file names fully expanded.

This sounds logical, but am I reasoning correctly?

Assuming that I am right, is there a way to achieve a similar result?

Assuming that I am wrong, why does it not work?

Any hints will be appreciated.

Greetings
Marc


-- 
-
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany|  lose things."Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421

-- 
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/20160907115050.GE10115%40torres.zugschlus.de.
For more options, visit https://groups.google.com/d/optout.