Re: [Puppet Users] f5 module usage/debugging tips?

2013-07-29 Thread Gavin Williams
Jeff/Chris/All

Completely missed this topic when doing my own investigations on this 
issue... 

However the same problem discussed on 
Puppet-devhas 
highlighted the same issue... 
I have therefore raised Issue 
21975to try and get it fixed... 
Would probably be beneficial if you could 
up-vote it...

Cheers
Gavin

On Tuesday, 18 June 2013 13:56:33 UTC+1, jgm...@gmail.com wrote:
>
> Hi Chris,
>
> I think I've narrowed the issue down.
>
> I'm able to use the 10.2.0.2 f5 gem in a simple script with F5 v11.3.0 to 
> create an f5_node so it looks like the F5 is keeping some 
> backwards-compatibility.
>
> The problem is only occurring when the F5 gem is used within puppet. The 
> f5 gem is using the ruby 1.8.7's built-in SOAP library that clashes with a 
> monkey-patch in Puppet to override the instance_variables method of the 
> basic Ruby Object class. 
>
> The patch was introduced in this commit: 
> https://github.com/puppetlabs/puppet/commit/1f4e44c26a0d703d1192d26ef8ab555e4508e338
> *lib/puppet/util/monkey_patches.rb*:
>
> class Object
>   alias :puppet_original_instance_variables :instance_variables
>
>   def instance_variables
> puppet_original_instance_variables.map(&:to_sym)
>   end
> end
>
>
> This in turn clashes with the SOAP class in Ruby 1.8.7:
> lib/soap/mapping/mapping.rb:
>
>   def self.get_attribute(obj, attr_name)
> if obj.is_a?(::Hash)
>   obj[attr_name] || obj[attr_name.intern]
> else
>   name = XSD::CodeGen::GenSupport.safevarname(attr_name)
>   if obj.instance_variables.include?('@' + name)
> obj.instance_variable_get('@' + name)
>   elsif ((obj.is_a?(::Struct) or obj.is_a?(Marshallable)) and
>   obj.respond_to?(name))
> obj.__send__(name)
>   end
> end
>   end
>
>
> Since Puppet has overridden the instance_variable method to return an 
> Array of Symbols, this breaks the obj.instance_variables.include?('@' + 
> name) line because it is trying to compare a Symbol with a String which 
> will always be false. This in turn causes the F5 gem to send SOAP requests 
> to the F5 with nil values so the nodes are never created on the F5.
>
> This is a pretty strange issue as I thought that there would have been 
> other users of the puppetlabs-f5 module with Ruby 1.8.7 and so would have 
> hit the same issue, or am I missing something?
>
> Anyway, it looks like to fix the problem we'll either need to patch the F5 
> gem to override the above method within Ruby or somehow revert the 
> monkeypatch in Puppet for the F5 puppet module, unless you can think of a 
> cleaner and better solution?
>
> Jeff
>
> On Wednesday, June 12, 2013 3:34:02 PM UTC+10, Christopher Wood wrote:
>>
>> Unfortunately due to various non-puppet bigip upgrade issues I haven't 
>> been able to back to this yet. If I get anything useful working I will 
>> post. 
>>
>> On Tue, Jun 11, 2013 at 03:32:56AM -0700, jgm...@gmail.com wrote: 
>> >Hi Chris, 
>> >How did you go with trying to use the Puppet F5 module with v11.3.0? 
>> I 
>> >think I am having the same issue as you were. 
>> >The puppet output would say that the resource was created but the 
>> iControl 
>> >debug logs shows that it is being sent an empty SOAP create message. 
>> >I've tried running a simple ruby script using the 10.2.0.2 f5 gem 
>> and was 
>> >able to create the node successfully so it looks the Puppet is doing 
>> >something funny. 
>> >Any help would be greatly appreciated. 
>> >Thanks, 
>> >Jeff 
>> > 
>> >On Tuesday, February 12, 2013 8:31:04 AM UTC+11, Christopher Wood 
>> wrote: 
>> > 
>> >  On Mon, Feb 11, 2013 at 12:40:12PM -0800, Nan Liu wrote: 
>> >  >On Mon, Feb 11, 2013 at 8:27 AM, Christopher Wood 
>> >  ><[1][1]christop...@pobox.com> wrote: 
>> >  > 
>> >  >  (Following up to my own post for posterity's sake, see 
>> >  [2][2]xkcd.com/979.) 
>> >  > 
>> >  >  Short form: for me this isn't yet as easy as a file 
>> resource but 
>> >  the 
>> >  >  puppetized management payoff will be worth the work. My 
>> issues 
>> >  are most 
>> >  >  likely a reflection of my own puppet/ruby/iControl/SOAP 
>> skill. 
>> >  > 
>> >  >  I am going to explore a personalized set of F5 
>> types/providers 
>> >  that I 
>> >  >  can use without first loading up the wsdl file for every 
>> involved 
>> >  >  iControl interface, version, and hotfix. 
>> >  > 
>> >  >  Points from my various BigIP/puppet experimentations: 
>> >  > 
>> >  >  a) The f5-icontrol-10.2.0.2.gem doesn't necessarily work 
>> with LTM 
>> >  >  11.1.0. (Or I haven't figured it out, also quite likely.) 
>> This 
>> >  could be 
>> >  >  because the gem ships different wsdl files but I couldn't 
>> get i

[Puppet Users] Re: a different ssh::auth problem

2013-07-29 Thread Joseph Mwesigwa Bbaale
Hi Stephen,

Thank you so much for the clarification.
I am going to the documents that you have recommended.

Regards,

Joseph

On Monday, 29 July 2013 20:26:41 UTC+3, Stephen Brown II wrote:
>
> Greetings,
>
> I'm also new to puppet, but the documentation is basically informing you 
> about the way puppet modules are laid out. From the Puppet documentation (
> http://docs.puppetlabs.com/puppet/3/reference/modules_fundamentals.html):
> On disk, a module is simply a directory tree with a specific, predictable 
> structure:
>
> MODULE NAME
> |--manifests
> |--files
> |--templates
> |--lib
> |--tests
> \--spec1
>
> So it is perfectly fine for you to create the ssh/manifests directory and 
> place the auth.pp file in there. That's where Puppet expects it to be.
>
> I'd recommend going through the Puppet reference to get more information 
> on it, and possbly trying out the Learning Puppet VM Tutorial (
> http://docs.puppetlabs.com/learning/), which also has a section on 
> Modules and Classes (http://docs.puppetlabs.com/learning/modules1.html)
>
> Hope this helps!
> Stephen
>
> On Monday, July 29, 2013 4:12:48 AM UTC-4, Joseph Mwesigwa Bbaale wrote:
>>
>> Hi,
>>
>> I am very new to puppet.
>>
>> I installed puppet 3.2.3 (open source) on Debian Wheezy. Everything seems 
>> to work fine.
>>
>> Now I want to setup ssh::auth on the puppet master. The documentation 
>> states that:
>>
>> "To install ssh::auth, place the file 
>> auth.pp (attached 
>> to this page) into the ssh/manifests directory in your module path: for 
>> example, /etc/puppet/modules/ssh/manifests/auth.pp."
>>
>>
>> Unfortunately my system does not have ssh/manifest and therefore I 
>> wonder, I this a minor issue? If not, how do I go about setting up ssh:auth 
>> in this environment?
>>
>> Any help offered is highly appreciated.
>>
>> Joseph
>>
>>

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Bring a friend to PuppetConf!

2013-07-29 Thread Luke Kanies
Hi all,

PuppetConf is just a few weeks away, believe it or not - the sessions are 
August 22-23, and there's training in SF the week before and after. Last year's 
conference was so packed, we’re hosting PuppetConf 2013 in a bigger (and more 
awesome) venue this year: San Francisco’s historic Fairmont Hotel. We have more 
educational tracks and an amazing speaker lineup[1]. You can get a quick intro 
to the venue and conference in a video tour I took of the hotel:

http://puppetconf.com/location/

We’re offering a special 2-for-1 discount to all of you on the puppet users 
list. Bring a friend to PuppetConf, and you’ll each get a 50 percent discount. 
Here’s your code to register yourself and your friend (make sure to scroll down 
to access the 2-for-1 promotion):

http://puppetconf2013.eventbrite.com/?access=BUYONEGETONE

But hurry, we've limited slots, and we already have more registered than 
attended in 2012. Find a friend and sign up today.  Given that a third to half 
of the attendees at our events tend to be new users, I think this is a great 
way to make it even easier for you to bring new people.

This year’s speakers and tracks will offer great information and advice for 
people working in all kinds of organizations — from startups to the Fortune 
500, and everything in between. We’re featuring sessions for Puppet beginners; 
speakers from companies doing very interesting things with Puppet Labs 
technologies; and an inside look at upcoming developments. And one of the best 
things about the venue is there will be lots of great places in the hallway 
track to hang out and get to know the community.

Hope to see you in a few weeks,

Luke

1 - http://puppetconf.com/schedule/ 

-- 
Luke Kanies | http://about.me/lak | http://puppetlabs.com/ | +1-615-594-8199
Join us at PuppetConf 2013, August 22-23 in San Francisco - 
http://bit.ly/pupconf13

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] puppetlabs-ntp: templates merge, and new features

2013-07-29 Thread Ashley Penney
Hey guys,

https://github.com/puppetlabs/puppetlabs-ntp/pull/80 adds some fairly
significant changes and so I wanted to put it up for review early before
going any further.

The big change is that it gets rid of the distro specific templates in
favor of one more sophisticated template we can start adding options to and
increasing the flexibility of.

To that end it adds a bunch of params to handle ntp keys - is there anyone
on the list using ntp keys?  If so does this feature make sense to you?  Do
you want more? less? different things?

We add preferred_servers for dalen.  Hopefully this is what he wanted!

We add driftfile as a param in case you like to store it in non-standard
places. :)

Anyway, hopefully you guys can tear this apart and find all the flaws and
suggest missing features.  I would appreciate any reviews of the new
template especially as now is the time to find gaps and flaws in it!

Thanks,

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] puppet-dashboard can't read files in /var/lib/puppet/reports

2013-07-29 Thread Joe VanAndel
On CentOS 6.4, with puppet-3.2.3-1 and puppet-dashboard-1.2.23-1, installed 
from the puppetlabs repo,  I found that puppet-dashboard couldn't read the 
reports in
 /var/lib/puppet/reports (permissions drwxr-x--- puppet puppet,)  so the 
dashboard was always out of date.

My solution was to add the puppet-dashboard user to the puppet entry in 
/etc/group

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Augeas, fstab and duplicate lines: How to test ? (onlyif ? not_include ?) ... Examples ?

2013-07-29 Thread haraldchris
Hi,

I am trying to define a new type that will insert a new filesystem line 
into /etc/fstab.

However, no matter what I tried, it will insert a new line each time.

Something like this doesn't work 

augeas { $title:
context => '/files/etc/fstab',
changes => [
"set 01/spec $fs_dev",
"set 01/file $fs_mount",
"set 01/vfstype  $fs_type",
"set 01/opt  $fs_opts",
"set 01/dump $fs_dump",
"set 01/passno   $fs_fsck",
"set 01/#comment $fs_comment",
],
onlyif => "match */spec[. = $fs_dev] size == 0"# also 
tried "match *[spec] not_include $fs_dev"
}

The "not_include" option doesn't seem to work either ... or maybe I din't 
know how to use it (very few examples around to say the least)

unless is not available with augeas (I believe)

Any suggestions ?

(I already know about the available fstab module but I want to understand 
what is going on here)

Many thanks.

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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] puppet environments not working

