[Puppet Users] Puppet/Puppetboard throwing error 'Internal Server Error'

2016-01-25 Thread Manoj Kumar
Getting following error in apache logs :

[Mon Jan 25 11:44:21.960584 2016] [:error] [pid 13523] 
ERROR:pypuppetdb.api:Not Found localhost:8080 over HTTP.
[Mon Jan 25 11:44:21.964374 2016] [:error] [pid 13523] 
ERROR:pypuppetdb.api:Not Found localhost:8080 over HTTP.
[Mon Jan 25 11:44:21.964949 2016] [:error] [pid 13523] 
ERROR:puppetboard.app:Exception on /favicon.ico/ [GET]
[Mon Jan 25 11:44:21.964967 2016] [:error] [pid 13523] Traceback (most 
recent call last):
[Mon Jan 25 11:44:21.964974 2016] [:error] [pid 13523]   File 
"/srv/puppetboard/virtenv-puppetboard/lib/python2.7/site-packages/flask/app.py",
 
line 1817, in wsgi_app
[Mon Jan 25 11:44:21.964980 2016] [:error] [pid 13523] response = 
self.full_dispatch_request()
[Mon Jan 25 11:44:21.964985 2016] [:error] [pid 13523]   File 
"/srv/puppetboard/virtenv-puppetboard/lib/python2.7/site-packages/flask/app.py",
 
line 1477, in full_dispatch_request
[Mon Jan 25 11:44:21.964991 2016] [:error] [pid 13523] rv = 
self.handle_user_exception(e)
[Mon Jan 25 11:44:21.964997 2016] [:error] [pid 13523]   File 
"/srv/puppetboard/virtenv-puppetboard/lib/python2.7/site-packages/flask/app.py",
 
line 1370, in handle_user_exception
[Mon Jan 25 11:44:21.965002 2016] [:error] [pid 13523] return 
self.handle_http_exception(e)
[Mon Jan 25 11:44:21.965008 2016] [:error] [pid 13523]   File 
"/srv/puppetboard/virtenv-puppetboard/lib/python2.7/site-packages/flask/app.py",
 
line 1330, in handle_http_exception
[Mon Jan 25 11:44:21.965014 2016] [:error] [pid 13523] return handler(e)
[Mon Jan 25 11:44:21.965019 2016] [:error] [pid 13523]   File 
"/srv/puppetboard/puppetboard/puppetboard/app.py", line 110, in not_found
[Mon Jan 25 11:44:21.965024 2016] [:error] [pid 13523] envs = 
environments()
[Mon Jan 25 11:44:21.965030 2016] [:error] [pid 13523]   File 
"/srv/puppetboard/puppetboard/puppetboard/app.py", line 73, in environments
[Mon Jan 25 11:44:21.965035 2016] [:error] [pid 13523] envs = 
get_or_abort(puppetdb.environments)
[Mon Jan 25 11:44:21.965040 2016] [:error] [pid 13523]   File 
"/srv/puppetboard/puppetboard/puppetboard/utils.py", line 26, in 
get_or_abort
[Mon Jan 25 11:44:21.965045 2016] [:error] [pid 13523] 
abort(e.response.status_code)
[Mon Jan 25 11:44:21.965050 2016] [:error] [pid 13523]   File 
"/srv/puppetboard/virtenv-puppetboard/lib/python2.7/site-packages/werkzeug/exceptions.py",
 
line 576, in __call__
[Mon Jan 25 11:44:21.965056 2016] [:error] [pid 13523] raise 
self.mapping[code](*args, **kwargs)
[Mon Jan 25 11:44:21.965061 2016] [:error] [pid 13523] NotFound: 404: Not 
Found


Can anyone please help on this?

-- 
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/e347bc0d-d1c4-4b9d-be20-5a89e0a45cdf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Accessing defined type resources from a epp template

2016-01-25 Thread jcbollinger


On Friday, January 22, 2016 at 10:21:21 AM UTC-6, Gerhardus Geldenhuis 
wrote:
 

> I can easily reference the variables from the class and get their values 
> in the EPP template however I can't do it for the defined type without 
> passing variables as part of the epp function call and declaring the 
> variables at the top of the epp template. Why is there a difference in how 
> variables are accessed from a epp template, between a defined type and a 
> class. Am I missing something or is it by design? I am using puppet 4.3.1
>
>
The EPP documentation describes variable access.  In short, the behavior 
you observe is by design.  EPP templates get their own local scope that 
inherits from *node scope* 
,
 
not from the scope in which the template is evaluated (unless that happens 
to be node scope).  This differs from ERB templates, whose local scope 
*does* inherit from the scope in which the template is evaluated 
.
  
As the docs describe, an EPP's local scope is much like a defined type's.

An EPP template can access any variable not visible from its own scope 
(such as class variables of any class) via that variable's qualified name, 
just like any DSL code can do.  Defined-type instances are resources, 
however; their local variables have no qualified names, so they are 
directly accessible only in the instance's local scope or a scope that 
inherits from it.  Defining parameters for your EPP template is the 
intended way for you to provide for data that vary between one evaluation 
and another within the same catalog-building run.


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/f449b289-7f8c-44b1-88c0-efaab881fd26%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet 4.3.1 - lookup failing - versioncmp() error

