[Puppet Users] Managing network interfaces?

2012-10-25 Thread Brian Rak
I've been using Puppet to manage network interfaces on our machines.  To do 
this I've got a class very similar to 
http://forge.puppetlabs.com/razorsedge/network .  I'm encountering some 
annoyances with this method of handling it:

1) Every interface I have has to have a unique alias number.  This means 
that whenever I want to add a new IP alias I have to grep through my entire 
tree and find an unused number.  This seems... less then optimal.
2) If I'm changing an interface (say from normal to bonded networking) I 
have to go and switch the interface definitions for everything on that 
machine.  This also makes it difficult to have the same module used on 
multiple machines (as their networking config needs to match exactly).
2a) This gets more annoying as some of our newer machines have network 
interfaces emX instead of ethX.  This means that all the definitions need 
to be updated once again when we change hardware.


Has anyone encountered this and come up with a decent solution?  I should 
note that I'm using CentOS, all the modules I can find on forge appear to 
be doing very similar things.

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



[Puppet Users] Re: What is the "@" used for?

2012-10-25 Thread Ben McCann
See http://docs.puppetlabs.com/guides/virtual_resources.html

On Thursday, October 25, 2012 5:01:45 PM UTC-7, Dave Alden wrote:
>
> Hi, 
>  Sorry to be dense, but I've recently switched over to use the puppet labs 
> apache module, but I was having trouble with the firewall not getting 
> updated.  It turns out that the "@" in front of the firewall line seems to 
> be keeping it from running.  As soon as I removed it, my firewall got 
> updated.  So what does the "@" do? 
> …dave

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



Re: [Puppet Users] Re: Trouble adding a user to a group

2012-10-25 Thread Ben McCann
Definitely seems like a bug.  I added the Puppet Ubuntu repo and upgraded 
to puppet 3.0.1 and it works now.  I'm not going to bother filing it since 
it seems like it's since been fixed.


On Thursday, October 25, 2012 5:01:11 PM UTC-7, Ben McCann wrote:
>
> That's not it.  I changed it to Users::Virtual::Localuser <| |> and the 
> problem is still happening.
>
>
> On Thu, Oct 25, 2012 at 4:59 PM, Stefan Schulte <
> stefan.schu...@taunusstein.net> wrote:
>
>> On Thu, Oct 25, 2012 at 04:34:26PM -0700, Ben McCann wrote:
>> > Yes, I am realizing it:
>> >   Users::Virtual::Localuser <| gid == users |>
>> >
>> > If I go onto the host and delete the user (sudo userdel myuser) then 
>> puppet
>> > will create a new user and that user will be a member of all the groups 
>> I
>> > desire:
>> > notice:
>> > 
>> /Stage[main]/Users/Users::Virtual::Localuser[myuser]/User[myuser]/ensure:
>> > created
>> > notice: Finished catalog run in 0.43 second
>> >
>> > However, if I delete the user from the group (sudo gpasswd -d myuser
>> > mygroup) and rerun then puppet does not re-add the group membership:
>> > notice: Finished catalog run in 0.34 seconds
>> >
>> > This seems like a bug in puppet perhaps?
>> >
>> > Thanks,
>> > Ben
>>
>> Are you sure you have not defined the user resource a second time in
>> another location? Because
>>
>>   Users::Virtual::Localuser <| gid == users |>
>>
>> will realize nothing because your localuser define does not have a gid
>> parameter (the user resource inside the define does, but that does not
>> matter here).
>>
>> -Stefan
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To post to this group, send email to puppet-users@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>>
>
>
> -- 
> about.me/benmccann 
>  

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



[Puppet Users] What is the "@" used for?

2012-10-25 Thread Alden, David
Hi,
 Sorry to be dense, but I've recently switched over to use the puppet labs 
apache module, but I was having trouble with the firewall not getting updated.  
It turns out that the "@" in front of the firewall line seems to be keeping it 
from running.  As soon as I removed it, my firewall got updated.  So what does 
the "@" do?
…dave

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



Re: [Puppet Users] Re: Trouble adding a user to a group

2012-10-25 Thread Ben McCann
That's not it.  I changed it to Users::Virtual::Localuser <| |> and the
problem is still happening.


On Thu, Oct 25, 2012 at 4:59 PM, Stefan Schulte <
stefan.schu...@taunusstein.net> wrote:

> On Thu, Oct 25, 2012 at 04:34:26PM -0700, Ben McCann wrote:
> > Yes, I am realizing it:
> >   Users::Virtual::Localuser <| gid == users |>
> >
> > If I go onto the host and delete the user (sudo userdel myuser) then
> puppet
> > will create a new user and that user will be a member of all the groups I
> > desire:
> > notice:
> > /Stage[main]/Users/Users::Virtual::Localuser[myuser]/User[myuser]/ensure:
> > created
> > notice: Finished catalog run in 0.43 second
> >
> > However, if I delete the user from the group (sudo gpasswd -d myuser
> > mygroup) and rerun then puppet does not re-add the group membership:
> > notice: Finished catalog run in 0.34 seconds
> >
> > This seems like a bug in puppet perhaps?
> >
> > Thanks,
> > Ben
>
> Are you sure you have not defined the user resource a second time in
> another location? Because
>
>   Users::Virtual::Localuser <| gid == users |>
>
> will realize nothing because your localuser define does not have a gid
> parameter (the user resource inside the define does, but that does not
> matter here).
>
> -Stefan
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>


-- 
about.me/benmccann

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



Re: [Puppet Users] Re: Trouble adding a user to a group

2012-10-25 Thread Stefan Schulte
On Thu, Oct 25, 2012 at 04:34:26PM -0700, Ben McCann wrote:
> Yes, I am realizing it:
>   Users::Virtual::Localuser <| gid == users |>
> 
> If I go onto the host and delete the user (sudo userdel myuser) then puppet
> will create a new user and that user will be a member of all the groups I
> desire:
> notice:
> /Stage[main]/Users/Users::Virtual::Localuser[myuser]/User[myuser]/ensure:
> created
> notice: Finished catalog run in 0.43 second
> 
> However, if I delete the user from the group (sudo gpasswd -d myuser
> mygroup) and rerun then puppet does not re-add the group membership:
> notice: Finished catalog run in 0.34 seconds
> 
> This seems like a bug in puppet perhaps?
> 
> Thanks,
> Ben

Are you sure you have not defined the user resource a second time in
another location? Because

  Users::Virtual::Localuser <| gid == users |>

will realize nothing because your localuser define does not have a gid
parameter (the user resource inside the define does, but that does not
matter here).

-Stefan

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



Re: [Puppet Users] Re: Trouble adding a user to a group

2012-10-25 Thread Jeff McCune
On Thu, Oct 25, 2012 at 4:34 PM, Ben McCann  wrote:

> Yes, I am realizing it:
>   Users::Virtual::Localuser <| gid == users |>
>
> If I go onto the host and delete the user (sudo userdel myuser) then
> puppet will create a new user and that user will be a member of all the
> groups I desire:
> notice:
> /Stage[main]/Users/Users::Virtual::Localuser[myuser]/User[myuser]/ensure:
> created
> notice: Finished catalog run in 0.43 second
>
> However, if I delete the user from the group (sudo gpasswd -d myuser
> mygroup) and rerun then puppet does not re-add the group membership:
> notice: Finished catalog run in 0.34 seconds
>
> This seems like a bug in puppet perhaps?
>

That does seem like a bug.  Could you please file it at
http://projects.puppetlabs.com/projects/puppet ?

-Jeff

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



Re: [Puppet Users] Re: Trouble adding a user to a group

2012-10-25 Thread Ben McCann
Yes, I am realizing it:
  Users::Virtual::Localuser <| gid == users |>

If I go onto the host and delete the user (sudo userdel myuser) then puppet
will create a new user and that user will be a member of all the groups I
desire:
notice:
/Stage[main]/Users/Users::Virtual::Localuser[myuser]/User[myuser]/ensure:
created
notice: Finished catalog run in 0.43 second

However, if I delete the user from the group (sudo gpasswd -d myuser
mygroup) and rerun then puppet does not re-add the group membership:
notice: Finished catalog run in 0.34 seconds

This seems like a bug in puppet perhaps?

Thanks,
Ben


On Thu, Oct 25, 2012 at 4:26 PM, Jeff McCune  wrote:

> On Thu, Oct 25, 2012 at 4:23 PM, Ben McCann 
> wrote:
>
>> If I remove the virtualization aspect then it works.  Any idea why that
>> might stop the groups from being applied?
>
>
> When you mark the resource as virtual, are you also realizing it somewhere
> else in your manifests?  Without realizing a virtual or an exported
> resource it will never be added to the configuration catalog.
>
> -Jeff
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
about.me/benmccann

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



Re: [Puppet Users] Re: Trouble adding a user to a group

2012-10-25 Thread Jeff McCune
On Thu, Oct 25, 2012 at 4:23 PM, Ben McCann wrote:

> If I remove the virtualization aspect then it works.  Any idea why that
> might stop the groups from being applied?


When you mark the resource as virtual, are you also realizing it somewhere
else in your manifests?  Without realizing a virtual or an exported
resource it will never be added to the configuration catalog.