2013-07-29 Thread me 1
I have a surprising problem with environments not working, i'm using rhel 
6.3 with puppet-3.2.3-1.el6.noarch  and here is the puppet.conf on the 
master:

[main]
logdir = /var/log/puppet
rundir = /var/run/puppet
ssldir = $vardir/ssl
server = puppet.local
reports = store, http
reporturl = http://localhost:80/reports/upload
modulepath = $confdir/modules
manifest = $confdir/manifests/site.pp

[preprod]
modulepath = $confdir/environments/preprod/modules
manifest = $confdir/environments/preprod/manifests/site.pp

[agent]
classfile = $vardir/classes.txt
localconfig = $vardir/localconfig




When I make a change to 1 of the modules in the preprod modulepath, all I 
ever see is this on the client:


$ puppet agent --test --noop --environment preprod --configprint environment
preprod


$ puppet agent --test --noop --environment preprod
Info: Retrieving plugin
Info: Caching catalog for testvm.local
Info: Applying configuration version '1375125121'
Notice: Finished catalog run in 0.01 seconds



-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] puppet apply --hiera_config --> Error: Could not find class

2013-07-29 Thread Werner Dijkerman
Hi there,

I'm running into an problem which I can resolve. It is bugging me for 
couple of days now.
Goal: CentOS 6.4 freshly installed incl puppet 3.2.3 and I want to install 
puppet master, puppetdb, mod_passenger & apache with "puppet apply". So 
when this is complete, I should have an puppet master server running so I 
can create new hosts etc.