2016-01-25 Thread jcbollinger


On Sunday, January 24, 2016 at 12:15:32 PM UTC-6, Matt Watson wrote:
>
> Hey guys, 
>
> I recently came up against an error in 4.3.1 where versioncmp() seems to 
> be broken:
>
> Debug: Performing a hiera indirector lookup of lookup_options with options 
> {:variables=>Scope(Class[Role::Gr01]), 
> :merge=># @options_t=# @elements=[# @key_type=# @optional_type=# @size_type=nil, @values=["strategy"]>>, 
> @value_type=# @optional_type=# @patterns=[# @pattern="hash", @regexp=/hash/>]>>>]>, @options={}>}
>
>

I fail to see why the log output you presented makes you think there is 
anything wrong with versioncmp(), nor indeed that there is any problem at 
all.  It's merely a debug-level message, which you should be able to 
suppress by turning off debug-level logging at the master.  There is not 
even any reason to suppose that the message was emitted in the context of a 
call to versioncmp().  I do see similar debug messages in the log output in 
the description of issue PUP-5721, but they are not characteristic of any 
error there, either.  The issue is not about them.

The issues you linked seem to derive from versioncmp() requiring both its 
arguments to be strings.  There's nothing new or unusual about that.  The 
underlying problem in both cases may be one of wrong expectations.  For 
example, the (standard) DSL evaluator in Puppet 3 and earlier automatically 
interpreted absence of a value (which can be spelled "undef") as an empty 
string in some contexts where doing so is questionable.  Code that depends 
on that behavior will not work in Puppet 4 (or in Puppet 3 with 
parser=future) because the new evaluator preserves undef wherever it can 
do, so as to avoid losing information.  Indeed, the new evaluator is 
overall much more attentive to data types than the old one is.

If indeed you do have a problem, not just a debug message, then we may be 
able to help you, but it is difficult to give you any specific advice when 
you present neither the DSL code that exhibits the problem nor the error 
message that Puppet emits.


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/30bed461-f2b9-475d-bd11-e0bad7af39bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: PE console missing the PE_REPO class for agent packages

2016-01-25 Thread Ben Ford
Hey Mike! I suspect that what you see is the result of modifying your 
basemodulepath or overriding your modulepath in an environment.conf file. 
They should be set something like the following:

root@master:~ # puppet master --configprint basemodulepath
/etc/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules
root@master:~ # puppet master --configprint modulepath
/etc/puppetlabs/code/environments/production/modules:/etc/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules

Hope that helps you track it down!


On Monday, January 25, 2016 at 7:45:25 AM UTC-8, mike r wrote:
>
> Hey all, Im running PE 4.1, master is Ubuntu 14, trying to push out an 
> agent for Centos and Ubuntu 12, using the curl -k script
>
> Problem is on my console, PE Masters classes, I dont see any pe_repo:: 
> options to add additional agent installers,
>
>
> the only classes I see are my standard modules, I dont see the out of box 
> pe_ classes.  I noticed that all my pe_ classes were marked for deletion 
> for some reason. Not sure how to set it back so it shows pe_rep:: and other 
> classes.
>

-- 
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/8aedf698-1d49-4b3f-a5a7-b755eaed9da6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Error: Could not find class apache

2016-01-25 Thread Maruti Gangumolu
Hi Team,

I'm new to puppet coding and I'm trying to install apache tomcat using 
class which is being included in nodes.pp file. 

I'm getting this error message when running site.pp file

C:\ABC\Puppet\manifests>puppet apply C:\ABC\Puppet\manifests\site.pp
Warning: The use of 'import' is deprecated at 
C:/ABC/Puppet/manifests/site.pp
:1. See http://links.puppetlabs.com/puppet-import-deprecation
   (at C:/Program Files/Puppet 
Labs/Puppet/puppet/lib/puppet/parser/parser_suppo
rt.rb:110:in `import')
Error: Could not find class apache for  on node imiblr
Error: Could not find class apache for  on node imiblr

Could you please help me in fixing 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/2a28a925-5fd8-4d2e-992d-c4df22e944b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Announce: Facter 2.4.5 Available

2016-01-25 Thread Kylo Ginsberg
On Mon, Jan 25, 2016 at 8:35 AM, robbyt  wrote:

> On Friday, January 22, 2016 at 1:27:33 PM UTC-5, Hailee Kenney wrote:
>>
>> Facter 2.4.5 is a backwards-compatible bug-fix release in the Facter 2
>> series.
>>
>> This release includes minor bug fixes to several different facts.
>>
>> To download Facter, follow the instructions here:
>> http://docs.puppetlabs.com/puppet/3.8/reference/pre_install.html
>>
>> Release notes are available here:
>> https://docs.puppetlabs.com/facter/2.4/release_notes.html#facter-245
>> A complete list of issues fixed in the release is available here:
>> https://tickets.puppetlabs.com/browse/FACT-380?filter=17113
>> We're tracking bugs with an "Affected Version" of "2.4.5" here:
>> https://tickets.puppetlabs.com/browse/FACT-1316?filter=17114
>>
>
> To add a bit more constructive conversation around this release of
> Facter...
>
> Changing the behavior for a very common and important fact (non-backwards
> compatible) in a minor point release seems a bit strange to me. The
> behavior of the ipaddress fact has been essentially the same for many
> years, and many users might not expect this behavior to change in a minor
> release marked as a "bugfix".
>

Thanks for your comments. For context, FACT-380 was a long-standing bug
report, which has gotten more requests as container infra has gotten more
common, so we thought we could do a Good Thing by fixing it in the 2.x
series (it's already addressed in the 3.x series). But that fix has clearly
broken too may workflows depending on the previous behavior.

So we've decided to revert the fix for FACT-380 and release 2.4.6 with that
change. Look for that release tomorrow, Jan 26.

Thanks for your patience.

Kylo


> --
> 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/b1f93510-6618-4cf1-9865-bfd86b8efaea%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Kylo Ginsberg | k...@puppetlabs.com | irc: kylo | twitter: @kylog

-- 
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/CALsUZFFNV2E4933kZ4xSty3iG%3DmPj3%2Br%2BtcDR%3D_M3B_GwiVGzA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Announce: puppet-agent 1.3.4 available

2016-01-25 Thread Eric Sorenson
Puppet Agent 1.3.4 is now available! This is a bugfix release of the
all-in-one Puppet 4 based installer, which bundles Ruby, Facter, Puppet,
and other components into a single package for all supported operating
systems.

Notable changes in this release:
* Support for Ubuntu 'Wily Werewolf'
* Puppet 4.3.2 - big batch of bugfixes, for everything from the new
  "puppet lookup" command to catalog performance profiling to the
  yumrepo provider. Plus bonus speed boosts for all catalog compilation!
  See full Puppet release notes for details: 
https://docs.puppetlabs.com/puppet/latest/reference/release_notes.html
* Facter and Hiera got version bumps to support the new Ubuntu packages;
  Facter has one functionality fix (FACT-1246) but Hiera does not contain
  code changes.

See the release notes for the puppet agent package here:
http://docs.puppetlabs.com/puppet/latest/reference/release_notes_agent.html

To install or upgrade puppet-agent, follow the getting started directions: 
http://docs.puppetlabs.com/puppet/latest/reference/index.html 

Eric Sorenson - eric.soren...@puppetlabs.com - freenode #puppet: eric0
puppet platform // coffee // techno // bicycles

-- 
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/232a99d4-176e-4052-bfd3-554793a1c05b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] r10k database backend

2016-01-25 Thread Garrett Honeycutt
On 1/25/16 6:25 PM, Patrick Lesher wrote:
> Has anyone thought about or tried to have r10k run against a mysql
> backend to populate at least the information the puppetfile gives?
> 
> Updating each puppetfile for a large number of “Environments” can be
> burdonsome when we have to update the version on a number of modules.
>  We already have all of our hiera data in a mysql backend and would like
> to try to simplify some processes.
> 
> Thanks,
> Patrick
> 
> -- 
> 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/4733e1e7-734b-4a13-8bea-c8942a988c40%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.

Hi Patrick,

Without modifying r10k, you could generate the Puppetfile from data in
your database. Keeping the information in a file under revision control
buys you all the nice things related to using a VCS. What is the
motivation of using a database backend? I'm curious as to the problems
you encounter using the normal method of storing your Puppetfile in a
git repo.

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/56A6D41D.6060806%40garretthoneycutt.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] manipulating new facts

2016-01-25 Thread Diego Roccia
Hi

I'm migrating my puppet configuration from 3.6 to v4.2, but I'm having some 
problem with ip type facts. For example, I have this line :

priority  => inline_template('<%= 256 - 
ipaddress.split(".")[3].to_i %>')

on puppet 3.6 and it works, putting there the last octet of my ip address. 
on puppet 4.2 I get:

==> node-1: Error: Evaluation Error: Error while evaluating a Function 
Call, Failed to parse inline template: undefined local variable or method 
`ipaddress' for # at 
/tmp/vagrant-puppet/environments/test/manifests/default.pp:25:16 on node 
node-1.station

I think it depends on the new facts being no longer strings. in facts this 
works:

file { "/var/lib/zookeeper/myid":
ensure => 
present,
   

content => "${ipaddress}"
}

my file contains the whole ip address, but with this: 

file { "/var/lib/zookeeper/myid":
ensure => 
present,
   

content => "${ipaddress.split('.')[3]}"
}

the file is empty
any idea?

thanks in advance
the file contains 



-- 
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/bc86501d-24b0-4439-83c9-84120a32219a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] r10k database backend

2016-01-25 Thread Patrick Lesher
Has anyone thought about or tried to have r10k run against a mysql backend 
to populate at least the information the puppetfile gives?

Updating each puppetfile for a large number of “Environments” can be 
burdonsome when we have to update the version on a number of modules.  We 
already have all of our hiera data in a mysql backend and would like to try 
to simplify some processes.

Thanks,
Patrick

-- 
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/4733e1e7-734b-4a13-8bea-c8942a988c40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.