-Jeff

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



[Puppet Users] Re: Trouble adding a user to a group

2012-10-25 Thread Ben McCann
If I remove the virtualization aspect then it works.  Any idea why that 
might stop the groups from being applied?


On Thursday, October 25, 2012 1:01:08 PM UTC-7, Ben McCann wrote:
>
> Hi,
>
> I'm trying to add a user to a group.  I've added the groups I would like 
> the user to appear in using the groups attribute:
>
>   @users::virtual::localuser { "myuser":
> uid =>  "3000",
> groups  =>  [ "sudo", "adm", "mygroup", ],
> sshkey  =>  "",
>   }
>
> I've defined localuser as:
>
> class users::virtual {
>
>   define localuser ($uid, $groups=[], $sshkey="") {
> user { $title:
>   ensure => "present",
>   uid=> $uid,
>   gid=> "users",
>   groups => $groups,
>   shell  => "/bin/bash",
>   home   => "/home/$title",
>   comment=> $realname,
>   managehome => true,
> }
>
> ssh_authorized_key { $title:
>   ensure   => "present",
>   type => "ssh-rsa",
>   key  => "$sshkey",
>   user => "$title",
>   require  => User["$title"],
>   name => "$title",
> }
>   }
>
> }
>
>
> It seems to work for creating a new user, but if I add a new group the 
> user is not added to that group.  I can see that "mygroup" already exists 
> on the machine:
> $ grep mygroup /etc/group
> mygroup:x:200:
>
> Any ideas what I might be doing wrong?  I'm running Puppet 2.7.11 on 
> Ubuntu 12.04.
>
> Thanks,
> Ben
>
>

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



[Puppet Users] Announce: Facter 1.6.14-rc1 Available

2012-10-25 Thread Moses Mendoza
Facter 1.6.14-rc1 is a maintenance release candidate in the 1.6.x
branch with bug fixes.

Downloads are available at:
 * Source: https://downloads.puppetlabs.com/facter/facter-1.6.14-rc1.tar.gz

RPMs are available at https://yum.puppetlabs.com/el or /fedora

Rubygem available at http://rubygems.org/gems/facter or by using
the --pre option to gem install.

Debs are available at https://apt.puppetlabs.com

Mac package is available at
https://downloads.puppetlabs.com/mac/facter-1.6.14-rc1.dmg

See the Verifying Puppet Download section at:
 
http://projects.puppetlabs.com/projects/puppet/wiki/Downloading_Puppet#Verifying+Puppet+Downloads

Please report feedback via the Puppet Labs Redmine site, using a
affected version of 1.6.14-rc1:
 http://projects.puppetlabs.com/projects/facter/

Release Notes at: https://projects.puppetlabs.com/projects/facter/wiki/Wiki

Fixes targeted at this version in our bug tracker:
http://projects.puppetlabs.com/versions/330


## Facter 1.6.14-rc1 Changelog ##