So this is the command and error:
[root@vserver-151 ~]# puppet apply --hiera_config /etc/puppet/hiera.yaml 
--modulepath=/etc/puppet/modules/management/ /etc/puppet/manifests/site.pp 
--environment management  --debug
Info: Loading facts in 
/etc/puppet/modules/management/staging/lib/facter/staging_http_get.rb
Info: Loading facts in 
/etc/puppet/modules/management/concat/lib/facter/concat_basedir.rb
Info: Loading facts in 
/etc/puppet/modules/management/stdlib/lib/facter/puppet_vardir.rb
Info: Loading facts in 
/etc/puppet/modules/management/stdlib/lib/facter/root_home.rb
Info: Loading facts in 
/etc/puppet/modules/management/stdlib/lib/facter/facter_dot_d.rb
Info: Loading facts in 
/etc/puppet/modules/management/stdlib/lib/facter/pe_version.rb
Info: Loading facts in 
/etc/puppet/modules/management/postgresql/lib/facter/postgres_default_version.rb
Info: Loading facts in 
/etc/puppet/modules/management/firewall/lib/facter/iptables_version.rb
Info: Loading facts in 
/etc/puppet/modules/management/firewall/lib/facter/iptables_persistent_version.rb
Info: Loading facts in 
/etc/puppet/modules/management/firewall/lib/facter/ip6tables_version.rb
Info: Loading facts in 
/etc/puppet/modules/management/puppet/lib/facter/etckepper_puppet.rb
Debug: hiera(): Hiera YAML backend starting
Debug: hiera(): Looking up classes in YAML backend
Debug: hiera(): Looking for data source Nieuwegein/base
Debug: hiera(): Found classes in Nieuwegein/base
Debug: hiera(): Looking for data source 
Nieuwegein/management/vserver-151.dj-wasabi.nl
Debug: hiera(): Found classes in 
Nieuwegein/management/vserver-151.dj-wasabi.nl
Debug: hiera(): Looking for data source Nieuwegein/management
Debug: hiera(): Data retrieved from 
/etc/puppet/hieradata/Nieuwegein/management.yaml is not a Hash, setting 
defaults
Debug: hiera(): Looking for data source Nieuwegein/common
Debug: hiera(): Looking for data source common
Debug: hiera(): Data retrieved from /etc/puppet/hieradata/common.yaml is 
not a Hash, setting defaults
Error: Could not find class users for vserver-151.dj-wasabi.nl on node 
vserver-151.dj-wasabi.nl
Error: Could not find class users for vserver-151.dj-wasabi.nl on node 
vserver-151.dj-wasabi.nl
[root@vserver-151 ~]#

To give some information about the hiera files:
[root@vserver-151 ~]# cat /etc/puppet/hiera.yaml 
---
:backend:
  - yaml
:hierarchy:
  - %{location}/base
  - %{location}/%{environment}/%{fqdn}
  - %{location}/%{environment} 
  - %{location}/common
  - common
:yaml:
   :datadir: '/etc/puppet/hieradata'

"My location" file
[root@vserver-151 ~]# cat /etc/facter/facts.d/location.yaml 
---
location: Nieuwegein

base file:
[root@vserver-151 ~]# cat /etc/puppet/hieradata/Nieuwegein/base.yaml 
---
classes: [ 'users', 'puppet::agent' ]

puppet::agent::puppet_server: vserver-151.dj-wasabi.nl
puppet::agent::puppet_server_port: 8140
puppet::agent::puppet_run_interval: 30

common file:
[root@vserver-151 ~]# cat /etc/puppet/hieradata/Nieuwegein/common.yaml 
---

nagios_server = 192.168.1.222

# nrpe stuff
nrpe_config_dir: /etc/nrpe.d
nrpe_scripts_dir: /usr/lib64/nagios/plugins/contrib

My site.pp
[root@vserver-151 defines]# cat /etc/puppet/manifests/site.pp 
node default {
   hiera_include('classes','')
}

Configuration file for this host:
[root@vserver-151 Nieuwegein]# cat 
/etc/puppet/hieradata/Nieuwegein/management/vserver-151.dj-wasabi.nl.yaml 
---
classes: ['ruby', 'puppet::master', 'puppetdb', 'apache' ]

puppet::master::storeconfigs: true
puppet::master::autosign: true
puppet::master::puppet_passenger_port: 8140
puppet::master::storeconfigs_dbserver: vserver-151.dj-wasabi.nl

puppet_server_environments:
  production:
modulepath: /etc/puppet/modules/production/
manifest: /etc/puppet/manifests/site.pp
  development:
modulepath: /etc/puppet/modules/development/
manifest: /etc/puppet/manifests/site.pp
  management:
modulepath: /etc/puppet/modules/management/
manifest: /etc/puppet/manifests/site.pp
[root@vserver-151 Nieuwegein]#

Overview of the 'management modules' directory:
[root@vserver-151 ~]# ls -l /etc/puppet/modules/management/
total 80
drwxr-xr-x 8 root root 4096 Jul 27 20:43 apache
drwxr-xr-x 6 root root 4096 Jul 27 20:43 apt
drwxr-xr-x 4 root root 4096 Jul 27 20:43 bin
drwxr-xr-x 6 root root 4096 Jul 27 20:43 concat
drwxr-xr-x 5 root root 4096 Jul 27 20:43 firewall
drwxr-xr-x 5 root root 4096 Jul 27 20:43 inifile
drwxr-xr-x 7 root root 4096 Jul 27 20:43 mrepo
drwxr-xr-x 8 root root 4096 Jul 27 20:43 mysql
drwxr-xr-x 7 root root 4096 Jul 27 20:43 nrpe
drwxr-xr-x 6 root root 4096 Jul 27 20:43 ntp
drwxr-xr-x 5 root root 4096 Jul 27 20:43 passenger
drwxr-xr-x 

[Puppet Users] Verify variable value and set to default param if out of range?

2013-07-29 Thread Stephen Brown II
Greetings all,

I have a feeling I'm trying to be a bit too clever for my own good, or 
making the mistake of treating the declarative language as a procedural. 
But at any rate, here is my issue.

I would like to set up a params class ( in the style of 
http://docs.puppetlabs.com/guides/parameterized_classes
 ) for 
installing mariadb on any operating system that is supported by the 
official mariadb.org repository configuratior: 
https://downloads.mariadb.org/mariadb/repositories/

However, I've noticed that not all versions of MariaDB are available for 
all OS releases. For the most part, 5.5 and 10.0 are available, but for 
older versions of Ubuntu /(hardy|maverick|natty|oneiric)/, only 5.2 and 5.3 
are available.

Here is the gist of my params.pp as it stands: 
https://gist.github.com/StephenBrown2/6106113

What I would eventually like to get working is the ability for the module 
to set a reasonable default, and also allow for overriding in the calling, 
but if the operating system doesn't support that MariaDB release version, 
to use the latest available release instead.

For example, this should work fine:

class { 'maria': }

This should also work:

class { 'maria':
  version => '5.5',
}

both resulting in mariadb 5.5 being installed on anything but those older 
ubuntu's. in which case, Puppet would throw a warning and set $version 
instead to '5.3'.

Similarly, if this was specified:

class { 'maria':
  version => '5.3',
}

on a Debian 7 system, I'd expect it to come back as '10.0'. But this might 
be where the cleverness could be a liability.

Might I have to simply set the default version for each possible 
operatingsystem value? I would hope not, as that seems a bit unweildy, but 
maybe necessary since variables can only be declared once per scope ( 
http://docs.puppetlabs.com/learning/variables
 : "You can only assign the same variable *once* in a given scope." )

Please let me know if I've been unclear, or enlighten me if this is going 
down the wrong path.

Thanks!
Stephen B

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: puppet fails to install some packages but succeed if I do a manual apt-get update --fix-missing. using puppetlabs/apt module

2013-07-29 Thread jcbollinger


On Sunday, July 21, 2013 6:56:12 PM UTC-5, Alon Nisser wrote:
>
> Running puppet from vagrant.
> this is my puppet code:
>
> package {
> ["build-essential","apache2","git","python","python-dev","python-setuptools", 
> "python-pip"]:
> ensure => present,
> require => Class["apt"],
> }
> # include apt
> class {"apt":
> always_apt_update => true,
> }
> apt::builddep { ["python-imaging","python-lxml"]:
>
>  }
> include nodejs
> package {"less":
> ensure => present,
> provider => 'npm',
> require => Package['npm'],
> }
> package {"python-virtualenv":
> ensure => present,
> require => Package["python-pip", "python-setuptools"]
> }
> package {"sphinx":
> ensure => present,
> require => Package["python-pip"],
> provider => pip
> }
> service {'apache2':
> ensure => running,
> enable => true,
> #subscribe => File["/etc/apache2/apache2.conf"]
> }
> #include postgresql
> class { 'postgresql':
>   charset => 'UTF8',
>   require => Class['apt'],
> }-> class { 'postgresql::server':
> config_hash => {
> 'ip_mask_deny_postgres_user' => '0.0.0.0/32',
> 'ip_mask_allow_all_users'=> '0.0.0.0/0',
> 'listen_addresses'   => '*',
>   },
> }
> class {'postgresql::client':
> package_ensure => present,
> require => Class['postgresql'],
> }
> class {'postgresql::python':
> package_ensure => present,
> require => Class['postgresql'],
> }
>
>
> The error: would be glad with any help with this 
>
>  
>
> ←[0;36mnotice: /Stage[main]//Package[sphinx]: Dependency 
> Exec[apt-builddep-pytho
> n-imaging] has failures: true←[0m
> ←[0;36mnotice: /Stage[main]//Package[sphinx]: Dependency 
> Exec[apt-builddep-pytho
> n-lxml] has failures: true←[0m
> ←[0;33mwarning: /Stage[main]//Package[sphinx]: Skipping because of failed 
> depend
> encies←[0m
> ←[0;36mnotice: /Stage[main]//Package[python]: Dependency 
> Exec[apt-builddep-pytho
> n-imaging] has failures: true←[0m
> ←[0;36mnotice: /Stage[main]//Package[python]: Dependency 
> Exec[apt-builddep-pytho
> n-lxml] has failures: true←[0m
> ←[0;33mwarning: /Stage[main]//Package[python]: Skipping because of failed 
> depend
> encies←[0m
>
> [...]

If you run the agent with the --debug flag enabled then Puppet should log 
the exact commands it attempts to execute.  That may provide a clue as to 
why the Apt::Builddep resources are failing.  From what I can see, those 
failures are the root cause of your problem.


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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Re: Array use as loop-type construct?

2013-07-29 Thread Bret Wortman
Oh. I've never really grokked the defined type stuff. I can see now I
need to dig in and make sense of it.

Thanks, John!


*
*
*Bret Wortman*

http://damascusgrp.com/ 
http://about.me/wortmanbret


On Mon, Jul 29, 2013 at 1:19 PM, jcbollinger wrote:

>
>
> On Tuesday, July 23, 2013 12:32:43 PM UTC-5, Bret Wortman wrote:
>>
>> I'm trying to use a puppet manifest to set up a series of backup jobs on
>> servers which are each running a variety of mysql databases. My manifest
>> currently looks something like this, which almost works:
>>
>> class backups () {
>>
>> Cron {
>> ensure => present,
>> user => root,
>> }
>>
>> $remote_dest = ['zx2:/data/src/backups','zx3:**/data/backups']
>>
>> if $hostname == "www" {
>> $databases = ['phpbb3','wikidb','rt4','**wordpress']
>> $bkp_dest = "/data/backup"
>> elsif...
>> :
>> }
>>
>> cron { $databses:
>> command => "mysqldump --user admin $databases | gzip >
>> mysql-$databases-`date +%Y%m%d`.gz",
>> hour => 1,
>> minute => 20,
>> }
>>
>> cron { $remote_dest:
>> command => "rsync -arzv $bkp_dest $remote_dest",
>> hour => 4,
>> minute => 40,
>> }
>> }
>>
>> I get the right number of cron jobs built, but when the array variables
>> are quoted, I get the contents all concatenated together.
>>
>
>
> Yes, that is what you get when you convert an array to a string.
>
>
>
>> What I'd like is to simulate a "for x in array" kind of construct. Is
>> that possible using puppet? I'd rather not have to build this and specify
>> each job by hand, which seems really clunky given the elegance of the tool.
>> I'm sure I'm just not seeing something.
>>
>
>
> There is the template approach you discovered, when it is applicable.  The
> more general approach is to use a defined type in conjunction with Puppet's
> shorthand for declaring multiple resources based on an array of their
> titles.  You're example code is heading in the right direction.  Here's how
> a working version might look:
>
> define backups::database () {
>   cron { "backup_database_${title}":
>
> ensure  => present,
> user=> root,
> command => "mysqldump --user admin ${title} | gzip >
> mysql-${title}-`date +%Y%m%d`.gz",
> hour=> 4,
> minute  => 40,
>   }
> }
>
> define backups::remote () {
>   cron { "backup_remote_dest_${title}":
>
> ensure  => present,
> user=> root,
> command => "rsync -arzv ${backups::bkp_dest} ${title}",
> hour=> 1,
> minute  => 20,
>   }
> }
>
> class backups {
>   # ...
>   # Set variables, including $databases, $bkp_dest, and $remote_dest
>   # ...
>
>   backups::database { $databases: }
>   backups::remote { $remote_dest: }
> }
>
> Note the use of the automatic $title variable inside the definitions to
> refer to the title of the defined type instance.  You can declare other
> parameters to the definition, too, but as used in the example, all
> instances would get the same values for those parameters.  There are ways
> to be cleverer about that sort of thing, once you have a hold of what's
> going on.
>
>
> John
>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Puppet Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/puppet-users/rm1wx3s4ZiE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Heria, Facts, and Puppet

2013-07-29 Thread jcbollinger


On Thursday, July 25, 2013 9:27:26 AM UTC-5, chengkai liang wrote:
>
> So something doesn't look right for me when running puppet apply -e 
> 'include ...' for looking heria via facter fact.
>
> I have hiera configure as this,
>
> :backends:
> - yaml
>
> :hierarchy:
> - common 
> - '%{env_name}'
>
> :yaml:
> :datadir: /var/lib/hiera/data
>
> and, a file envXX.yaml store in the datadir, and I can run *hiera xyz 
> env_name=envXX* to get the the value of abc associate with xyz.
>
> Yet, if I export the value variable env_name by *export 
> FACTER_env_name=*envXX, 
> and run:
>
> *puppet apply -e 'include my_module
>
> *
> puppet will complaint that it can't find data store in envXX.yaml.



That is a mischaracterization.  Puppet does not say anything of the sort -- 
it's only your interpretation.

 

>   From the debug output,
>
> debug: importing 
> '/Users/cliang/.puppet/modules/puppet_flux2_config/manifests/init.pp' in 
> environment production
> debug: Automatically imported puppet_flux2_config from puppet_flux2_config 
> into production
> debug: hiera(): Hiera YAML backend starting
> debug: hiera(): Looking up host_header_url in YAML backend
> debug: hiera(): Looking for data source common
> Could not find data item host_header_url in any Hiera data file and no 
> default supplied at 
> /Users/cliang/.puppet/modules/puppet_flux2_config/manifests/init.pp:4 on 
> node m-mba.local
>
> It seems that it stop looking right after common, while running with *hiera 
> xyz env_name=envXX* *--debug *shows,
>
> DEBUG: Thu Jul 25 07:24:48 -0700 2013: Hiera YAML backend starting
> DEBUG: Thu Jul 25 07:24:48 -0700 2013: Looking up host_header_url in YAML 
> backend
> DEBUG: Thu Jul 25 07:24:48 -0700 2013: Looking for data source common
> DEBUG: Thu Jul 25 07:24:48 -0700 2013: Looking for data source *envXX*
> DEBUG: Thu Jul 25 07:24:48 -0700 2013: Found xyz in *envXX*
>
> So why puppet apply won't look further into envXX.yaml file?  Anybody can 
> help on this?
>
>

Very likely, Puppet does not receive the env_name fact from Facter, causing 
hiera to look for a file named '.yaml' instead of 'envXX.yaml'  That would 
not surprise me much, as it is in no way safe to assume that Puppet will 
provide the same environment it receives to other components and programs 
(such as Facter).  That is not an issue when you query hiera directly, 
because you give the correct value of env_name.


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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: including classes

2013-07-29 Thread jcbollinger


On Thursday, July 25, 2013 2:14:17 AM UTC-5, foom...@gmail.com wrote:
>
>
> I've been rewriting our modules as and when to the more fashionable 
> parameterised structure.
>


Why?  If your modules already do everything you want them to do, then 
switching to parameterized-style declarations has no upside, but (as you 
discovered) significant downside.  Especially for classes that aren't 
parameterized in the first place.  Even if you choose to parameterize your 
classes, you are best off relying on automated data binding via Hiera and 
avoiding parameterized-style class declarations in your manifests.


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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Puppet, Yum, Cassandra, openjdk and --nodeps

2013-07-29 Thread jcbollinger


On Wednesday, July 24, 2013 4:29:44 PM UTC-5, Paul Pham wrote:
>
> Hello, puppet n00b here.
>
> Trying to install cassandra via puppet. Works great, only caveat is 
> cassandra (dsc12 package) lists openjdk as a dependency. Ironically enough, 
> the datastax guys themselves recommend using Oracle JRE instead of openjdk, 
> and there is even a 
> bugthat prevents 
> cassandra from starting if it's using openjdk. Anyway, I 
> fixed it by adding an exec to my puppet-java module that sets the Oracle 
> JRE runtime as the defaults via alternatives, and it works fine. However, I 
> still end up with two different java runtimes installed which I find to be 
> a bit unclean.
>
> The root of the problem to me, though, is that by having puppet install 
> dsc12, I lose visibility into what all those dependencies were that got 
> installed along with it (I didn't realize openjdk was even installing until 
> I started investigating why cassandra wasn't starting). So what I'd prefer 
> to do is add each individual package dependency into my cassandra module 
> itself, thereby explicitly installing only what I intend to install, and 
> nothing else.
>
> The only way this works, though, is if I can somehow pass the "--nodeps" 
> option into yum during puppet apply time. Otherwise, regardless of whether 
> I already installed Oracle JRE, using yum to install dsc12 will 
> automatically install openjdk.
>
>
>
> How have you guys handled scenarios like this? I tried searching through 
> the topics here for "yum nodeps" but it seems people found different ways 
> of solving their individual problems rather than sending flags to the yum 
> provider itself. I also noticed this puppet feature 
> requestwhich unfortunately has 
> remained open(?) for 3 years. I've also seen people 
> suggest that nodeps should never be used with yum since the purpose of yum 
> is to handle dependencies... but we also like some of the other features of 
> yum, like being able to pull packages down by name automatically from our 
> yum repo (which we manage in-house).
>
> Anyway, any insights would be great! Thanks,
>


The best solution to the immediate problem would be to rebuild the RPM to 
correct the dependency information.  There are even tools available by 
which you could edit your existing RPM without rebuilding it from scratch.

As far as --nodeps goes, I am not aware that yum implements it, or anything 
similar.  I find explicit documentation to the contrary, in fact.  If you 
want to go that direction (very unwise) then you need to use rpm directly.

If you use rpm directly, however, (including by explicitly telling Puppet 
to use the 'rpm' Package provider) then you probably still don't want 
--nodeps.  Instead, you want rpm to fail when a package's dependencies are 
not satisfied, so that you can fix the problem.  This is the route to take 
if you want to explicitly specify every package and avoid any others being 
installed.  You do not then get automatic package downloads, but rpm 
understands http: URLs, so you can still pull packages from your local 
repository (or external ones) by specifying their complete URLs.


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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: a different ssh::auth problem

2013-07-29 Thread Stephen Brown II
Greetings,

I'm also new to puppet, but the documentation is basically informing you 
about the way puppet modules are laid out. From the Puppet documentation (
http://docs.puppetlabs.com/puppet/3/reference/modules_fundamentals.html):
On disk, a module is simply a directory tree with a specific, predictable 
structure:

MODULE NAME
|--manifests
|--files
|--templates
|--lib
|--tests
\--spec1

So it is perfectly fine for you to create the ssh/manifests directory and 
place the auth.pp file in there. That's where Puppet expects it to be.

I'd recommend going through the Puppet reference to get more information on 
it, and possbly trying out the Learning Puppet VM Tutorial (
http://docs.puppetlabs.com/learning/), which also has a section on Modules 
and Classes (http://docs.puppetlabs.com/learning/modules1.html)

Hope this helps!
Stephen

On Monday, July 29, 2013 4:12:48 AM UTC-4, Joseph Mwesigwa Bbaale wrote:
>
> Hi,
>
> I am very new to puppet.
>
> I installed puppet 3.2.3 (open source) on Debian Wheezy. Everything seems 
> to work fine.
>
> Now I want to setup ssh::auth on the puppet master. The documentation 
> states that:
>
> "To install ssh::auth, place the file 
> auth.pp (attached 
> to this page) into the ssh/manifests directory in your module path: for 
> example, /etc/puppet/modules/ssh/manifests/auth.pp."
>
>
> Unfortunately my system does not have ssh/manifest and therefore I 
> wonder, I this a minor issue? If not, how do I go about setting up ssh:auth 
> in this environment?
>
> Any help offered is highly appreciated.
>
> Joseph
>
>

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] updating package and all dependency updates with puppet

2013-07-29 Thread jcbollinger


On Wednesday, July 24, 2013 6:40:17 PM UTC-5, Brian Mathis wrote:
>
> I have not tested that myself, so I'm not sure what Puppet would do in 
> this case.  I'm pretty sure yum would also install the updates, but only if 
> the main (rpm/deb) package specifically requires the newer version.
>
> Given the original poster's request, it can be assumed that the package 
> does not have the updated version number as part of the package definition, 
> so it needs to be managed separately by Puppet.  I don't think its uncommon 
> to see a package that requires (e.g.) version "5.4", and not get so 
> specific as "5.4.3".
>
>
Indeed.  This is a packaging / yum issue, not a Puppet issue.  Exactly the 
same behavior would be observed running yum manually from the command 
line.  In fact, yum has no way to express the idea of updating a package 
and all its dependencies, but not anything else (except by explicitly 
naming all the packages wanting upgraded).

If you care about specific versions of particular packages then you need to 
manage those packages explicitly, whether via Puppet or directly via Yum.


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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: dashboard displaying \n in report output

2013-07-29 Thread Ellison Marks
According to this thread:

https://groups.google.com/forum/#!searchin/puppet-users/dashboard$20newline$20characters/puppet-users/u_Ul0wqRYxw/er8IuEompFoJ

it was a problem with ruby 1.9.3. YMMV.

On Monday, July 29, 2013 3:23:24 AM UTC-7, John Naggets wrote:
>
> Hello,
>
> I installed the puppet dasboard 1.2.23 on my puppet master and everything 
> works so far fine but I noticed that my reports (URL: /reports/X, where X 
> is a report number) displays many new line characters (\n) in its output. 
> It looks like the newline char does not get stripped off correctly. Any 
> ideas what could be the cause?
>
> Thanks and regards,
> 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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Array use as loop-type construct?

2013-07-29 Thread jcbollinger


On Tuesday, July 23, 2013 12:32:43 PM UTC-5, Bret Wortman wrote:
>
> I'm trying to use a puppet manifest to set up a series of backup jobs on 
> servers which are each running a variety of mysql databases. My manifest 
> currently looks something like this, which almost works:
>
> class backups () {
>
> Cron {
> ensure => present,
> user => root,
> }
>
> $remote_dest = ['zx2:/data/src/backups','zx3:/data/backups']
>
> if $hostname == "www" {
> $databases = ['phpbb3','wikidb','rt4','wordpress']
> $bkp_dest = "/data/backup"
> elsif...
> :
> }
>
> cron { $databses:
> command => "mysqldump --user admin $databases | gzip > 
> mysql-$databases-`date +%Y%m%d`.gz",
> hour => 1,
> minute => 20,
> }
>
> cron { $remote_dest:
> command => "rsync -arzv $bkp_dest $remote_dest",
> hour => 4,
> minute => 40,
> }
> }
>
> I get the right number of cron jobs built, but when the array variables 
> are quoted, I get the contents all concatenated together.
>


Yes, that is what you get when you convert an array to a string.

 

> What I'd like is to simulate a "for x in array" kind of construct. Is that 
> possible using puppet? I'd rather not have to build this and specify each 
> job by hand, which seems really clunky given the elegance of the tool. I'm 
> sure I'm just not seeing something.
>


There is the template approach you discovered, when it is applicable.  The 
more general approach is to use a defined type in conjunction with Puppet's 
shorthand for declaring multiple resources based on an array of their 
titles.  You're example code is heading in the right direction.  Here's how 
a working version might look:

define backups::database () {
  cron { "backup_database_${title}":
ensure  => present,
user=> root,
command => "mysqldump --user admin ${title} | gzip > 
mysql-${title}-`date +%Y%m%d`.gz",
hour=> 4,
minute  => 40,
  }
}

define backups::remote () {
  cron { "backup_remote_dest_${title}":
ensure  => present,
user=> root,
command => "rsync -arzv ${backups::bkp_dest} ${title}",
hour=> 1,
minute  => 20,
  }
}

class backups {
  # ...
  # Set variables, including $databases, $bkp_dest, and $remote_dest
  # ...

  backups::database { $databases: }
  backups::remote { $remote_dest: }
}

Note the use of the automatic $title variable inside the definitions to 
refer to the title of the defined type instance.  You can declare other 
parameters to the definition, too, but as used in the example, all 
instances would get the same values for those parameters.  There are ways 
to be cleverer about that sort of thing, once you have a hold of what's 
going on.


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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Large puppet file in /tmp directory

2013-07-29 Thread Mark Hatch
I saw that one of my managed nodes has a 41 GB file in the "/tmp" 
directory.  It's filename is "puppet20130725-63530-1ylx5vy".  Any idea what 
is causing such a large file to be created?

Thanks.
Mark

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Re: Perform action when exported resources change

2013-07-29 Thread jcbollinger


On Tuesday, July 23, 2013 4:30:45 AM UTC-5, Klavs Klavsen wrote:
>
>
>
> Den mandag den 22. juli 2013 08.58.32 UTC+2 skrev George Brown:
>>
>> Hi Sneha,
>>
>> This is for a GPFS (IBM parallel file system) cluster. When a new client 
>> is added it needs to be added by an node that is already part of the 
>> cluster. I'm trying to automate this through puppet
>>
>> E.g. node80 has just been provisioned
>>
>> After installing the client packages I need to add the node from a server 
>> already in the cluster by running the following two commands
>>
>> mmaddnode -N node80
>> mmchlicense client --accept -N node80
>>
>> Obviously I only want to have this exec run when a new host is added but 
>> I also only want it to execute for the newly added host (I don’t want it to 
>> run though nodes01-79 also).
>>
>>
> Perhaps you could do an @@exec.. with a creates.. question is where it 
> actually runs the creates check (I'd assume it to be run where it is 
> collected).
> That only depends on the commands above, actually creating a file 
> somewhere, so you can check for the existence of that file. Otherwise you 
> could do an unless instead (a bit more expensive and troublesome though) 
>


A 'creates' check is performed on the target node to which the Exec is 
applied, regardless of how that resource ended up in the node's catalog.  
For an exported resource, the parameter value is determined by the node 
that declares the resource, not the one that collects it (if they differ); 
the collecting node gets it as a literal string.  Therefore, if there were 
a characteristic file created by the Exec for each node added to the 
cluster -- and that file was expected to be retained indefinately -- then a 
'creates' parameter would be an appropriate way to model the system.  
Ideally, the new node would stop declaring the Exec once it was added.


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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: puppet ignoring dependencies

2013-07-29 Thread jcbollinger


On Monday, July 22, 2013 11:10:53 AM UTC-5, cko wrote:
>
> hi everyone,
>
> my *site.pp* looks like this:
>
>
> node "server.my.fqdn" { 
>class { "puppet_agent": } 
>class {"base_config:
>  require=>Class["puppet_agent"]
>  }
> }
>
> im trying to achieve that the "puppet_agent" module is applied before the 
> "base config" modules. 
>
> however, the puppet_agent module gets installed LAST.
>
> any ideas?
>
>

Yes.  You are probably mistaken about the order in which the classes 
themselves are applied.  Instead, you almost certainly have a containment 
problem.  The symptom you would have noticed is that one or more classes 
(but not any resources) declared by class 'puppet_agent' are applied after 
one or more classes (but not any resources) declared by class base_config.  
In brief, if you search the archives of this group for "containment" and 
"anchor pattern" (the latter being the usual solution) then you should find 
lots of relevant information.

If you remain uncertain about whether yours is a containment problem, then 
post your classes and the output from which you concluded that ordering was 
not working correctly.

Also, relationships work the same for all classes, including module-level 
classes such as yours.  Run stages would be a rather heavy-handed solution 
to your problem, and they sometimes cause more problems than they solve.


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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Vmware Provisioning after upgrade to Puppet Enterprise 3.0.0

2013-07-29 Thread Alexander Golovin
Hello community, 

I've upgraded my puppet enterprise from 2.7 to 3 version:

#puppet --version
3.2.2 (Puppet Enterprise 3.0.0)

After that I've got some problems with vmware provisioning, this error when 
trying create a new vm from template:

#puppet node_vmware create --vmname=mynewvm --template="/Datacenters/Center 
One, VM/vm/TEMPLATES/RHEL6"

Error: Could not find VM at /Datacenters/Center One, VM/vm/TEMPLATES/RHEL6
Error: Try 'puppet help node_vmware create' for usage

It has worked well at 2.7 version instead I had to use name instead vmname 
as in 3 version.

Do you have a same errors at new version, or just syntax changed and I need 
to change my vm deploy command now?

Thank You.




-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Resolving duplicated resources

2013-07-29 Thread jcbollinger


On Monday, July 22, 2013 1:29:43 AM UTC-5, Adam C wrote:
>
> Thanks for the response Paul, I took a look at ensure_packages and it 
> seems useful, but it of course has the same drawback as using defined, in 
> that it'll only work if all modules use it.
>
> I've reduced my problem to the following. I created two modules, module1 
> and module2 as follows:
>
> *modules/**module1/manifests/init.pp*:
>
> define module1::before { package { 'mod_ssl': ensure => present } }
>
> *modules/**module2/manifests/init.pp*:
>
> define module2::after { if ! defined(Package['mod_ssl']) { package { 
> 'mod_ssl': ensure => present } } } 
>
> and in my main manifest, I have the following which works:
>
> module1::before {'test': } 
> module2::after {'test': } 
>
> but if I change around the order, I receive an error:
>
> module2::after {'test': } 
> module1::before {'test': } 
>
> Error: Duplicate declaration: Package[mod_ssl] is already declared in file 
> /tmp/vagrant-puppet/modules-0/mod2/manifests/init.pp at line 7; cannot 
> redeclare on node vagrant
>
> of course this happens because module 2 performs a check to only require 
> the mod_ssl package if it isn't defined, but module 1 has no such check, so 
> if module 1 is included after module 2, it ends up duplicating the mod_ssl 
> resource.
>
> I've tried resolving this by using the *require* directive, but it 
> doesn't seem to work:
>
> module2::after {'test': require => Module1::Before['test'] } 
> module1::before {'test': }
>
> Can anyone tell me how I can fix this, and have the code in module1 
> included before module2, regardless of the order they appear in the file?  
> I thought that's what the *require *directive would enforce, but I must 
> be using it incorrectly, since it doesn't seem to work for me in this 
> instance.  if I can solve this small issue, I can fix my larger problem 
> without needing to modify the code in either module, which is what I'd 
> prefer.  Thanks for any help
>
>
There is no solution to the problem as you have framed it.  Resource 
declarations, including for resources of defined types, are parsed in the 
order in which they are encountered in Puppet's linear traversal of the 
manifest file in which they appear.  Similarly, classes are 'include'd in 
the order they appear in the file, modulo a few caveats related to classes 
that are declared in multiple files or via an ENC.  The 'require' 
metaparameter and its compatriots affect the relative order in which those 
resources and classes are applied to the client, which is an entirely 
separate question.

If you want one resource module1::before to be parsed before resource 
module2::after when they are both declared by the same class, then the 
declaration of the former must precede the declaration of the latter.  
Inasmuch as that is easy to accomplish, it it not the usual problem in this 
area.  Instead, the problem is usually about controlling the relative order 
in which declarations appearing in different classes are parsed, which 
ultimately comes down to controlling the order in which classes are parsed.

A requirement of that kind is often described as a "parse-order 
dependency", and it constitutes a serious problem in your manifests.  You 
will find a lot of discussion of parse-order issues in the archives of this 
group.  The best solution would be to solve the dependency, and the best 
way to do that is to factor the duplicate resource declaration out into a 
separate class, which each dependent then declares via an 'include' 
statement.  The class may be broader than just one resource, as seems 
appropriate to you.  Example:

class ssl {
  package { 'mod_ssl': ensure => present }
}

define module1::foo {
  include 'ssl'
  # other stuff ...
}

define module2::bar {
  include 'ssl'
  # other stuff ...
}

This solves the problem because classes are singletons, so declaring the 
same class multiple times is safe and idempotent(*).

(*) There is a caveat, however.  Binding data or metaparameters to a class 
via a parameterized-style class declaration (e.g. class { 'ssl': stage => 
'main' }, or even class { 'httpd': }) is *not* idempotent.  Such a 
declaration of a given class must be the first declaration of that class 
parsed, thus making it another parse-order dependency.  In Puppet 3 you can 
use hiera data bindings to avoid that issue.  You can also use direct hiera 
calls in the class body instead of class parameters.


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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Puppet master concurrency

2013-07-29 Thread Jonathan Gazeley

On 29/07/13 12:20, Matthew Burgess wrote:
On 29 July 2013 11:52, Jonathan Gazeley 
> wrote:



I'd like to know how to increase the number of simultaneous runs
the puppetmaster can handle because as we keep increasing the
number of nodes in our network we wil surely run into problems.


Hi Jonathan,

If you're not already running your puppetmaster behind 
Apache/Passenger then that would be my initial recommendation.  
Webrick, puppet's default http server, can only handle 1 agent checkin 
at a time and is usually the 1st culprit in scaling issues.  Although 
it's always worth ensuring PuppetDB/Postgres are operating 
efficiently, my understanding is that Puppet -> PuppetDB 
communications are asynchronous, so even if they do take a long time, 
it shouldn't be affecting your master -> agent interactions.


Kind Regards,

Matt.


Hi Matt,

Thanks for your response. We are indeed running puppetmaster behind 
Apache/Passenger. We can handle more than one agent checkin at once, but 
triggering more than a few simultaneously will usually result in 
timeouts or spurious errors such as the agents claiming that one of 
their classes does not exist.


Thanks,
Jonathan

--
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Puppet master concurrency

2013-07-29 Thread Matthew Burgess
On 29 July 2013 11:52, Jonathan Gazeley wrote:

>
> I'd like to know how to increase the number of simultaneous runs the
> puppetmaster can handle because as we keep increasing the number of nodes
> in our network we wil surely run into problems.
>

Hi Jonathan,

If you're not already running your puppetmaster behind Apache/Passenger
then that would be my initial recommendation.  Webrick, puppet's default
http server, can only handle 1 agent checkin at a time and is usually the
1st culprit in scaling issues.  Although it's always worth ensuring
PuppetDB/Postgres are operating efficiently, my understanding is that
Puppet -> PuppetDB communications are asynchronous, so even if they do take
a long time, it shouldn't be affecting your master -> agent interactions.

Kind Regards,

Matt.

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Latest Puppet Enterprise + Debian Lenny nodes?

2013-07-29 Thread Marco Cancedda
Hi there,

Would it be possible to run Puppet Enterprise and manage nodes based on 
Debian Lenny? 

I know the OS is end of life and not supported by Puppet (as in the 
company) and of course I don't expect any support.

Would it still be possible to use it, even with a limited set of 
capabilities like deploying users, restarting services maybe?

Thanks in advance.

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Puppet master concurrency

2013-07-29 Thread Jonathan Gazeley
We've got quite a few puppet nodes now (50-60, and increasing), and some 
have quite large catalogues. I've noticed that sometimes too many nodes 
attempt to check in at once that their puppet runs will time out or fail 
for other reasons.


Certainly if I kick off all nodes simultaneously using clusterssh then 
they will all fail.


The load average on the Puppetmaster is <1 and it has plenty of memory. 
The server that provides PuppetDB has a very low load average too and 
does not appear to be limited by resources, however we have no 
visibility of the Postgres backend, which is run by a different team who 
do not expose their monitoring.


I'd like to know how to increase the number of simultaneous runs the 
puppetmaster can handle because as we keep increasing the number of 
nodes in our network we wil surely run into problems.


Cheers,
Jonathan

--
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] dashboard displaying \n in report output

2013-07-29 Thread John Naggets
Hello,

I installed the puppet dasboard 1.2.23 on my puppet master and everything 
works so far fine but I noticed that my reports (URL: /reports/X, where X 
is a report number) displays many new line characters (\n) in its output. 
It looks like the newline char does not get stripped off correctly. Any 
ideas what could be the cause?

Thanks and regards,
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] a different ssh::auth problem

2013-07-29 Thread Joseph Mwesigwa Bbaale
Hi,

I am very new to puppet.

I installed puppet 3.2.3 (open source) on Debian Wheezy. Everything seems 
to work fine.

Now I want to setup ssh::auth on the puppet master. The documentation 
states that:

"To install ssh::auth, place the file 
auth.pp (attached 
to this page) into the ssh/manifests directory in your module path: for 
example, /etc/puppet/modules/ssh/manifests/auth.pp."


Unfortunately my system does not have ssh/manifest and therefore I wonder, 
I this a minor issue? If not, how do I go about setting up ssh:auth in this 
environment?

Any help offered is highly appreciated.

Joseph

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] install xen-desktop with AD Domain user with windows system user

2013-07-29 Thread nan
 

While login to windows with local administrator and install xendesktop with 
AD administrator account, it's successful, below is what i have done:

$adPassword= convertto-securestring "password" -asplaintext -force
$adCredObject = new-object -typename System.Management.Automation.PSCredential 
-argumentlist "ad.mydomain.com\user",$adPassword
$CurrentProcess = Start-Process -FilePath ".\xendesktop\x64\XenDesktop 
Setup\XenDesktopServerSetup.exe" -Credential $adCredObject -Wait -PassThru 
-ArgumentList "/COMPONENTS 
CONTROLLER,DESKTOPSTUDIO,DESKTOPDIRECTOR,LICENSESERVER,STOREFRONT /NOREBOOT 
/CONFIGURE_FIREWALL"

But while use puppet automation script(it run with windows system user) to 
execute install xendesktop with AD administrator account, it's failed, 
below is what i have done to run 'exec' in puppet(same code as above):

$adPassword= convertto-securestring "password" -asplaintext -force
$adCredObject = new-object -typename System.Management.Automation.PSCredential 
-argumentlist "ad.mydomain.com\user",$adPassword
$CurrentProcess = Start-Process -FilePath ".\xendesktop\x64\XenDesktop 
Setup\XenDesktopServerSetup.exe" -Credential $adCredObject -Wait -PassThru 
-ArgumentList "/COMPONENTS 
CONTROLLER,DESKTOPSTUDIO,DESKTOPDIRECTOR,LICENSESERVER,STOREFRONT /NOREBOOT 
/CONFIGURE_FIREWALL"

So the only difference is the succeed one run the above script with local 
administerator and failed one run with windows system user.The failure 
message display in the event log is like():

An account failed to log on.

Subject:
Security ID:SYSTEM
Account Name:   MyMachineName
Account Domain: MyDomainName
Logon ID:   0x3e7

Logon Type: 3

Account For Which Logon Failed:
Security ID:NULL SID
Account Name:   Administrator
Account Domain: MyMachineName

Failure Information:
Failure Reason: Unknown user name or bad password.
Status: 0xc06d
Sub Status: 0xc06a

Process Information:
Caller Process ID:  0xd90
Caller Process Name:C:\Program Files (x86)\Puppet 
Labs\Puppet\sys\ruby\bin\ruby.exe

Network Information:
Workstation Name:   MyMachineName
Source Network Address: -
Source Port:-

Detailed Authentication Information:
Logon Process:  Advapi  
Authentication Package: Negotiate
Transited Services: -
Package Name (NTLM only):   -
Key Length: 0

This event is generated when a logon request fails. It is generated on the 
computer where access was attempted.

The Subject fields indicate the account on the local system which requested the 
logon. This is most commonly a service such as the Server service, or a local 
process such as Winlogon.exe or Services.exe.

The Logon Type field indicates the kind of logon that was requested. The most 
common types are 2 (interactive) and 3 (network).

The Process Information fields indicate which account and process on the system 
requested the logon.

The Network Information fields indicate where a remote logon request 
originated. Workstation name is not always available and may be left blank in 
some cases.

The authentication information fields provide detailed information about this 
specific logon request.
- Transited services indicate which intermediate services have participated 
in this logon request.
- Package name indicates which sub-protocol was used among the NTLM 
protocols.
- Key length indicates the length of the generated session key. This will 
be 0 if no session key was requested.

I have tried to use runasspc also to execute this installation, and add the 
system user to local administrator group but I got same result. Any help 
would be appreciated.

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.