Alex Harvey (3):
  278e813 (#14764) Stop calling enum_cpuinfo and enum_lsdev on
unsuitable platforms
  8063ffe (#13535) Fix uptime; use `uptime` instead of `who -b`
  521ae22 (#16506) Fix illegal option error from uname on hpux

Andrew Parker (1):
  213672f (Maint) Remove aliases for spec from Rakefile

Jeff McCune (9):
  047a2d9 (#16526) Fix physicalprocessorcount fact on Solaris
  d136414 (#16527) Fix processorcount fact on Solaris
  1077baa (maint) Add newlines to all files (whitespace only)
  5b3d509 (maint) Remove rspec from shebang lines
  462756a (maint) Add mailmap for git shortlog
  cdbd05c (maint) Cleanup of the virtual spec tests.
  2ed2575 (maint) Properly indent virtual_spec.rb
  cf43fc0 (#8210) Add a heavy virtual fact using virt-what
  62478ff (#11609) Fix processorX facts for AIX systems

Josh Cooper (2):
  1f94855 (#16829) Change how bundler is detected
  b81528d Maint: fix mismatched stub

Matthaus Owens (1):
  75bd002 (#16397) Update selinux_mount_point for 1.8.5 compatibility

Moses Mendoza (1):
  4ccf1be return vendor field and retab

Patrick Carlisle (1):
  0b56c1a Only load rubygems in bin/facter

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



[Puppet Users] puppet-dashboard does not work after upgrade to puppet 3.0.1 and puppet-dashboard 1.21

2012-10-25 Thread danielt
Hi,

I upgraded my running Puppet 2.6.7 to 3.0.1 today as well as my 
puppet-dashboard to 1.21. Since then the workers are not processing the 
reports anymore. I only see the following error in the Logfiles.

[2012-10-25 23:24:06] ERROR bad Request-Line 
`?g\001\003\001\000N\000\000\000\020\000\0009\000\0008\000\0005\000\000\026\000\000\023\000\000'.

Any idea where this comes from and how to fix this?

Best Regards,

Daniel

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



Re: [Puppet Users] Connection Timed Out updating node on 3g mobile broadband device

2012-10-25 Thread Denmat
Interesting setup. Sometimes providers block uncommon ports. Can you get to 
8140 over your 3/4g? If not, try running on 443 (change puppet.conf or apache 
ports).

If none of these work check the docs for timeout settings (can't remember of 
hand).

Den

On 26/10/2012, at 3:55, Steve  wrote:

> I have a puppetmaster on an Amazon EC2 instance of Ubuntu 12.04. All of the 
> puppet nodes I am running are also on ubuntu server 12.04. I can connect any 
> of the nodes on a wireless or LAN connection. When I switch my node to a 
> Verizon mobile 3g or 4g device I run "puppet agent -t" and I get the message
> 
> err: Could not retrieve catalog from remote server: Connection time out - 
> SSL_connect
> warning: Not using cache on failed catalog
> err: Could not retrieve catalog; skipping run
> err: Could not send report: Connection timed out - SSL_connect
> 
> Before I got the message there was a long pause about 20 minutes long trying 
> to do the update.
> 
> I can download and install packages with the 3g connection using apt-get 
> install. I can access webpages including secure pages using Lynx. I can ping 
> the Puppet Master.
> 
> I wanted to make sure I was getting through to the Puppet Master so I removed 
> the certificate from both the Puppet Master and the Client. Then I ran 
> "puppet agent -t" and the certificate was signed and I can see it again on 
> the Puppet Master and the client. 
> 
> I checked port 8140 to see that it is open in Amazon, and it is. There is no 
> firewall enabled in the instance itself.
> 
> Next I limited the puppet update to only one trivial module and nothing 
> changed.
> 
> Lastly, I connected a node that is on a desktop version of Ubuntu 12.10 and 
> connected my Verizon device. I had the similar behavior. The system paused 
> for 10 to 20 minutes like before then gave me the message:
> 
> Error: Failed to apply catalog: execution expired
> Error: Could not send report: execution expired
> 
> Since I have little experience with puppet or these devices, I suspect the 
> device has some sort of interrupt or time out on the device that causes 
> problems with the puppet process.
> 
> Anyways as far as I can tell the only thing I cannot do with this connection 
> is update puppet.
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/puppet-users/-/PHNcXaR-TyAJ.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.

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



[Puppet Users] creating a list of files from an external define

2012-10-25 Thread danielt
Hi!

I have a helper module called helper with a define which looks like this:

define helper::files ($path='', $requires='', $owner=root, $group=root, 
$mode=644, $ensure=present) {
file { "${name}":
  ensure   => $ensure,
  owner=> $owner,
  group=> $group,
  mode => $mode,
  source   => "${path}",
  require  => $requires,
}
  }
 
I have a bunch of files I want to be copied within my Apache2 Module:

$files = [  "/var/www/favicon.ico",
  "/var/www/error/error.html",
  "/var/www/error/logo.jpg",
  "/etc/apache2/ssl/ca.crt",
  "/etc/apache2/conf.d/charset",
  "/etc/apache2/conf.d/security",
  ]

When I call the define from within my apache2 class with this:

helper::files{$files:
owner => root,
group => root,
mode  => 644,
path  => "puppet:///files/apache2/",
ensure=> present,
requires  => File[$folders]
  }

I get the following error:

err: 
/Stage[main]/Apache2/Helper::Files[/etc/apache2/conf.d/security]/File[/etc/apache2/conf.d/security]:
 
Could not evaluate: Could not retrieve information from source(s) 
puppet:///files/apache2 at 
/etc/puppet/env/production/modules/helper/manifests/files.pp:9

for every file in my list. I am running Puppet 3.0.1 and have the 
workaround 
from 
https://groups.google.com/forum/?fromgroups=#!starred/puppet-users/eQpr0-zd3dM 
runing. Anybody an idea how I can get my solution to work? Is it a good 
idea to do this so? I usually had the install define within the class. But 
puppet-lint didn't like this so I thought outsourcing it to its own module 
would work out. Obviously it doesn't.

I am looking forward to your responses.

Daniel

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



[Puppet Users] Trouble adding a user to a group

2012-10-25 Thread Ben McCann
Hi,

I'm trying to add a user to a group.  I've added the groups I would like 
the user to appear in using the groups attribute:

  @users::virtual::localuser { "myuser":
uid =>  "3000",
groups  =>  [ "sudo", "adm", "mygroup", ],
sshkey  =>  "",
  }

I've defined localuser as:

class users::virtual {

  define localuser ($uid, $groups=[], $sshkey="") {
user { $title:
  ensure => "present",
  uid=> $uid,
  gid=> "users",
  groups => $groups,
  shell  => "/bin/bash",
  home   => "/home/$title",
  comment=> $realname,
  managehome => true,
}

ssh_authorized_key { $title:
  ensure   => "present",
  type => "ssh-rsa",
  key  => "$sshkey",
  user => "$title",
  require  => User["$title"],
  name => "$title",
}
  }

}


It seems to work for creating a new user, but if I add a new group the user 
is not added to that group.  I can see that "mygroup" already exists on the 
machine:
$ grep mygroup /etc/group
mygroup:x:200:

Any ideas what I might be doing wrong?  I'm running Puppet 2.7.11 on Ubuntu 
12.04.

Thanks,
Ben

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



[Puppet Users] Announce: PuppetDB 1.0.2 Available

2012-10-25 Thread Matthaus Owens
PuppetDB 1.0.2 is now available for download! This is a bug-fix
release of PuppetDB.

This release addresses an issue with ruby 1.9 on debian based
platforms where Puppet would not be able to load the
puppetdb-terminus.

# Downloads
==
Available in native package format at:
http://yum.puppetlabs.com and http://apt.puppetlabs.com

Puppet module:
http://forge.puppetlabs.com/puppetlabs/puppetdb

Source (same license as Puppet): http://github.com/puppetlabs/puppetdb/

Available for use with Puppet Enterprise 2.5.1 and later at
http://yum-enterprise.puppetlabs.com/ and http://apt-enterprise.puppetlabs.com/

# Documentation (including how to install): http://docs.puppetlabs.com/puppetdb

# Issues can be filed at:
http://projects.puppetlabs.com/projects/puppetdb/issues

# See our development board on Trello:
http://links.puppetlabs.com/puppetdb-trello

# 1.0.2 Changelog
==
Many thanks to the following people who contributed patches to this release:
Matthaus Owens

Fixes:

(#17178) Update rubylib on debian/ubuntu installs

Previously the terminus would be installed to the 1.8 sitelibdir
for ruby1.8 or
the 1.9.1 vendorlibdir on ruby1.9. The ruby1.9 code path was never used, so
platforms with ruby1.9 as the default (such as quantal and wheezy)
would not be
able to load the terminus. Modern debian packages put version agnostic ruby
code in vendordir (/usr/lib/ruby/vendor_ruby), so this commit moves the
terminus install dir to be vendordir.

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



Re: [Puppet Users] Puppet Agent not sync with Puppet Master

2012-10-25 Thread Josh Cooper
Hi Saravanan,

On Mon, Oct 22, 2012 at 11:48 PM, Saravanan Veeran  wrote:
> Dear Team,
>
> Currently, we have deployed "puppet-enterprise-2.6.0-el-6-x86_64" in our
> environment.
> Master Details: Red Hat Enterprise Linux Server release 6.1 (Santiago)
> x86_64.
> We have installed the Master as per instructions and it is working fine.
>
> We installed a windows package(puppet-enterprise-2.6.1) in Agent system.
> Agent Details: Windows Server 2008 R2(64 bit). It is added to domain
> "coetools.com".
>
> When I'm running "Run Puppet Agent" in agent machine. I'm getting the
> following error.
>
> Running Puppet agent on demand ...
> err: Could not request certificate: getaddrinfo: The storage control blocks
> were destroyed.
> Exiting; failed to retrieve certificate and waitforcert is disabled
> Press any key to continue . . .
>
> I referred the following link.
> http://docs.puppetlabs.com/windows/troubleshooting.html#installation
>
> They have said like below.
> This error can occur when the agent cannot resolve a DNS name into an IP
> address (for example the server, ca_server, etc properties).
>
> In the agent machine,
> While installation, I have mentioned the IP for Puppet Master hostname.

You'll want to use the fqdn of the master instead of IP, otherwise,
you will get SSL errors, since the hostname the agent tried to connect
to won't match the SSL certificate presented by the puppetmaster.

> In host file, I have mentioned the Master machine with IP and fqdn.
> In network configuration, 1st dns is the IP of the domain(coetools.com). 2nd
> dns is the IP of the Puppet master.

That doesn't sound right. You need to enter the IP address(es) of your
DNS servers.

>
> In the Master machine,
> This is my host file configuration.
> 127.0.0.1   localhost localhost.coetools.com
> 172.19.77.93 PuppetCOE PuppetCOE.coetools.com
>
> In order to sync the agent with the Master, I'm giving the "Run Puppet
> Agent" in windows machine. It shows the above mentioned error.
> So, I'm not getting the agent list when I'm giving the "puppet cert list"
> command in Master in order to proceed.
>
> Is this the problem with the hostfile? DNS issue?

Yes, this is a DNS issue. From the agent you need to be able to execute:

ping puppetcoe.coetools.com

> I have mentioned the host
> files FYI. Please guide me on the same.
>
> Thank You.
>
> With Regards,
> Saravanan V
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/H-sGvqffsZEJ.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.

Josh

-- 
Josh Cooper
Developer, Puppet Labs

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



Re: [Puppet Users] Git clone manifest for windows puppet clinet

2012-10-25 Thread Josh Cooper
Hi Viktoriya,

On Tue, Oct 23, 2012 at 3:29 PM, VT  wrote:
> Can anybody help to come up with a manifest file, which should instruct a
> puppet client running on windows to clone a repository from github directly
> to puppet client? Great thanks for help!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/h1uawzvFDZ8J.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.

I recommend checking out the vcsrepo module:
https://github.com/puppetlabs/puppetlabs-vcsrepo

I haven't run it on Windows, but it appears to not assume POSIX paths,
so that's a good sign. The only issue I can see right away is that you
won't be able to manage file permissions[1].

Josh

[1] 
https://github.com/puppetlabs/puppetlabs-vcsrepo/blob/master/lib/puppet/provider/vcsrepo.rb#L10
-- 
Josh Cooper
Developer, Puppet Labs

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



Re: [Puppet Users] using --tags --noop does not show changes ?

2012-10-25 Thread Jeff McCune
On Wed, Oct 24, 2012 at 5:21 PM, Daniel Aquino wrote:

> I'm just learning about the --tags option and wanted to use it with --test
> --verbose --noop to confirm that the changes were reduced compared to not
> using --tags but as far as I can see when I use --tags I get no notices so
> I'm not sure what's going on.. I used --tags  of a class that I know
> is on the host since it's in stats/classes.txt and without --tags I can see
> it being a pending change.


What version of Puppet are you running?

-Jeff

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



Re: [Puppet Users] err: Could not retrieve catalog from remote server: Error 400 on SERVER: allocator undefined for Proc

2012-10-25 Thread Jeff McCune
On Thu, Oct 25, 2012 at 11:26 AM, Fabrice Bacchella
wrote:

>
> Le 25 oct. 2012 à 18:40, Jeff McCune  a écrit :
>
> On Thu, Oct 25, 2012 at 4:42 AM, Fabrice Bacchella  > wrote:
>
>> This patch does something magic. A broken node (with allocator undefined
>> for Proc) is working when I apply your patch to the puppet master and
>> restart it. I can then remove it and the node will keep working.
>>
>
> Did you restart the puppet master after removing the patch?  I expect the
> error to show back up once the patch is backed out and the master process
> is restarted.
>
>
> Yes, I restarted the puppet master each and many times. I think it gets
> the configuration clean, or something like that, because broken nodes are
> now working well, I just checked.
>
>
Weird.  Must be a heisenbug.  ;)  Resolved as soon as we started studying
it...

If you run into it again, please let me know.  I'll still try and reproduce
the issue with the JSON file you emailed me.

-Jeff

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



Re: [Puppet Users] err: Could not retrieve catalog from remote server: Error 400 on SERVER: allocator undefined for Proc

2012-10-25 Thread Fabrice Bacchella

Le 25 oct. 2012 à 18:40, Jeff McCune  a écrit :

> On Thu, Oct 25, 2012 at 4:42 AM, Fabrice Bacchella  
> wrote:
> This patch does something magic. A broken node (with allocator undefined for 
> Proc) is working when I apply your patch to the puppet master and restart it. 
> I can then remove it and the node will keep working.
> 
> Did you restart the puppet master after removing the patch?  I expect the 
> error to show back up once the patch is backed out and the master process is 
> restarted.
> 

Yes, I restarted the puppet master each and many times. I think it gets the 
configuration clean, or something like that, because broken nodes are now 
working well, I just checked.

> 
> The "magic" is that I'm catching all exceptions and discarding them, so the 
> error isn't being raised up.  This is simply masking the problem through, the 
> problem is still present so please don't apply this patch to your production 
> systems or anything.
> -Jeff 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.

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



Re: [Puppet Users] Puppet & Oracle Database config management

2012-10-25 Thread fatmcgav
Tim

Cool, Cheers for that.
Some good food for thought there...

Cheers again.
Gav
On Oct 25, 2012 6:20 PM, "Tim Mooney"  wrote:

> In regard to: Re: [Puppet Users] Puppet & Oracle Database config...:
>
>  Have you got any examples of the hiera config you're using?
>>
>
> As I said, it's pretty rough.
>
> class oracledb::sysctl(
>   $use_amm = false,
>   $large_mem_pages = '0',
>   $hugetlb_gid = '1001',
> ) {
>
>   validate_bool($use_amm)
>   validate_string($large_mem_**pages)
>   validate_string($hugetlb_gid)
>
>   if ( $use_amm and ($large_mem_pages != '0')) {
> fail("\$use_amm must be false when \$large_mem_pages is not 0\n")
>   }
>
>   #
>   # The basic settings that should always be present.  Can be overridden
>   # via hiera().
>   #
>
>   # sem, default is '250 32000 100 128'
>   sysctl::set{'kernel.sem':
> value => hiera('oracle_sysctl_sem', '250 32000 100 128')
>   }
>
>   # shmmni
>   sysctl::set{'kernel.shmmni':
> value   => hiera('oracle_sysctl_shmmni', '4096'),
> require => Sysctl::Set['kernel.sem'],
>   }
>
>   # file_max
>   sysctl::set{'fs.file-max':
> value   => hiera('oracle_sysctl_file_max'**, '6815744'),
> require => Sysctl::Set['kernel.shmmni'],
>   }
>
>   sysctl::set{'fs.aio-max-nr':
> value   => hiera('oracle_sysclt_aio_max_**nr', '1048576'),
> require => Sysctl::Set['fs.file-max'],
>   }
>
>
>   # ip local port range.
>   sysctl::set{'net.ipv4.ip_**local_port_range':
> value   => hiera('oracle_sysctl_ip_local_**port_range', '9000 65500'),
> require => Sysctl::Set['fs.aio-max-nr'],
>   }
>
>   # network buffer defaults
>   sysctl::set{'net.core.rmem_**default':
> value   => hiera('oracle_sysctl_rmem_**default', '262144'),
> require => Sysctl::Set['net.ipv4.ip_**local_port_range'],
>   }
>
>   sysctl::set{'net.core.rmem_**max':
> value   => hiera('oracle_sysctl_rmem_max'**, '4194304'),
> require => Sysctl::Set['net.core.rmem_**default'],
>   }
>
>   sysctl::set{'net.core.wmem_**default':
> value   => hiera('oracle_sysctl_wmem_**default', '262144'),
> require => Sysctl::Set['net.core.rmem_**max'],
>   }
>
>   sysctl::set{'net.core.wmem_**max':
> value   => hiera('oracle_sysctl_wmem_max'**, '1048576'),
> require => Sysctl::Set['net.core.wmem_**default'],
>   }
>
>   sysctl::set{'vm.swappiness':
> value   => hiera('oracle_sysctl_**swappiness', '0'),
> require => Sysctl::Set['net.core.wmem_**max'],
>   }
>
>   #
>   # Only if AMM is false and $large_mem_pages > 0 do we set these
>   #
>   if (!$use_amm and ($large_mem_pages > 0)) {
> sysctl::set{'vm.nr_hugepages':  value => $large_mem_pages }
> #1001 is the dba group which the oracle user belongs to
> sysctl::set{'vm.hugetlb_shm_**group': value => $hugetlb_gid }
>   }
> }
>
>
> We've talked about having the sysctl class also make certain that
> /dev/shm is mounted and of the appropriate size if $use_amm is true, but
> that hasn't been done yet.
>
> All of the other setup (limits.conf, paths, user, groups) happens in
> oracledb::serverbase, which doesn't use hiera and is more or less specific
> to our environment.
>
> Tim
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to puppet-users+unsubscribe@**
> googlegroups.com .
> For more options, visit this group at http://groups.google.com/**
> group/puppet-users?hl=en
> .
>
>

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



Re: [Puppet Users] Puppet & Oracle Database config management

2012-10-25 Thread fatmcgav
Tim

Cool, Cheers for that.
Some good food for thought there...

Cheers again.
Gav
On Oct 25, 2012 6:20 PM, "Tim Mooney"  wrote:

> In regard to: Re: [Puppet Users] Puppet & Oracle Database config...:
>
>  Have you got any examples of the hiera config you're using?
>>
>
> As I said, it's pretty rough.
>
> class oracledb::sysctl(
>   $use_amm = false,
>   $large_mem_pages = '0',
>   $hugetlb_gid = '1001',
> ) {
>
>   validate_bool($use_amm)
>   validate_string($large_mem_**pages)
>   validate_string($hugetlb_gid)
>
>   if ( $use_amm and ($large_mem_pages != '0')) {
> fail("\$use_amm must be false when \$large_mem_pages is not 0\n")
>   }
>
>   #
>   # The basic settings that should always be present.  Can be overridden
>   # via hiera().
>   #
>
>   # sem, default is '250 32000 100 128'
>   sysctl::set{'kernel.sem':
> value => hiera('oracle_sysctl_sem', '250 32000 100 128')
>   }
>
>   # shmmni
>   sysctl::set{'kernel.shmmni':
> value   => hiera('oracle_sysctl_shmmni', '4096'),
> require => Sysctl::Set['kernel.sem'],
>   }
>
>   # file_max
>   sysctl::set{'fs.file-max':
> value   => hiera('oracle_sysctl_file_max'**, '6815744'),
> require => Sysctl::Set['kernel.shmmni'],
>   }
>
>   sysctl::set{'fs.aio-max-nr':
> value   => hiera('oracle_sysclt_aio_max_**nr', '1048576'),
> require => Sysctl::Set['fs.file-max'],
>   }
>
>
>   # ip local port range.
>   sysctl::set{'net.ipv4.ip_**local_port_range':
> value   => hiera('oracle_sysctl_ip_local_**port_range', '9000 65500'),
> require => Sysctl::Set['fs.aio-max-nr'],
>   }
>
>   # network buffer defaults
>   sysctl::set{'net.core.rmem_**default':
> value   => hiera('oracle_sysctl_rmem_**default', '262144'),
> require => Sysctl::Set['net.ipv4.ip_**local_port_range'],
>   }
>
>   sysctl::set{'net.core.rmem_**max':
> value   => hiera('oracle_sysctl_rmem_max'**, '4194304'),
> require => Sysctl::Set['net.core.rmem_**default'],
>   }
>
>   sysctl::set{'net.core.wmem_**default':
> value   => hiera('oracle_sysctl_wmem_**default', '262144'),
> require => Sysctl::Set['net.core.rmem_**max'],
>   }
>
>   sysctl::set{'net.core.wmem_**max':
> value   => hiera('oracle_sysctl_wmem_max'**, '1048576'),
> require => Sysctl::Set['net.core.wmem_**default'],
>   }
>
>   sysctl::set{'vm.swappiness':
> value   => hiera('oracle_sysctl_**swappiness', '0'),
> require => Sysctl::Set['net.core.wmem_**max'],
>   }
>
>   #
>   # Only if AMM is false and $large_mem_pages > 0 do we set these
>   #
>   if (!$use_amm and ($large_mem_pages > 0)) {
> sysctl::set{'vm.nr_hugepages':  value => $large_mem_pages }
> #1001 is the dba group which the oracle user belongs to
> sysctl::set{'vm.hugetlb_shm_**group': value => $hugetlb_gid }
>   }
> }
>
>
> We've talked about having the sysctl class also make certain that
> /dev/shm is mounted and of the appropriate size if $use_amm is true, but
> that hasn't been done yet.
>
> All of the other setup (limits.conf, paths, user, groups) happens in
> oracledb::serverbase, which doesn't use hiera and is more or less specific
> to our environment.
>
> Tim
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to puppet-users+unsubscribe@**
> googlegroups.com .
> For more options, visit this group at http://groups.google.com/**
> group/puppet-users?hl=en
> .
>
>

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



Re: [Puppet Users] Puppet & Oracle Database config management

2012-10-25 Thread Tim Mooney

In regard to: Re: [Puppet Users] Puppet & Oracle Database config...:


Have you got any examples of the hiera config you're using?


As I said, it's pretty rough.

class oracledb::sysctl(
  $use_amm = false,
  $large_mem_pages = '0',
  $hugetlb_gid = '1001',
) {

  validate_bool($use_amm)
  validate_string($large_mem_pages)
  validate_string($hugetlb_gid)

  if ( $use_amm and ($large_mem_pages != '0')) {
fail("\$use_amm must be false when \$large_mem_pages is not 0\n")
  }

  #
  # The basic settings that should always be present.  Can be overridden
  # via hiera().
  #

  # sem, default is '250 32000 100 128'
  sysctl::set{'kernel.sem':
value => hiera('oracle_sysctl_sem', '250 32000 100 128')
  }

  # shmmni
  sysctl::set{'kernel.shmmni':
value   => hiera('oracle_sysctl_shmmni', '4096'),
require => Sysctl::Set['kernel.sem'],
  }

  # file_max
  sysctl::set{'fs.file-max':
value   => hiera('oracle_sysctl_file_max', '6815744'),
require => Sysctl::Set['kernel.shmmni'],
  }

  sysctl::set{'fs.aio-max-nr':
value   => hiera('oracle_sysclt_aio_max_nr', '1048576'),
require => Sysctl::Set['fs.file-max'],
  }


  # ip local port range.
  sysctl::set{'net.ipv4.ip_local_port_range':
value   => hiera('oracle_sysctl_ip_local_port_range', '9000 65500'),
require => Sysctl::Set['fs.aio-max-nr'],
  }

  # network buffer defaults
  sysctl::set{'net.core.rmem_default':
value   => hiera('oracle_sysctl_rmem_default', '262144'),
require => Sysctl::Set['net.ipv4.ip_local_port_range'],
  }

  sysctl::set{'net.core.rmem_max':
value   => hiera('oracle_sysctl_rmem_max', '4194304'),
require => Sysctl::Set['net.core.rmem_default'],
  }

  sysctl::set{'net.core.wmem_default':
value   => hiera('oracle_sysctl_wmem_default', '262144'),
require => Sysctl::Set['net.core.rmem_max'],
  }

  sysctl::set{'net.core.wmem_max':
value   => hiera('oracle_sysctl_wmem_max', '1048576'),
require => Sysctl::Set['net.core.wmem_default'],
  }

  sysctl::set{'vm.swappiness':
value   => hiera('oracle_sysctl_swappiness', '0'),
require => Sysctl::Set['net.core.wmem_max'],
  }

  #
  # Only if AMM is false and $large_mem_pages > 0 do we set these
  #
  if (!$use_amm and ($large_mem_pages > 0)) {
sysctl::set{'vm.nr_hugepages':  value => $large_mem_pages }
#1001 is the dba group which the oracle user belongs to
sysctl::set{'vm.hugetlb_shm_group': value => $hugetlb_gid }
  }
}


We've talked about having the sysctl class also make certain that
/dev/shm is mounted and of the appropriate size if $use_amm is true, but
that hasn't been done yet.

All of the other setup (limits.conf, paths, user, groups) happens in
oracledb::serverbase, which doesn't use hiera and is more or less specific
to our environment.

Tim

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



[Puppet Users] Puppet Meetup at LinuxCon Europe: Nov 5 in Barcelona

2012-10-25 Thread Dawn Foster
We are having an informal Puppet Meetup at LinuxCon Europe in
Barcelona on Monday, November 5 at 7:15pm. You don't need to be
attending LinuxCon to join us at the meetup. I will be attending
LinuxCon and hosting the meetup.

The format is very informal. We won't have any presentations or
speakers, just a few of us at a bar to have a couple of drinks and
chat about Puppet.

We're still working on finding a place to hold the meetup, but it will
be in or near Hotel Fira Palace (LinuxCon venue) right after the
scheduled evening LinuxCon event on Monday night. Please RSVP now if
you want to attend to help us plan for the number of attendees and a
venue: http://puppetmeetupbarcelona.eventbrite.com/

We'll send an update to RSVP'ed attendees with the meetup location
when we have selected a place to have it.

Note:  I will also be presenting about open source metrics (using some
examples from the Puppet Community) on Nov 5 at 1:20pm as part of
LinuxCon Europe for anyone who wants to attend my session as well.

Dawn

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



[Puppet Users] Connection Timed Out updating node on 3g mobile broadband device

2012-10-25 Thread Steve
I have a puppetmaster on an Amazon EC2 instance of Ubuntu 12.04. All of the 
puppet nodes I am running are also on ubuntu server 12.04. I can connect 
any of the nodes on a wireless or LAN connection. When I switch my node to 
a Verizon mobile 3g or 4g device I run "puppet agent -t" and I get the 
message

err: Could not retrieve catalog from remote server: Connection time out - 
SSL_connect
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
err: Could not send report: Connection timed out - SSL_connect

Before I got the message there was a long pause about 20 minutes long 
trying to do the update.

I can download and install packages with the 3g connection using apt-get 
install. I can access webpages including secure pages using Lynx. I can 
ping the Puppet Master.

I wanted to make sure I was getting through to the Puppet Master so I 
removed the certificate from both the Puppet Master and the Client. Then I 
ran "puppet agent -t" and the certificate was signed and I can see it again 
on the Puppet Master and the client. 

I checked port 8140 to see that it is open in Amazon, and it is. There is 
no firewall enabled in the instance itself.

Next I limited the puppet update to only one trivial module and nothing 
changed.

Lastly, I connected a node that is on a desktop version of Ubuntu 12.10 and 
connected my Verizon device. I had the similar behavior. The system paused 
for 10 to 20 minutes like before then gave me the message:

Error: Failed to apply catalog: execution expired
Error: Could not send report: execution expired

Since I have little experience with puppet or these devices, I suspect the 
device has some sort of interrupt or time out on the device that causes 
problems with the puppet process.

Anyways as far as I can tell the only thing I cannot do with this 
connection is update puppet.

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



Re: [Puppet Users] err: Could not retrieve catalog from remote server: Error 400 on SERVER: allocator undefined for Proc

2012-10-25 Thread Jeff McCune
On Thu, Oct 25, 2012 at 4:42 AM, Fabrice Bacchella
wrote:

> This patch does something magic. A broken node (with allocator undefined
> for Proc) is working when I apply your patch to the puppet master and
> restart it. I can then remove it and the node will keep working.
>

Did you restart the puppet master after removing the patch?  I expect the
error to show back up once the patch is backed out and the master process
is restarted.

The "magic" is that I'm catching all exceptions and discarding them, so the
error isn't being raised up.  This is simply masking the problem through,
the problem is still present so please don't apply this patch to your
production systems or anything.

-Jeff

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



Re: [Puppet Users] Re: Multiple resource definition error

2012-10-25 Thread jcbollinger


On Thursday, October 25, 2012 9:06:30 AM UTC-5, Abhijeet Rastogi wrote:
>
> On Thu 25 Oct 2012 06:53:24 PM IST, jcbollinger wrote: 
> > 
> > You're still confusing me.  Your initial message led me to believe 
> > that your two ucarp instances are supposed to run on different hosts. 
> > Did I misunderstand? 
>
> In total, there will be four ucarp instances. Two running on two 
> different machines. The issue here is that, the file resources defined 
> inside the user-defined ucarp::host::config resource is throwing the 
> error. I am not sure how do I solve that. 
>
> Meanwhile, I had a look at 
> https://github.com/bodepd/puppet-ensure_resource and this kind of 
> solved my problem.



Any problem solved by that function would be better solved by avoiding 
duplicate declarations in the first place.  At best it's a band-aid, not a 
fix, but it is completely wrong if you cannot be certain that all 
declarations of the target resource are identical.  If they are all 
identical, then the correct solution is to lift the declaration(s) out of 
its duplicative context (often a defined type) into a class that the 
defined type declares, or can rely on having been declared.  If they are *
not* all identical, then you have a *bug* in your manifests, and function 
just masks it.

Your problem appears to be a special case of the latter.  You have this 
definition (excerpted, and name edited):

define ucarp::host::config( $node_id, $password="", $interface_primary, 
$interface_vip, $vip_addr, $vip_addr_netmask, $vip_addr_gw, $ensure=present 
) {

  # ...

file { "vip-up":
  ensure => $present,
  path => '/etc/sysconfig/carp/vip-up',
  content => template("ucarp/vip-up.erb"),
  require => Package['ucarp'],
}

  # other related scripts ...
}

Now, the template interpolates some of the definition's parameters, making 
the output specific to one ucarp instance.  Therefore, declaring it 
indirectly via ensure_resource() is incorrect: you end up with only the 
script for *one* of your ucarp instances, where what you actually need is a 
separate script for each one.  That's what Puppet has been trying to tell 
you all along.

You need to add some kind of instance identifier to the name of the file 
you are creating (and to the resource title if you continue to separate 
it), such as

file { "/etc/sysconfig/carp/vip${vip_id}-up":
  ensure => $present,
  content => template("ucarp/vip-up.erb"),
  require => Package['ucarp'],
}

(Where you would need to set $vip_id appropriately via an additional 
parameter to your definition, or some other means.)

If, contrary to appearances, you really do want only one vip_up script (and 
similar) for all instances, then its declaration does not belong in a 
per-instance definition.  It looks like you could pull it up to class 
ucarp::host.
 

I was able to do what I intended by wrapping the 
> file resources defined inside the ucarp::host::config inside 
> ensure_resource. Everything worked perfectly on 2.7.9 as expected. I 
> was testing everything by having only one module and doing everything 
> in site.pp. But, when I moved to the actual environment which includes 
> 2.6.13, it isn't able to find the resource type ucarp::host::config and 
> complains about invalid resource type. Any idea why that could be 
> happening? 
>


Yes.  If you are trying to declare an instance of nested definition 
ucarp::host::config before or without including class ucarp::host, then it 
is possible that the autoloader will not find it.  You should move it to 
its own file in the module (modules/ucarp/manifests/host/config.pp, based 
on its name).

 

>
> The situation is something like: 
>
> 1. There is init.pp in module ucarp containing class ucarp. (As it 
> should).


Sort of.  If your module "ucarp" has a main class (i.e. one with the same 
name as the module), then init.pp is where it should appear.  It is not 
necessary to have such a class, however.
 

> It has a include "*" written in the first line. 
>

I'm surprised that works at all, and your results suggest that it doesn't 
do what you think.  It would be much better to explicitly 'include' the 
classes you want.


John

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



Re: [Puppet Users] Re: Multiple resource definition error

2012-10-25 Thread Abhijeet R

On Thu 25 Oct 2012 06:53:24 PM IST, jcbollinger wrote:


You're still confusing me.  Your initial message led me to believe
that your two ucarp instances are supposed to run on different hosts.
Did I misunderstand?


In total, there will be four ucarp instances. Two running on two 
different machines. The issue here is that, the file resources defined 
inside the user-defined ucarp::host::config resource is throwing the 
error. I am not sure how do I solve that.


Meanwhile, I had a look at 
https://github.com/bodepd/puppet-ensure_resource and this kind of 
solved my problem. I was able to do what I intended by wrapping the 
file resources defined inside the ucarp::host::config inside 
ensure_resource. Everything worked perfectly on 2.7.9 as expected. I 
was testing everything by having only one module and doing everything 
in site.pp. But, when I moved to the actual environment which includes 
2.6.13, it isn't able to find the resource type ucarp::host::config and 
complains about invalid resource type. Any idea why that could be 
happening?


The situation is something like:

1. There is init.pp in module ucarp containing class ucarp. (As it 
should). It has a include "*" written in the first line.
2. There is host.pp in modules/ucarp/manifests which has class 
ucarp::host. In that there is a "define config )(args)".
3. Then in manifests/production/myproject/templates.pp, there are many 
classes defined that for each type of host.
4. There is manifests/production/myproject/nodes.pp which has nodes 
defined. In that, there is a node A which inherits some class from the 
templates.pp.

5. In this node, I did something like:

include ucarp

ucarp::host::config { "ucarp-test":
..
..
}

The puppet complains saying that

err: Could not retrieve catalog from remote server: Error 400 on 
SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: 
Invalid resource type ucarp::host
::config at /etc/puppet/manifests/production/myproject/nodes.pp:614 on 
node A


I am not sure how to proceed? I have also tried adding "include 
ucarp::host" in the node definition but no success.





If the ucarp instances are on different hosts, then it seems to me
that each of those hosts' catalogs should declare only the ucarp
instance for that host.  You should not need multiple ucarp
declarations for that setup.  Even if you wrote two separate
declarations in your manifest, you would want to use a conditional
statement to ensure that no more than one was actually applied to any
host.  Under those circumstances, Puppet would not complain about
duplicate resources.


The code can be seen here
https://github.com/shadyabhi/puppet-ucarp


I have developed two versions, one with classes and the other with
resources. And both suffer the same issue.



If you really do intend to declare two different ucarp instances on
the /same node/, then giving the resources different titles -- such as
"ucarp-test1" and "ucarp-test2" -- should get you around the duplicate
resource issue.  (Note: defined-type instances are resources, but
classes are not.)


John

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


--
Cheers,
Abhijeet R
http://blog.abhijeetr.com

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



[Puppet Users] Re: Weird problem realizing exported resources

2012-10-25 Thread jcbollinger


On Wednesday, October 24, 2012 6:10:18 AM UTC-5, MCZ wrote:
>
> So basically I am using this (http://github.com/larstobi/puppet-dns/) 
> module to manage amazon's route53 dns entries.
> The generic definition goes like that:
>
> node 'testnode' {
> base::route53::r53delegation { "$primary_fqdn.":  ;}
> }
>
> On a server node which (is actually my puppet master) submits dns entries 
> to amazon I do:
>
> node 'masternode'  {
> include base::route53::r53server
> }
>
> The problem is that whenever I specify resources 
> via base::route53::r53delegation within same node where 
> base::route53::r53server is included, resources seems to show up (be 
> exported) in the mysql database but are never realized...
>

Would you care to show how that node declaration looks?

 

> --debug --verbose is not really verbose enough about realizing resources...
> A little help how to further debug this would be highly appreciated...
>
> The definitions looks like below:
>
> define base::route53::r53delegation($recordname ='', 
> target="$::ec2_public_hostname",rtype='CNAME',$ttl=60) {
> @@dnsrecord { "$title":
> ensure => present,
> value  => "$target",
> type   => "$rtype",
> zone   => 'foobar.com.',
> ttl=> "$ttl",
>}
> } 
>
> class base::route53::r53server {
> include base::generalsettings
> Dnsrecord <<| tag == 'Base::Route53::R53delegation' |>> {
> id => "${base::generalsettings::route53_id}",
> secret => "${base::generalsettings::route53_key}",
> }
> } 
>


Is this on Puppet 3?  Puppet 3 has at least one or two of issues related to 
resources that are both exported and collected by the same node.  I don't 
see a ticket related to this particular behavior, but it is conceivable 
that there is a bug.

On the other hand, I would also be looking at the possibility of 
parse-order issues.  Do make sure that the node's own exported resources 
are declared before the collection that includes them is declared.


John

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



Re: [Puppet Users] Re: Syntax error in 2.6.8 but not in 2.7.19

2012-10-25 Thread Abhijeet R

Hi jcbollinder,

Your guess is right. That fixed the issue.

On Thu 25 Oct 2012 06:35:19 PM IST, jcbollinger wrote:



On Thursday, October 25, 2012 6:29:10 AM UTC-5, Abhijeet Rastogi wrote:

Hi,

I have a simple .pp file like

class ucarp2::host
{
   define config( $node_id, $password="", $interface_primary,
$interface_vip, $vip_addr, $vip_addr_netmask, $vip_addr_gw,
$other_options = "", $ensure=present ) {
 #Creating vip up/down scripts
 ensure_resource('file', 'vip-up', {ensure => $present, path =>
'/etc/sysconfig/carp/vip-up', content =>
template("ucarp2/vip-up.erb"),
require => Package['ucarp']})
   }
}

On puppet 2.7.19, no issues but on 2.6.8, it gives

err: Could not parse for environment production: Syntax error at '{';
expected '}' at /tmp/ucarp/manifests/host.pp:6

The function ensure_resource() actually comes from
https://github.com/bodepd/puppet-ensure_resource


Is this a bug in 2.6.8? It's a production (so can't upgrade as of
now)
environment and I had set a update hook to avoid any syntax errors
and
this is blocking me. What is going wrong here?


As a guess, Puppet 2.6 may not support hash literals as function
arguments.  If that's indeed the problem then you could work around it
by assigning the hash to a variable and passing the variable.


John

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


--
Cheers,
Abhijeet R
http://blog.abhijeetr.com

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



Re: [Puppet Users] Re: Multiple resource definition error

2012-10-25 Thread jcbollinger


On Thursday, October 25, 2012 4:38:31 AM UTC-5, Abhijeet Rastogi wrote:
>
> In ucarp, multiple instances can be run and I have to run two instances 
> of ucarp. So, what ever I do, either create a custom resource ot 
> parameterised classes, they will have to be declared twice. 
>


You're still confusing me.  Your initial message led me to believe that 
your two ucarp instances are supposed to run on different hosts.  Did I 
misunderstand?

If the ucarp instances are on different hosts, then it seems to me that 
each of those hosts' catalogs should declare only the ucarp instance for 
that host.  You should not need multiple ucarp declarations for that 
setup.  Even if you wrote two separate declarations in your manifest, you 
would want to use a conditional statement to ensure that no more than one 
was actually applied to any host.  Under those circumstances, Puppet would 
not complain about duplicate resources.
 

>
> The code can be seen here https://github.com/shadyabhi/puppet-ucarp 
>
> I have developed two versions, one with classes and the other with 
> resources. And both suffer the same issue. 
>


If you really do intend to declare two different ucarp instances on the *same 
node*, then giving the resources different titles -- such as "ucarp-test1" 
and "ucarp-test2" -- should get you around the duplicate resource issue.  
(Note: defined-type instances are resources, but classes are not.)


John

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



[Puppet Users] Re: Syntax error in 2.6.8 but not in 2.7.19

2012-10-25 Thread jcbollinger


On Thursday, October 25, 2012 6:29:10 AM UTC-5, Abhijeet Rastogi wrote:
>
> Hi, 
>
> I have a simple .pp file like 
>
> class ucarp2::host 
> { 
>define config( $node_id, $password="", $interface_primary, 
> $interface_vip, $vip_addr, $vip_addr_netmask, $vip_addr_gw, 
> $other_options = "", $ensure=present ) { 
>  #Creating vip up/down scripts 
>  ensure_resource('file', 'vip-up', {ensure => $present, path => 
> '/etc/sysconfig/carp/vip-up', content => template("ucarp2/vip-up.erb"), 
> require => Package['ucarp']}) 
>} 
> } 
>
> On puppet 2.7.19, no issues but on 2.6.8, it gives 
>
> err: Could not parse for environment production: Syntax error at '{'; 
> expected '}' at /tmp/ucarp/manifests/host.pp:6 
>
> The function ensure_resource() actually comes from 
> https://github.com/bodepd/puppet-ensure_resource 
>
> Is this a bug in 2.6.8? It's a production (so can't upgrade as of now) 
> environment and I had set a update hook to avoid any syntax errors and 
> this is blocking me. What is going wrong here? 
>
>
As a guess, Puppet 2.6 may not support hash literals as function 
arguments.  If that's indeed the problem then you could work around it by 
assigning the hash to a variable and passing the variable.


John
 

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



RE: [Puppet Users] puppet facter variable substring

2012-10-25 Thread Steven Nemetz

Not sure if puppet will let you access regex without being in some type of test.
Also, just habit. I'm usually doing some validation in the regex.

In this case, I've moved validation to after this and have it validate against 
data in hiera. Hiera has a list of the valid data center codes.

Steven

Date: Thu, 25 Oct 2012 01:13:04 -0700
From: paolo.sup...@gmail.com
To: puppet-users@googlegroups.com
Subject: Re: [Puppet Users] puppet facter variable substring

Hi Steven 
Why the if statement? 


TIA Paolo 

On Wednesday, October 24, 2012 5:58:16 PM UTC+2, Steven wrote:



You can use regex for that
 
Here is an piece of my code for doing that. In my case [environment, 1 
letter][collo, 2 letters]
 
  if $hostname =~ /^(.)(..)/ {
$global_env = $1
$location = $2
  }

Steven
 
Date: Wed, 24 Oct 2012 07:14:50 -0700
From: paolo@gmail.com
To: puppet...@googlegroups.com
Subject: [Puppet Users] puppet facter variable substring

Hi 
I have a serires of servers that their hostname (not FQDN) is built in the same 
manner [header, 3 letters][collo, 4 letters][environment, 3 letters][number, 4 
digits]. There's no specific separator between each part of hostname. Is there 
way I can extract the collo part of the hostname in puppet? 


TIA Paolo 





-- 

You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.

To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/M8d-zyzlHw8J.
 
To post to this group, send email to puppet...@googlegroups.com.

To unsubscribe from this group, send email to puppet-users...@googlegroups.com.


For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.
  




-- 

You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.

To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/Z5GXvX1kvW4J.
 
To post to this group, send email to puppet-users@googlegroups.com.

To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.


For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.
  

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



Re: [Puppet Users] err: Could not retrieve catalog from remote server: Error 400 on SERVER: allocator undefined for Proc

2012-10-25 Thread Fabrice Bacchella

Le 24 oct. 2012 à 17:49, Jeff McCune  a écrit :

> Are you using stored configs?  Could you also paste your puppet.conf with 
> passwords redacted?

Yes I'm using stored config.

> 
> It looks like the YAML library itself is raising the exception.  Could you 
> apply this small patch to one of your puppet masters, then email me the 
> /tmp/for_jeff.json file?  This will help me understand what value might be 
> causing the exception in the YAML library.
> 
> Also, a viable work-around might be to switch from stored configs to PuppetDB.

No it's not. We're using mysql for our database and have no competences in 
postgress, so installing PuppetDB needs time, reflexion and testing. It might 
be an intersting solution, but certainly not a work-around for a bug.

> 
> You should be able to apply this patch using:
> 
> cd /usr/lib/ruby/site_ruby/1.8
> patch -p2 < /tmp/0001-WIP-Instrument-store_configs-serialization-issue.patch
> 
> Then you'd need to restart your puppet master and look for /tmp/for_jeff.json 
> file to be created.

This patch does something magic. A broken node (with allocator undefined for 
Proc) is working when I apply your patch to the puppet master and restart it. I 
can then remove it and the node will keep working.

All of this with up to date puppet in both node and master.

Anyway, I'll send you the requested files in a private mail.


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



[Puppet Users] Syntax error in 2.6.8 but not in 2.7.19

2012-10-25 Thread Abhijeet R

Hi,

I have a simple .pp file like

class ucarp2::host
{
  define config( $node_id, $password="", $interface_primary, 
$interface_vip, $vip_addr, $vip_addr_netmask, $vip_addr_gw, 
$other_options = "", $ensure=present ) {

#Creating vip up/down scripts
ensure_resource('file', 'vip-up', {ensure => $present, path => 
'/etc/sysconfig/carp/vip-up', content => template("ucarp2/vip-up.erb"), 
require => Package['ucarp']})

  }
}

On puppet 2.7.19, no issues but on 2.6.8, it gives

err: Could not parse for environment production: Syntax error at '{'; 
expected '}' at /tmp/ucarp/manifests/host.pp:6


The function ensure_resource() actually comes from 
https://github.com/bodepd/puppet-ensure_resource


Is this a bug in 2.6.8? It's a production (so can't upgrade as of now) 
environment and I had set a update hook to avoid any syntax errors and 
this is blocking me. What is going wrong here?


--
Cheers,
Abhijeet R
http://blog.abhijeetr.com

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



Re: [Puppet Users] Puppet & Oracle Database config management

2012-10-25 Thread Gavin Williams
Stefan

Thanks again for some really good info. 

Are your oracle::* classes something that you could share? 
And cheers for linking the oratab type, that looks really useful, and looks 
like it could easily be extended to cover oranfstab aswell... May well fork 
that and tweak it as appropriate :) 

Cheers again
Gavin 

On Wednesday, 24 October 2012 18:46:22 UTC+1, Stefan Schulte wrote:
>
> On Wed, Oct 24, 2012 at 03:03:28PM +0100, fatmcgav wrote: 
> > Afternoon all. 
> > 
> > I've been reading around on Puppet and Oracle, and have come up with a 
> few 
> > links that suggest how to get Oracle installed and base configured, 
> which 
> > has got me started in the right direction on that. 
> > 
> > My next challenge is maintaining Oracle database specific configuration 
> on 
> > the relevant hosts. This contains various elements, such as /etc/oratab, 
> > /etc/oranfstab (as we're using dNFS), various NFS mounts required for a 
> > given database, and a few other bits and pieces... 
> > Ideally, it would be a 1-to-1 relationship between a given host and a 
> given 
> > DB. However that's unlikely in our env - We're more likely to have 1 or 
> > multiple databases on a given host, which all need to be maintained. 
> > 
> > My initial thoughts are to use something like hiera to maintain this 
> > configuration data. 
> > Is this my best approach? Any other suggestions? Anyone doing this for 
> > real? 
> > 
> > Basically, any info/pointers you give me is greatly appreciated. 
> > 
> > Regards 
> > Gavin 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "Puppet Users" group. 
> > To post to this group, send email to 
> > puppet...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> puppet-users...@googlegroups.com . 
> > For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en. 
> > 
>
> A collegue of mine wrote an oracle::server class that makes sure 
> directories, users, groups and NFS mounts are in place. The class will 
> also install oracle itself with an exec resource (silent install). The 
> exec resource will not run the installer directly but will launch a 
> wrapperscript. It basically looks like 
>
> exec { 'Install_Oracle': 
>   command => "/path/to/nas/share/install_oracle${version}.sh", 
>   creates => "/u01/some/path/log/install_oracle${version}.done.log", 
> } 
>
> The wrapper script will launch a slient install and will create the 
> .done.log file afterwards. This was in our opinion the best way to keep 
> puppet from installing the software in each puppet run. The 
> oracle::server class does nothing that is related to a specific 
> instance. 
>
> We then have an oracle::instance define that installs instance related 
> files. The define has a similar exec resource that can install a single 
> instance (I guess the command is dbca or similar). 
>
> To manage oratab entries we use a custom type I've written: 
> https://github.com/stschulte/puppet-oracle 
>
> We do not use hiera to store instance related data (instance name, 
> charset, homedirectory) we use parameterized classes (oracle::server) and 
> defines (oracle::instance) with parameters at node level in site.pp 
>
> -Stefan 
>

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



Re: [Puppet Users] Puppet & Oracle Database config management

2012-10-25 Thread Gavin Williams
Tim

Cheers for the info. 

Have you got any examples of the hiera config you're using? 

Cheers
Gavin 

On Wednesday, 24 October 2012 18:13:01 UTC+1, Tim Mooney wrote:
>
> In regard to: [Puppet Users] Puppet & Oracle Database config 
> management,...: 
>
> > My next challenge is maintaining Oracle database specific configuration 
> on 
> > the relevant hosts. This contains various elements, such as /etc/oratab, 
> > /etc/oranfstab (as we're using dNFS), various NFS mounts required for a 
> > given database, and a few other bits and pieces... 
> > Ideally, it would be a 1-to-1 relationship between a given host and a 
> given 
> > DB. However that's unlikely in our env - We're more likely to have 1 or 
> > multiple databases on a given host, which all need to be maintained. 
> > 
> > My initial thoughts are to use something like hiera to maintain this 
> > configuration data. 
> > Is this my best approach? Any other suggestions? Anyone doing this for 
> > real? 
>
> We're doing it, but not particularly well. 
>
> We mostly configure the prereqs for Oracle -- packages, user & group, 
> limits.d entries, profile.d shell settings, sysctl, paths, etc.  We use 
> puppet's file shipping for tnsnames.ora.  I don't think we're actually 
> managing /etc/oratab; the first run of puppetizing our db servers left 
> some content that we allow the DBA to change directly. 
>
> I am using hiera for the sysctl settings, along with a bit of logic in 
> the manifest for whether AMM is in use or hugepages. 
>
> We too have multiple databases per host, which complicates things 
> somewhat. 
>
> If you come up with something you feel is even moderately elegant, 
> consider sharing it on the forge. 
>
> Tim 
> -- 
> Tim Mooney 
> tim.m...@ndsu.edu 
> Enterprise Computing & Infrastructure  701-231-1076 
> (Voice) 
> Room 242-J6, IACC Building 701-231-8541 (Fax) 
> North Dakota State University, Fargo, ND 58105-5164 
>

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



Re: [Puppet Users] Re: Multiple resource definition error

2012-10-25 Thread Abhijeet R
In ucarp, multiple instances can be run and I have to run two instances 
of ucarp. So, what ever I do, either create a custom resource ot 
parameterised classes, they will have to be declared twice.


The code can be seen here https://github.com/shadyabhi/puppet-ucarp

I have developed two versions, one with classes and the other with 
resources. And both suffer the same issue.


I would really appreciate if anyone can help me with this.

On Thu 25 Oct 2012 02:32:22 AM IST, jcbollinger wrote:



On Wednesday, October 24, 2012 10:07:56 AM UTC-5, Abhijeet Rastogi wrote:

Hi,

So, I am writing a module to install and configure ucarp. There is
only
one module in puppet forge and that is not that good.
In ucarp, same configuration files have to be served on two
servers and
to configure the host I am defining a custom resource
ucarp::host::config. So, for using, I'll have to create this resource
two times on two different servers. So, this resource generates few
files out of which few will be common and hence starts generating
multiple definitions error.

So, to use the module on Host A, a guy will have to first include
ucarp
(to do basic stuff like package installation and making sure
service is
running) and then something like

ucarp::host::config { "ucarp-test":
   node_id => '1',
   password => "testpass",
   interface_primary => 'eth0',
   interface_vip => 'eth1',
   vip_addr => '1.1.1.1',
   vip_addr_netmask => '2.2.2.2',
}

On Host B, everything would be same except the vip_addr value which
results in multiple definition errors for the files that I'm serving.
What is it that can be done?


Resources need to be unique only within the scope of one node.  Two
different nodes' resources cannot cause a multiple definition error.
Either I don't understand what you are trying to do, or what you're
actually doing is not what you intend to do.


John

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


--
Cheers,
Abhijeet R
http://blog.abhijeetr.com

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



[Puppet Users] Re: Puppet spuriously removing classes from classes.txt

2012-10-25 Thread Matt Carroll
I'm not sure whether it's buggy behaviour or not, but by comparing the 
daemon.log and an inotify left running on the file I can confirm that it's 
puppet that's making the changes. Whether or not it's someone running 
puppet against a stupid environment or not remains to be seen, but I still 
need to find out what is going on...

Like I say, this is not directly my infrastructure or I'd have a better 
idea.

On Monday, 22 October 2012 14:41:16 UTC+1, jcbollinger wrote:
>
>
>
> On Friday, October 19, 2012 10:55:03 AM UTC-5, Matt Carroll wrote:
>>
>> I've been asked to look at a problem on an overseas rig whereby certain 
>> bits of config were going awry. This was down to the fact that they were 
>> querying the mcollective registration database and feeding back in to the 
>> configs, using queries based on class data. The mcollective + mongodb setup 
>> is working fine, but it would appear that the classes.txt file which 
>> mcollective reads to get configuration management classes is, on certain 
>> servers, spuriously being emptied of all classes other than 'settings'
>>
>> Seeing as the settings class is being left in, I can only assume that it 
>> must be puppet doing the modification. Has anyone ever seen behaviour like 
>> this before? It's truly bizarre, and even stranger is that after this has 
>> happened, sometimes the classes populate again. Every time I've run puppet 
>> manually  with puppetd --test or run it --noop, it's run just fine and 
>> without noop it always seems to fix the problem, but later the node will 
>> show up as having only one class again and even later fix itself, so it's 
>> next to impossible to pin down.
>>
>> This is 2.6.7 on Ubuntu running against a centralised puppetmaster.
>>
>
>
> Are you certain the behavior is buggy?  The fact that Puppet rights itself 
> makes me think that Puppet itself is not the problem.
>
> What if there is a cron job (or a human admin) that periodically does 
> something like "puppetd --onetime --no-daemonize --tags settings"?  Or what 
> if the affected node's manifests use schedules in a way that occasionally 
> excludes all classes except 'settings'?  The former, at least, should show 
> up in the system log.
>
> You might also get some insight by wrapping puppetd in a script that makes 
> a timestamped backup of classes.txt after each run.  Done right, that ought 
> to establish whether Puppet is the one writing the unexpected content, and 
> if so then the timestamps when the bad files appear might tell you 
> something useful.  Perhaps you could dredge the same information out of 
> your system logs, but the timestamped backups might be easier to analyze 
> (and they would pinpoint where in your logs to look for additional 
> information).
>
>
> John
>
>

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



Re: [Puppet Users] Benchmark puppetDB

2012-10-25 Thread shell heriyanto
Hello Chris,

Thanks for your reply, i already solved this by use my production modules.
But yes, its take some time to build half my of production enviroment.
Thank for yours great work.

Regards,
Heriyanto

On Thu, Oct 25, 2012 at 12:38 AM, Chris Price  wrote:

> Hello Heriyanto,
>
> Were you able to come up with something to solve your problem?  We don't
> currently have any sort of sample catalog that could be used to easily
> benchmark the performance difference in your environment, though your
> e-mail has prompted some internal discussion about how we could conceivably
> provide something like that in the future.
>
> I suspect that if you simply time any agent run in your environment (for
> an agent with a non-trivial number of resources) against legacy
> storedconfigs, and then time it again with PuppetDB, you should notice some
> difference (because legacy storeconfigs must synchronously insert all of
> the catalog data into the database before the run completes).  You could
> also run your master with the "--debug" flag, which might provide you with
> some timing info for the various phases of the process.
>
> However, the biggest benefits come when you have a master that is under
> some load from concurrent agent requests.  That might be a bit more tricky
> to simulate in your own environment if the blog posts and other data we've
> posted isn't sufficient, but we would be happy to try to help if you have
> questions!
>
> Thanks
> Chris
>
>
> On Wednesday, October 17, 2012 5:45:07 AM UTC-7, Heriyanto wrote:
>
>> Hi Nan,
>>
>> Thank for your reply, yes that what im talking about, i can't prove just
>> with link to puppet blog,
>> yes you right catalog compile should give our output, do you have some
>> example of one
>> with large number of resources for my testing?
>>
>> Thank for your help
>> Regards,
>>
>> On Tue, Oct 16, 2012 at 1:12 AM, Nan Liu  wrote:
>>
>>> On Mon, Oct 15, 2012 at 1:41 AM, shell heriyanto
>>>  wrote:
>>> > I know puppetDB its more faster than storeconfigs, but to replace
>>> > storeconfigs with puppetDB into production server
>>> > Its need more explanation than some link from puppetlabs, need prove
>>> to my
>>> > bos and team.
>>> > For testing i just have 1 puppetmaster and 1 and 2 puppet agent, how i
>>> can
>>> > look different performance?
>>> > Its that any idea / or complex puppet stanza to benchmark / compare
>>> this
>>> > with storeconfigs?
>>>
>>> A catalog compile should show the difference in speed (especially one
>>> with large number of resources). This is discussed in the Puppet DB
>>> blog post. Also Deepak has great talk at Puppet Conf discussing why
>>> PuppetDB is async (which isn't something quite as easy to benchmark
>>> with just 2 agents):
>>>
>>> http://youtu.be/xw83cRofkpM
>>>
>>> HTH,
>>>
>>> Nan
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Puppet Users" group.
>>> To post to this group, send email to puppet...@googlegroups.com.
>>> To unsubscribe from this group, send email to puppet-users...@**
>>> googlegroups.com.
>>>
>>> For more options, visit this group at http://groups.google.com/**
>>> group/puppet-users?hl=en
>>> .
>>>
>>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/vTscH5wWHWEJ.
>
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>

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



Re: [Puppet Users] puppet facter variable substring

2012-10-25 Thread Paolo
Hi Steven 

Why the if statement? 



TIA 
Paolo 


On Wednesday, October 24, 2012 5:58:16 PM UTC+2, Steven wrote:
>
>  You can use regex for that
>  
> Here is an piece of my code for doing that. In my case [environment, 1 
> letter][collo, 2 letters]
>  
>   if $hostname =~ /^(.)(..)/ {
> $global_env = $1
> $location = $2
>   }
>
> Steven
>
>  
> --
> Date: Wed, 24 Oct 2012 07:14:50 -0700
> From: paolo@gmail.com 
> To: puppet...@googlegroups.com 
> Subject: [Puppet Users] puppet facter variable substring
>
> Hi 
>
> I have a serires of servers that their hostname (not FQDN) is built in the 
> same manner [header, 3 letters][collo, 4 letters][environment, 3 
> letters][number, 4 digits]. 
> There's no specific separator between each part of hostname. Is there way 
> I can extract the collo part of the hostname in puppet? 
>
>
>
> TIA 
> Paolo 
>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/puppet-users/-/M8d-zyzlHw8J.
> To post to this group, send email to puppet...@googlegroups.com
> .
> To unsubscribe from this group, send email to 
> puppet-users...@googlegroups.com .
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.
>  

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