Re: [Puppet Users] mcollective tcp port

2012-10-09 Thread R.I.Pienaar


- Original Message -
> From: "Andrei-Florian Staicu" 
> To: puppet-users@googlegroups.com
> Sent: Tuesday, October 9, 2012 7:28:25 AM
> Subject: [Puppet Users] mcollective tcp port
> 
> Hi all,
> 
> I'm trying to prepare a common config for the DMZ hosts, and also to
> account for future infrastructure upgrades.
> Right now, I'm using only the puppet agent, triggered via SSH.
> This mean an open port 8140, from the client to the puppetmaster (is
> it required also the other way around?).
> I would like in the future to move to mcollective.
> Do you know what tcp port i should allow? The direction should be
> from
> the puppetmaster to the client. Do I need it also the other way
> around?


Like puppet its from managed node -> puppet master, usually port 61613
though you can pick any

-- 
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] mcollective tcp port

2012-10-09 Thread Andrei-Florian Staicu
On Tue, Oct 9, 2012 at 10:21 AM, R.I.Pienaar  wrote:
>
>
> - Original Message -
>> From: "Andrei-Florian Staicu" 
>> To: puppet-users@googlegroups.com
>> Sent: Tuesday, October 9, 2012 7:28:25 AM
>> Subject: [Puppet Users] mcollective tcp port
>>
>> Hi all,
>>
>> I'm trying to prepare a common config for the DMZ hosts, and also to
>> account for future infrastructure upgrades.
>> Right now, I'm using only the puppet agent, triggered via SSH.
>> This mean an open port 8140, from the client to the puppetmaster (is
>> it required also the other way around?).
>> I would like in the future to move to mcollective.
>> Do you know what tcp port i should allow? The direction should be
>> from
>> the puppetmaster to the client. Do I need it also the other way
>> around?
>
>
> Like puppet its from managed node -> puppet master, usually port 61613
> though you can pick any

So there's no push involved? Only the client polls the servers?

-- 
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] Creation of modifiable files via puppet

2012-10-09 Thread David Schmitt

Use file's replace => false parameter.

See http://docs.puppetlabs.com/references/latest/type.html#file


Fun, D.

On 09.10.2012 07:19, pdurkin wrote:

I've been looking around but can't seem to find an answer to this.

I would like to create a file whose initial contents come from the
default in the puppet server but is subsequently modifiable and puppet
won't overwrite any changes.

The reason for this is that if I deploy a user account via puppet and
upload a default .bashrc/.profile, the user should be able to modify
these without having puppet change them back to the originals every time
it runs.

Thanks

Paul

--
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/-/MNccQWibusoJ.
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] mcollective tcp port

2012-10-09 Thread R.I.Pienaar


- Original Message -
> From: "Andrei-Florian Staicu" 
> To: puppet-users@googlegroups.com
> Sent: Tuesday, October 9, 2012 8:29:41 AM
> Subject: Re: [Puppet Users] mcollective tcp port
> 
> On Tue, Oct 9, 2012 at 10:21 AM, R.I.Pienaar  wrote:
> >
> >
> > - Original Message -
> >> From: "Andrei-Florian Staicu" 
> >> To: puppet-users@googlegroups.com
> >> Sent: Tuesday, October 9, 2012 7:28:25 AM
> >> Subject: [Puppet Users] mcollective tcp port
> >>
> >> Hi all,
> >>
> >> I'm trying to prepare a common config for the DMZ hosts, and also
> >> to
> >> account for future infrastructure upgrades.
> >> Right now, I'm using only the puppet agent, triggered via SSH.
> >> This mean an open port 8140, from the client to the puppetmaster
> >> (is
> >> it required also the other way around?).
> >> I would like in the future to move to mcollective.
> >> Do you know what tcp port i should allow? The direction should be
> >> from
> >> the puppetmaster to the client. Do I need it also the other way
> >> around?
> >
> >
> > Like puppet its from managed node -> puppet master, usually port
> > 61613
> > though you can pick any
> 
> So there's no push involved? Only the client polls the servers?

a persistant connection is made from managed node to the middleware
broker and comms over that TCP connection is bi-directional

-- 
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] mcollective tcp port

2012-10-09 Thread Andrei-Florian Staicu
On Tue, Oct 9, 2012 at 10:36 AM, R.I.Pienaar  wrote:
>
>
> - Original Message -
>> From: "Andrei-Florian Staicu" 
>> To: puppet-users@googlegroups.com
>> Sent: Tuesday, October 9, 2012 8:29:41 AM
>> Subject: Re: [Puppet Users] mcollective tcp port
>>
>> On Tue, Oct 9, 2012 at 10:21 AM, R.I.Pienaar  wrote:
>> >
>> >
>> > - Original Message -
>> >> From: "Andrei-Florian Staicu" 
>> >> To: puppet-users@googlegroups.com
>> >> Sent: Tuesday, October 9, 2012 7:28:25 AM
>> >> Subject: [Puppet Users] mcollective tcp port
>> >>
>> >> Hi all,
>> >>
>> >> I'm trying to prepare a common config for the DMZ hosts, and also
>> >> to
>> >> account for future infrastructure upgrades.
>> >> Right now, I'm using only the puppet agent, triggered via SSH.
>> >> This mean an open port 8140, from the client to the puppetmaster
>> >> (is
>> >> it required also the other way around?).
>> >> I would like in the future to move to mcollective.
>> >> Do you know what tcp port i should allow? The direction should be
>> >> from
>> >> the puppetmaster to the client. Do I need it also the other way
>> >> around?
>> >
>> >
>> > Like puppet its from managed node -> puppet master, usually port
>> > 61613
>> > though you can pick any
>>
>> So there's no push involved? Only the client polls the servers?
>
> a persistant connection is made from managed node to the middleware
> broker and comms over that TCP connection is bi-directional
>

Excellent. Thanks a lot for your explanation.

-- 
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] Possible to disable global definition outside of nodes?

2012-10-09 Thread Sandra Schlichting
Hi =)

I just made the following mistake, but puppet 2.7.19 didn't complain.

node test { 
  ... 
} 
package { [ ... ]: ensure => present } 

So I guess all the packages became global for all nodes?

Is it possible to disable this "global definition" option, or get puppet to 
warn about it?

Hugs,
Sandra

-- 
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/-/fOta6N6Dbx4J.
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] Invalid resource type anchor.

2012-10-09 Thread Fran Rodríguez
Yes, it does. This occurs when change apt module for the puppetlabs-apt. 
Maybe is a issue with environments, im trying to figure out what is 
happening, and like the log said the module stdlib which provide the anchor 
type, is not being recognize. 

On Monday, October 8, 2012 10:15:46 PM UTC+2, Jeff McCune wrote:
>
> That's a strange issue.  I wonder if it's caused by the class name 
> containing a hyphen? 
>
> Does this happen to be the puppetlabs-apt module? 
>
> -Jeff 
>

-- 
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/-/42ZExBWww2wJ.
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] Invalid resource type anchor.

2012-10-09 Thread Hugh Cole-Baker
On Tuesday, October 9, 2012 10:24:53 AM UTC+1, Fran Rodríguez wrote:

> Yes, it does. This occurs when change apt module for the puppetlabs-apt. 
> Maybe is a issue with environments, im trying to figure out what is 
> happening, and like the log said the module stdlib which provide the anchor 
> type, is not being recognize. 
>
>
I had the same problem, caused by the puppetlabs-stdlib Ruby libraries not 
being available to the puppet master when it was parsing and compiling the 
manifests. It's related to bug http://projects.puppetlabs.com/issues/13858 
as far as I can tell. The solution was to run puppet agent on the master 
itself, with pluginsync enabled, such that the required plugins from 
the puppetlabs-stdlib module get "synced" onto the master.

-- 
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/-/NnZGhz0U58YJ.
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] Creation of modifiable files via puppet

2012-10-09 Thread Mason Turner
That is the intent of "ensure => present". If the file isn't there, puppet will 
create it with the source/content parameter. If it is there (exists), puppet 
will leave it alone.

http://docs.puppetlabs.com/references/latest/type.html#file

— Mason Turner

On Oct 9, 2012, at 1:19 AM, pdurkin  wrote:

> I've been looking around but can't seem to find an answer to this.
> 
> I would like to create a file whose initial contents come from the default in 
> the puppet server but is subsequently modifiable and puppet won't overwrite 
> any changes.
> 
> The reason for this is that if I deploy a user account via puppet and upload 
> a default .bashrc/.profile, the user should be able to modify these without 
> having puppet change them back to the originals every time it runs.
> 
> Thanks
> 
> Paul
> -- 
> 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/-/MNccQWibusoJ.
> 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] Possible to disable global definition outside of nodes?

2012-10-09 Thread Henrik Lindberg

Afaik, there is no way to make puppet tell you about this.
Puppet is a powerful tool and you got what you asked for :-)

What you can do is to write Rspec tests for your catalogs and use that 
as a regression test.


Hope that helps.
- henrik

On 2012-09-10 10:45, Sandra Schlichting wrote:

Hi =)

I just made the following mistake, but puppet 2.7.19 didn't complain.

node test {
   ...
}
package { [ ... ]: ensure => present }

So I guess all the packages became global for all nodes?

Is it possible to disable this "global definition" option, or get puppet
to warn about it?

Hugs,
Sandra

--
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/-/fOta6N6Dbx4J.
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] Question about conditional exec notifications

2012-10-09 Thread Adrian Webb
Hello,

I've been trying to implement a puppet definition that uses vcsrepo and 
notifies the caller through an update_notify parameter when the repository 
contents change on disk.  I have however found this very hard to accomplish.

Basically I am trying to pull down a git repo and when the head of the repo 
changes on the disk of the agent, run a build command (such as make) into a 
release directory.  So the system automatically tracks a branch or responds 
to changes in tags and the system automatically builds off of that 
information.  In order to allow for multiple types of build processes I am 
trying to notify other resources through the exec notify property.

My problem is this:

The only way to trigger the notification in a conditional manner that I 
have found is to use the onlyif or unless properties on the exec resource.  
Notifications still happen on the exec command even if the command fails so 
I can not use an inline command to notify or not (that I know of).  But the 
onlyif property which I have been trying seems to execute before any of the 
actual commands so it always runs before the vcsrepo update, which voids 
the intended purpose.  I can not use functions with a conditional because 
they are only run on puppet master and also suffer from the same issue 
where they run before any commands, and I can not use a fact because I need 
a directory parameter and it is also runs before any of the commands.

So I need a way to conditionally trigger a notify during the course of a 
execution run right after the vcsrepo gets done pulling down any updates.  
Does anyone know how I might accomplish this task through puppet?  So far 
nothing I have tried works.  I would think that this goal would not be that 
isolated (building a repository after and only after repository updates).  
In my case I normally build into release directories so absolutely can not 
afford to rebuild on every puppet execution which runs every 5 minutes.

Thanks for any help you can provide!

Adrian

-- 
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/-/NNQsDH1nox8J.
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] Question about conditional exec notifications

2012-10-09 Thread Henrik Lindberg
Did you try using an update resource, and a build resource, where the 
second depends on the first?


i.e. something like

exec { 'repository_update':
  command => 'git pull',
}
exec { 'build':
  command => 'make',
  require => Exec['repository_update']
}

or, if you prefer:

exec { 'repository_update':
  command => 'git pull',
}
exec { 'build':
  command => 'make',
}

Exec['build'] -> Exec['repository_update']

- henrik

On 2012-09-10 13:12, Adrian Webb wrote:

Hello,

I've been trying to implement a puppet definition that uses vcsrepo and
notifies the caller through an update_notify parameter when the
repository contents change on disk.  I have however found this very hard
to accomplish.

Basically I am trying to pull down a git repo and when the head of the
repo changes on the disk of the agent, run a build command (such as
make) into a release directory.  So the system automatically tracks a
branch or responds to changes in tags and the system automatically
builds off of that information.  In order to allow for multiple types of
build processes I am trying to notify other resources through the exec
notify property.

My problem is this:

The only way to trigger the notification in a conditional manner that I
have found is to use the onlyif or unless properties on the exec
resource.  Notifications still happen on the exec command even if the
command fails so I can not use an inline command to notify or not (that
I know of).  But the onlyif property which I have been trying seems to
execute before any of the actual commands so it always runs before the
vcsrepo update, which voids the intended purpose.  I can not use
functions with a conditional because they are only run on puppet master
and also suffer from the same issue where they run before any commands,
and I can not use a fact because I need a directory parameter and it is
also runs before any of the commands.

So I need a way to conditionally trigger a notify during the course of a
execution run right after the vcsrepo gets done pulling down any
updates.  Does anyone know how I might accomplish this task through
puppet?  So far nothing I have tried works.  I would think that this
goal would not be that isolated (building a repository after and only
after repository updates).  In my case I normally build into release
directories so absolutely can not afford to rebuild on every puppet
execution which runs every 5 minutes.

Thanks for any help you can provide!

Adrian

--
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/-/NNQsDH1nox8J.
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] PuppetDB crashes upon startup

2012-10-09 Thread Ger Apeldoorn
Hi,

I've got a Puppet Enterprise 2.6 installation on RHEL6 and have followed 
this installer doc: http://docs.puppetlabs.com/puppetdb/1/install.html

When I try to start the daemon, I get the following in the errorlogs:

JVMDUMP010I System dump written to /tmp/core.20121009.144917.3691.0001.dmp
JVMDUMP030W Cannot write dump to file 
/root/javacore.20121009.144917.3691.0002.txt: Permission denied
JVMDUMP032I JVM requested Java dump using 
'/tmp/javacore.20121009.144917.3691.0002.txt' in response to an event
JVMDUMP012E Error in Java dump: /tmp/javacore.20121009.144917.3691.0002.txt
JVMDUMP032I JVM requested Snap dump using 
'/root/Snap.20121009.144917.3691.0003.trc' in response to an event
JVMDUMP030W Cannot write dump to file 
/root/Snap.20121009.144917.3691.0003.trc: Permission denied
JVMDUMP010I Snap dump written to /tmp/Snap.20121009.144917.3691.0003.trc
JVMDUMP013I Processed dump event "abort", detail "".

Appareantly, Java is crashing. Snippet from the dumpfile:

3CLTEXTCLASS(0x7F49B83D2C00)
3CLTEXTCLASS1INTERNAL  An exception occurred 
attempting to access in-flight data. Internal diagnostics:
NULL
2INTERNALJ9Generic_Signal_Number: 0004
2INTERNALSignal_Number: 000B
2INTERNALError_Value: 
2INTERNALSignal_Code: 0001
2INTERNALHandler1: 7F49BC18EE10
2INTERNALHandler2: 7F49BC6A0EF0
2INTERNALInaccessibleAddress: 7F4A27AFF44B
NULL
2INTERNALModule: 
/usr/lib/jvm/java-1.7.0-ibm-1.7.0.1.0.x86_64/jre/lib/amd64/default/libj9dmp26.so
2INTERNALModule_base_address: 7F49BC17B000
NULL

Any help would be much appreciated!

Thanks,
Ger.

-- 
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/-/2ePLTO7qfUEJ.
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: Creation of modifiable files via puppet

2012-10-09 Thread jcbollinger


On Tuesday, October 9, 2012 12:19:20 AM UTC-5, pdurkin wrote:
>
> I've been looking around but can't seem to find an answer to this.
>
> I would like to create a file whose initial contents come from the default 
> in the puppet server but is subsequently modifiable and puppet won't 
> overwrite any changes.
>
>
This is exactly what the File resource type's 'replace' parameter is for.

file { '/etc/foo.conf'':
  ensure => 'file',
  source => 'puppet:///mymodule/foo.conf',
  replace => false
}

That will install the file (as a copy from the specified source, in the 
above example) if it does not already exist, but it will not modify an 
existing file.


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/-/X2arwvJI_ZsJ.
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] Question about conditional exec notifications

2012-10-09 Thread Adrian Webb
Unfortunately what I need is a little more abstract because I have rolled 
my definition into a module that is used by other modules.  Below is my 
definition (that does not work as intended) right now

define git::repo (

  $repo_name= $name,
  $user = $git::params::user,
  $group= $git::params::group,
  $home = $git::params::home,
  $source   = $git::params::source,
  $revision = $git::params::revision,
  $base = $git::params::base,
  $post_update_commands = $git::params::post_update_commands,
  $post_update_template = $git::params::post_update_template,
  $update_notify= undef,

) {

  $repo_dir = $home ? {
''   => $repo_name,
default  => "${home}/${repo_name}",
  }

  $repo_git_dir = $base ? {
'true'   => $repo_dir,
default  => "${repo_dir}/.git"
  }

  $test_diff_cmd= "diff ${repo_git_dir}/_NEW_REVISION 
${repo_git_dir}/_LAST_REVISION"

  include git

  #--

  Exec {
path => [ '/bin', '/usr/bin', '/usr/local/bin' ],
cwd  => $repo_dir,
user => $user,
  }

  #-

  if $source and $revision {
$revision_real = $revision
  }
  else {
$revision_real = undef
  }

  vcsrepo { $repo_dir:
ensure   => $base ? {
  'true'  => 'base',
  default => $source ? {
''  => 'present',
default => 'latest',
  },
},
provider => 'git',
owner=> $user,
group=> $group,
force=> true,
source   => $source ? {
  ''  => undef,
  default => $source,
},
revision => $revision_real,
require  => Class['git'],
  }

  #---

  exec { "${repo_dir}-new-revision":
command => "git rev-parse HEAD > ${repo_git_dir}/_NEW_REVISION",
returns => [ 0, 128 ],
require => Class['git'],
subscribe   => Vcsrepo[$repo_dir],
  }

  exec { "${repo_dir}-update-notify":
command => 'test true',
onlyif  => $test_diff_cmd,
notify  => $update_notify,
require => Exec["${repo_dir}-new-revision"],
  }

  exec { "${repo_dir}-last-revision":
command   => "git rev-parse HEAD > ${repo_git_dir}/_LAST_REVISION",
returns   => [ 0, 128 ],
subscribe => Exec["${repo_dir}-update-notify"],
  }

  #-

  if $home and $base == 'false' {
exec { "${repo_dir}-receive-deny-current-branch":
  command => "git config receive.denyCurrentBranch 'ignore'",
  refreshonly => true,
  subscribe   => Vcsrepo[$repo_dir],
}
  }

  file { "${repo_dir}-post-update":
path  => "${repo_git_dir}/hooks/post-update",
owner => $user,
group => $group,
mode  => '0755',
content   => template($post_update_template),
subscribe => Vcsrepo[$repo_dir],
  }
}

As you can see I use the vcsrepo module to update my repo and then desire to 
send a notify up to the caller through the parameters.  So my real problem is 
how to trigger the conditional exec notify after the vcsrepo resource pulls in 
updates.  It is very important that this stay abstract because this is used in 
multiple modules and in each triggers different build operations.

Thanks,
Adrian



On Tuesday, October 9, 2012 1:12:53 PM UTC+1, Henrik Lindberg wrote:
>
> Did you try using an update resource, and a build resource, where the 
> second depends on the first? 
>
> i.e. something like 
>
> exec { 'repository_update': 
>command => 'git pull', 
> } 
> exec { 'build': 
>command => 'make', 
>require => Exec['repository_update'] 
> } 
>
> or, if you prefer: 
>
> exec { 'repository_update': 
>command => 'git pull', 
> } 
> exec { 'build': 
>command => 'make', 
> } 
>
> Exec['build'] -> Exec['repository_update'] 
>
> - henrik 
>
> On 2012-09-10 13:12, Adrian Webb wrote: 
> > Hello, 
> > 
> > I've been trying to implement a puppet definition that uses vcsrepo and 
> > notifies the caller through an update_notify parameter when the 
> > repository contents change on disk.  I have however found this very hard 
> > to accomplish. 
> > 
> > Basically I am trying to pull down a git repo and when the head of the 
> > repo changes on the disk of the agent, run a build command (such as 
> > make) into a release directory.  So the system automatically tracks a 
> > branch or responds to changes in tags and the system automatically 
> > builds off of that information.  In order to allow for multiple types of 
> > build processes I am trying to notify other resources through the exec 
> > notify property. 
> > 
> > My problem is this: 
> > 
> > The only way to trigger the notification in a conditional manner that I 
> > have found is to use the onlyif or unless properties on the exec 
> > resource.  Notifications still happen on the exec command even if the 
> > command fai

Re: [Puppet Users] Question about conditional exec notifications

2012-10-09 Thread Adrian Webb
Sorry, my last post got cut off:

So my real problem is how to trigger the conditional exec notify after the 
vcsrepo resource 
pulls in updates.  It is very important that this stay abstract because this is 
used in multiple 
modules and in each triggers different build operations.



On Tuesday, October 9, 2012 2:40:04 PM UTC+1, Adrian Webb wrote:
>
> Unfortunately what I need is a little more abstract because I have rolled 
> my definition into a module that is used by other modules.  Below is my 
> definition (that does not work as intended) right now
>
> define git::repo (
>
>   $repo_name= $name,
>   $user = $git::params::user,
>   $group= $git::params::group,
>   $home = $git::params::home,
>   $source   = $git::params::source,
>   $revision = $git::params::revision,
>   $base = $git::params::base,
>   $post_update_commands = $git::params::post_update_commands,
>   $post_update_template = $git::params::post_update_template,
>   $update_notify= undef,
>
> ) {
>
>   $repo_dir = $home ? {
> ''   => $repo_name,
> default  => "${home}/${repo_name}",
>   }
>
>   $repo_git_dir = $base ? {
> 'true'   => $repo_dir,
> default  => "${repo_dir}/.git"
>   }
>
>   $test_diff_cmd= "diff ${repo_git_dir}/_NEW_REVISION 
> ${repo_git_dir}/_LAST_REVISION"
>
>   include git
>
>   #--
>
>   Exec {
> path => [ '/bin', '/usr/bin', '/usr/local/bin' ],
> cwd  => $repo_dir,
> user => $user,
>   }
>
>   
> #-
>
>   if $source and $revision {
> $revision_real = $revision
>   }
>   else {
> $revision_real = undef
>   }
>
>   vcsrepo { $repo_dir:
> ensure   => $base ? {
>   'true'  => 'base',
>   default => $source ? {
> ''  => 'present',
> default => 'latest',
>   },
> },
> provider => 'git',
> owner=> $user,
> group=> $group,
> force=> true,
> source   => $source ? {
>   ''  => undef,
>   default => $source,
> },
> revision => $revision_real,
> require  => Class['git'],
>   }
>
>   #---
>
>   exec { "${repo_dir}-new-revision":
> command => "git rev-parse HEAD > ${repo_git_dir}/_NEW_REVISION",
> returns => [ 0, 128 ],
> require => Class['git'],
> subscribe   => Vcsrepo[$repo_dir],
>   }
>
>   exec { "${repo_dir}-update-notify":
> command => 'test true',
> onlyif  => $test_diff_cmd,
> notify  => $update_notify,
> require => Exec["${repo_dir}-new-revision"],
>   }
>
>   exec { "${repo_dir}-last-revision":
> command   => "git rev-parse HEAD > ${repo_git_dir}/_LAST_REVISION",
> returns   => [ 0, 128 ],
> subscribe => Exec["${repo_dir}-update-notify"],
>   }
>
>   
> #-
>
>   if $home and $base == 'false' {
> exec { "${repo_dir}-receive-deny-current-branch":
>   command => "git config receive.denyCurrentBranch 'ignore'",
>   refreshonly => true,
>   subscribe   => Vcsrepo[$repo_dir],
> }
>   }
>
>   file { "${repo_dir}-post-update":
> path  => "${repo_git_dir}/hooks/post-update",
> owner => $user,
> group => $group,
> mode  => '0755',
> content   => template($post_update_template),
> subscribe => Vcsrepo[$repo_dir],
>   }
> }
>
> As you can see I use the vcsrepo module to update my repo and then desire to 
> send a notify up to the caller through the parameters.  So my real problem is 
> how to trigger the conditional exec notify after the vcsrepo resource pulls 
> in updates.  It is very important that this stay abstract because this is 
> used in multiple modules and in each triggers different build operations.
>
> Thanks,
> Adrian
>
>
>
> On Tuesday, October 9, 2012 1:12:53 PM UTC+1, Henrik Lindberg wrote:
>>
>> Did you try using an update resource, and a build resource, where the 
>> second depends on the first? 
>>
>> i.e. something like 
>>
>> exec { 'repository_update': 
>>command => 'git pull', 
>> } 
>> exec { 'build': 
>>command => 'make', 
>>require => Exec['repository_update'] 
>> } 
>>
>> or, if you prefer: 
>>
>> exec { 'repository_update': 
>>command => 'git pull', 
>> } 
>> exec { 'build': 
>>command => 'make', 
>> } 
>>
>> Exec['build'] -> Exec['repository_update'] 
>>
>> - henrik 
>>
>> On 2012-09-10 13:12, Adrian Webb wrote: 
>> > Hello, 
>> > 
>> > I've been trying to implement a puppet definition that uses vcsrepo and 
>> > notifies the caller through an update_notify parameter when the 
>> > repository contents change on disk.  I have however found this very 
>> hard 
>> > to accomplish. 
>> > 
>> > Basically I am trying to pull down a git repo and when the head of the 
>> > repo changes on the disk of the agent

[Puppet Users] Re: PuppetDB crashes upon startup

2012-10-09 Thread Ger Apeldoorn
The issue was that there was java 1.7 installed, forcing it to a java 1.6 
JVM seems to fix this.

Thanks
Ger

Op dinsdag 9 oktober 2012 13:05:10 UTC schreef Ger Apeldoorn het volgende:
>
> Hi,
>
> I've got a Puppet Enterprise 2.6 installation on RHEL6 and have followed 
> this installer doc: http://docs.puppetlabs.com/puppetdb/1/install.html
>
> When I try to start the daemon, I get the following in the errorlogs:
>
> JVMDUMP010I System dump written to /tmp/core.20121009.144917.3691.0001.dmp
> JVMDUMP030W Cannot write dump to file 
> /root/javacore.20121009.144917.3691.0002.txt: Permission denied
> JVMDUMP032I JVM requested Java dump using 
> '/tmp/javacore.20121009.144917.3691.0002.txt' in response to an event
> JVMDUMP012E Error in Java dump: /tmp/javacore.20121009.144917.3691.0002.txt
> JVMDUMP032I JVM requested Snap dump using 
> '/root/Snap.20121009.144917.3691.0003.trc' in response to an event
> JVMDUMP030W Cannot write dump to file 
> /root/Snap.20121009.144917.3691.0003.trc: Permission denied
> JVMDUMP010I Snap dump written to /tmp/Snap.20121009.144917.3691.0003.trc
> JVMDUMP013I Processed dump event "abort", detail "".
>
> Appareantly, Java is crashing. Snippet from the dumpfile:
>
> 3CLTEXTCLASS(0x7F49B83D2C00)
> 3CLTEXTCLASS1INTERNAL  An exception occurred 
> attempting to access in-flight data. Internal diagnostics:
> NULL
> 2INTERNALJ9Generic_Signal_Number: 0004
> 2INTERNALSignal_Number: 000B
> 2INTERNALError_Value: 
> 2INTERNALSignal_Code: 0001
> 2INTERNALHandler1: 7F49BC18EE10
> 2INTERNALHandler2: 7F49BC6A0EF0
> 2INTERNALInaccessibleAddress: 7F4A27AFF44B
> NULL
> 2INTERNALModule: 
> /usr/lib/jvm/java-1.7.0-ibm-1.7.0.1.0.x86_64/jre/lib/amd64/default/libj9dmp26.so
> 2INTERNALModule_base_address: 7F49BC17B000
> NULL
>
> Any help would be much appreciated!
>
> Thanks,
> Ger.
>

-- 
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/-/WiXLY-5zpooJ.
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] Question about conditional exec notifications

2012-10-09 Thread Ramin K

On 10/9/2012 6:40 AM, Adrian Webb wrote:

Unfortunately what I need is a little more abstract because I have
rolled my definition into a module that is used by other modules.  Below
is my definition (that does not work as intended) right now

define git::repo (

$repo_name = $name,
$user = $git::params::user,
$group = $git::params::group,
$home = $git::params::home,
$source = $git::params::source,
$revision = $git::params::revision,
$base = $git::params::base,
$post_update_commands = $git::params::post_update_commands,
$post_update_template = $git::params::post_update_template,
$update_notify = undef,

) {

$repo_dir = $home ? {
'' => $repo_name,
default => "${home}/${repo_name}",
}

$repo_git_dir = $base ? {
'true' => $repo_dir,
default => "${repo_dir}/.git"
}

$test_diff_cmd = "diff ${repo_git_dir}/_NEW_REVISION
${repo_git_dir}/_LAST_REVISION"

include git

#--

Exec {
path => [ '/bin', '/usr/bin', '/usr/local/bin' ],
cwd => $repo_dir,
user => $user,
}

#-

if $source and $revision {
$revision_real = $revision
   }
else {
$revision_real = undef
   }

vcsrepo { $repo_dir:
ensure => $base ? {
'true' => 'base',
default => $source ? {
'' => 'present',
default => 'latest',
},
},
provider => 'git',
owner => $user,
group => $group,
force => true,
source => $source ? {
'' => undef,
default => $source,
},
revision => $revision_real,
require => Class['git'],
}

#---

exec { "${repo_dir}-new-revision":
command => "git rev-parse HEAD > ${repo_git_dir}/_NEW_REVISION",
returns => [ 0, 128 ],
require => Class['git'],
subscribe => Vcsrepo[$repo_dir],
}

exec { "${repo_dir}-update-notify":
command => 'test true',
onlyif => $test_diff_cmd,
notify => $update_notify,
require => Exec["${repo_dir}-new-revision"],
}

exec { "${repo_dir}-last-revision":
command => "git rev-parse HEAD > ${repo_git_dir}/_LAST_REVISION",
returns => [ 0, 128 ],
subscribe => Exec["${repo_dir}-update-notify"],
}

#-

if $home and $base == 'false' {
exec { "${repo_dir}-receive-deny-current-branch":
command => "git config receive.denyCurrentBranch 'ignore'",
refreshonly => true,
subscribe => Vcsrepo[$repo_dir],
}
   }

file { "${repo_dir}-post-update":
path => "${repo_git_dir}/hooks/post-update",
owner => $user,
group => $group,
mode => '0755',
content => template($post_update_template),
subscribe => Vcsrepo[$repo_dir],
}
}

As you can see I use the vcsrepo module to update my repo and then
desire to send a notify up to the caller through the parameters. So my
real problem is how to trigger the conditional exec notify after the
vcsrepo resource pulls in updates. It is very important that this stay
abstract because this is used in multiple modules and in each triggers
different build operations.

Thanks,
Adrian


The vcsrepo module should know when it updates code like a normal 
provider. Something like this should work for you.


  vcsrepo { '/home/someuser/mycode':
ensure   => $mycode::data::ensure,
revision => $mycode::data::version,
source   => 'g...@github.com:mycode/mycode.git',
notify   => Exec['api bundle install'],
  }

  exec { 'api bundle install':
command => 'cd ~/mycode ; bundle install\'',
logoutput   => on_failure,
notify  => Class['apache::service'],
refreshonly => true,
  }


Might get ugly with chains of refreshonly Exec statements.

Ramin

--
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] Question about conditional exec notifications

2012-10-09 Thread Adrian Webb
Are you sure this notify is only triggered when there is an actual change 
in the repo (working copy has changed) or is it when the vcsrepo resource 
is executed like most notify's?

On Tuesday, October 9, 2012 3:18:48 PM UTC+1, Ramin K wrote:
>
> On 10/9/2012 6:40 AM, Adrian Webb wrote: 
> > Unfortunately what I need is a little more abstract because I have 
> > rolled my definition into a module that is used by other modules.  Below 
> > is my definition (that does not work as intended) right now 
> > 
> > define git::repo ( 
> > 
> > $repo_name = $name, 
> > $user = $git::params::user, 
> > $group = $git::params::group, 
> > $home = $git::params::home, 
> > $source = $git::params::source, 
> > $revision = $git::params::revision, 
> > $base = $git::params::base, 
> > $post_update_commands = $git::params::post_update_commands, 
> > $post_update_template = $git::params::post_update_template, 
> > $update_notify = undef, 
> > 
> > ) { 
> > 
> > $repo_dir = $home ? { 
> > '' => $repo_name, 
> > default => "${home}/${repo_name}", 
> > } 
> > 
> > $repo_git_dir = $base ? { 
> > 'true' => $repo_dir, 
> > default => "${repo_dir}/.git" 
> > } 
> > 
> > $test_diff_cmd = "diff ${repo_git_dir}/_NEW_REVISION 
> > ${repo_git_dir}/_LAST_REVISION" 
> > 
> > include git 
> > 
> > #-- 
> > 
> > Exec { 
> > path => [ '/bin', '/usr/bin', '/usr/local/bin' ], 
> > cwd => $repo_dir, 
> > user => $user, 
> > } 
> > 
> > 
> #-
>  
>
> > 
> > if $source and $revision { 
> > $revision_real = $revision 
> >} 
> > else { 
> > $revision_real = undef 
> >} 
> > 
> > vcsrepo { $repo_dir: 
> > ensure => $base ? { 
> > 'true' => 'base', 
> > default => $source ? { 
> > '' => 'present', 
> > default => 'latest', 
> > }, 
> > }, 
> > provider => 'git', 
> > owner => $user, 
> > group => $group, 
> > force => true, 
> > source => $source ? { 
> > '' => undef, 
> > default => $source, 
> > }, 
> > revision => $revision_real, 
> > require => Class['git'], 
> > } 
> > 
> > #--- 
> > 
> > exec { "${repo_dir}-new-revision": 
> > command => "git rev-parse HEAD > ${repo_git_dir}/_NEW_REVISION", 
> > returns => [ 0, 128 ], 
> > require => Class['git'], 
> > subscribe => Vcsrepo[$repo_dir], 
> > } 
> > 
> > exec { "${repo_dir}-update-notify": 
> > command => 'test true', 
> > onlyif => $test_diff_cmd, 
> > notify => $update_notify, 
> > require => Exec["${repo_dir}-new-revision"], 
> > } 
> > 
> > exec { "${repo_dir}-last-revision": 
> > command => "git rev-parse HEAD > ${repo_git_dir}/_LAST_REVISION", 
> > returns => [ 0, 128 ], 
> > subscribe => Exec["${repo_dir}-update-notify"], 
> > } 
> > 
> > 
> #-
>  
>
> > 
> > if $home and $base == 'false' { 
> > exec { "${repo_dir}-receive-deny-current-branch": 
> > command => "git config receive.denyCurrentBranch 'ignore'", 
> > refreshonly => true, 
> > subscribe => Vcsrepo[$repo_dir], 
> > } 
> >} 
> > 
> > file { "${repo_dir}-post-update": 
> > path => "${repo_git_dir}/hooks/post-update", 
> > owner => $user, 
> > group => $group, 
> > mode => '0755', 
> > content => template($post_update_template), 
> > subscribe => Vcsrepo[$repo_dir], 
> > } 
> > } 
> > 
> > As you can see I use the vcsrepo module to update my repo and then 
> > desire to send a notify up to the caller through the parameters. So my 
> > real problem is how to trigger the conditional exec notify after the 
> > vcsrepo resource pulls in updates. It is very important that this stay 
> > abstract because this is used in multiple modules and in each triggers 
> > different build operations. 
> > 
> > Thanks, 
> > Adrian 
>
> The vcsrepo module should know when it updates code like a normal 
> provider. Something like this should work for you. 
>
>vcsrepo { '/home/someuser/mycode': 
>  ensure   => $mycode::data::ensure, 
>  revision => $mycode::data::version, 
>  source   => 'g...@github.com:mycode/mycode.git', 
>  notify   => Exec['api bundle install'], 
>} 
>
>exec { 'api bundle install': 
>  command => 'cd ~/mycode ; bundle install\'', 
>  logoutput   => on_failure, 
>  notify  => Class['apache::service'], 
>  refreshonly => true, 
>} 
>
>
> Might get ugly with chains of refreshonly Exec statements. 
>
> Ramin 
>

-- 
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/-/WSLyjZrZAkAJ.
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: activerecord and puppet-3.0.0

2012-10-09 Thread Luca Gioppo
Same problem for me:

here is the trace:
Error: Cached catalog for backup.cortile.cloudlabcsi.local failed: Could 
not autoload puppet/indirector/catalog/active_record: uninitialized 
constant ActiveRecord
/usr/lib/ruby/site_ruby/1.8/puppet/util/autoload.rb:75:in `load_file'
/usr/lib/ruby/site_ruby/1.8/puppet/util/autoload.rb:208:in `load'
/usr/lib/ruby/site_ruby/1.8/puppet/util/instance_loader.rb:68:in 
`loaded_instance'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/terminus.rb:108:in 
`terminus_class'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:313:in 
`make_terminus'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:126:in 
`terminus'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/store_configs.rb:6:in 
`initialize'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:316:in `new'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:316:in 
`make_terminus'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:126:in 
`terminus'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:47:in `cache'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:217:in 
`find_in_cache'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:186:in `find'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:108:in `do_find'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:71:in `send'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:71:in `process'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick/rest.rb:24:in 
`service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:33:in `listen'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `call'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:30:in `listen'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:29:in 
`initialize'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:29:in `new'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:29:in `listen'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:26:in 
`synchronize'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:26:in `listen'
/usr/lib/ruby/site_ruby/1.8/puppet/network/server.rb:92:in `listen'
/usr/lib/ruby/site_ruby/1.8/puppet/network/server.rb:104:in `start'
/usr/lib/ruby/site_ruby/1.8/puppet/daemon.rb:136:in `start'
/usr/lib/ruby/site_ruby/1.8/puppet/application/master.rb:199:in `main'
/usr/lib/ruby/site_ruby/1.8/puppet/application/master.rb:148:in 
`run_command'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:438:in `plugin_hook'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:500:in `exit_on_fail'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:76:in `execute'
/usr/bin/puppet:10

and 
gem list

*** LOCAL GEMS ***

json (1.5.1)
rake (0.8.7)
stomp (1.2.2)



Il giorno mercoledì 3 ottobre 2012 11:26:42 UTC+2, Jonathan Gazeley ha 
scritto:
>
> Yesterday my puppetmaster and nodes got upgraded to puppet-3.0.0. 
>
> Since then, all puppet runs have been failing with this error: 
>
> Error: Could not retrieve catalog from remote server: Error 400 on 
> SERVER: Could not autoload puppet/indirector/node/active_record: 
> uninitialized constant ActiveRecord 
>
>
> My colleague and I have put a few hours into trying to work out what's 
> wrong. rubygem-activerecord-2.1.1-2.el6.noarch is installed from the 
> puppetlabs RPM repo. We've reinstalled all components but made no 
> progress. 
>
> I found this thread which seems to describe the same behaviour, but 
> there are no replies: 
>
> https://groups.google.com/forum/?fromgroups=#!topic/puppet-dev/D85TsZ70LKQ 
>
> Anyone got any ideas? 
>
> Thanks, 
> Jonathan 
>

-- 
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/-/ZaGpkrLIlRAJ.
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] Question about conditional exec notifications

2012-10-09 Thread Ramin K

On 10/9/2012 7:25 AM, Adrian Webb wrote:

Are you sure this notify is only triggered when there is an actual
change in the repo (working copy has changed) or is it when the vcsrepo
resource is executed like most notify's?


	I don't believe your logic on Puppet notifies is correct. Assuming the 
provider is correctly written a notify should only be generated on a 
change like in the case of File, Service, Package, etc.


In any case, test it first in a few scenarios and make sure. FWIW the 
vcsrepo::git provider is low to middling quality and you're likely to 
find cases that don't work as expected regardless.


Ramin

--
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] Question about conditional exec notifications

2012-10-09 Thread Adrian Webb
Will do.  Thanks!

Do you by any chance know how notifications are generated by providers?  In 
essence, what tells Puppet that there needs to be a notify?  I was looking 
through the vcsrepo git provider code but did not see anything that looked 
like it would tell but I am newer to the low level details of providers.  
If you know where I would start I would be happy to troubleshoot issues 
with the vcsrepo git provider as they come up.

Thanks,
Adrian

On Tuesday, October 9, 2012 3:39:48 PM UTC+1, Ramin K wrote:
>
> On 10/9/2012 7:25 AM, Adrian Webb wrote: 
> > Are you sure this notify is only triggered when there is an actual 
> > change in the repo (working copy has changed) or is it when the vcsrepo 
> > resource is executed like most notify's? 
>
> I don't believe your logic on Puppet notifies is correct. Assuming 
> the 
> provider is correctly written a notify should only be generated on a 
> change like in the case of File, Service, Package, etc. 
>
> In any case, test it first in a few scenarios and make sure. FWIW the 
> vcsrepo::git provider is low to middling quality and you're likely to 
> find cases that don't work as expected regardless. 
>
> Ramin 
>

-- 
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/-/5VZKD4bR5bAJ.
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: Question about conditional exec notifications

2012-10-09 Thread jcbollinger


On Tuesday, October 9, 2012 6:12:30 AM UTC-5, Adrian Webb wrote:
>
> Hello,
>
> I've been trying to implement a puppet definition that uses vcsrepo and 
> notifies the caller through an update_notify parameter when the repository 
> contents change on disk.  I have however found this very hard to accomplish.
>
> Basically I am trying to pull down a git repo and when the head of the 
> repo changes on the disk of the agent, run a build command (such as make) 
> into a release directory.  So the system automatically tracks a branch or 
> responds to changes in tags and the system automatically builds off of that 
> information.  In order to allow for multiple types of build processes I am 
> trying to notify other resources through the exec notify property.
>
> My problem is this:
>
> The only way to trigger the notification in a conditional manner that I 
> have found is to use the onlyif or unless properties on the exec resource.  
> Notifications still happen on the exec command even if the command fails so 
> I can not use an inline command to notify or not (that I know of).  But the 
> onlyif property which I have been trying seems to execute before any of the 
> actual commands so it always runs before the vcsrepo update, which voids 
> the intended purpose.  I can not use functions with a conditional because 
> they are only run on puppet master and also suffer from the same issue 
> where they run before any commands, and I can not use a fact because I need 
> a directory parameter and it is also runs before any of the commands.
>
> So I need a way to conditionally trigger a notify during the course of a 
> execution run right after the vcsrepo gets done pulling down any updates.  
> Does anyone know how I might accomplish this task through puppet?  So far 
> nothing I have tried works.  I would think that this goal would not be that 
> isolated (building a repository after and only after repository updates).  
> In my case I normally build into release directories so absolutely can not 
> afford to rebuild on every puppet execution which runs every 5 minutes.
>
>
In fact, your goal is not particularly well aligned with Puppet.   That 
doesn't mean you can't accomplish it via Puppet, but it's not surprising 
that you're having trouble getting there.  Puppet is focused on managing 
state, and the actual tasks performed for that purpose are intentionally 
de-emphasized, but your objective is characterized principally by 
performing specific tasks, as opposed to by the state achieved via doing so.

With that said, finding a suitable way forward probably depends on 
understanding the model.  The relevant parts work like this:

   - A resource employing 'notify' sends an event to the designated other 
   resources each time it is non-trivially synchronized, meaning that Puppet 
   changes a managed property from out of sync to in sync
   - Exec resources have no persistent state to examine.  Whether they are 
   initially considered in sync is judged by their 'onlyif', 'unless', and 
   'creates' properties.  Execs for which none of those is set are considered 
   out of sync on every Puppet run.
   - How out of sync Exec resources are synchronized depends on the values 
   of their 'refreshonly' parameters.  If an Exec's 'refreshonly' is false 
   (the default) then it is synchronized by running its 'command'; otherwise, 
   it is synchronized by doing nothing, but refreshed (if it receives an 
   event) by running the 'command'.
   - Resources that are initially in sync automatically succeed.  Resources 
   that need to be synchronized succeed if and only if they can are 
   successfully synchronized.  For an Exec to succeed, that means the 
   'command' exits with the status specified by the 'status' property, or with 
   status 0 if an explicit status is not specified.

You have at least two relevant resources in your system: one managing the 
local copy of your VCS repo, and one managing the build status of the code 
therein.  To achieve your goal, the former must send an event to the latter 
if and only if it updates anything in the local copy, and the latter must 
do nothing unless it receives an event.

Much depends, therefore, on the specific resource types you are using, 
especially the one for the local copy of your repo.  You must use ones that 
support the needed signaling behavior.  You may be able to create one in 
Exec form if you don't have a suitable one available otherwise.  (Puppet 
does not have such a resource type built in, but there are add-in modules 
that might provide types that do what 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/-/sTzmCQOd6BMJ.
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

[Puppet Users] Re: Replacing a file if a checksum matches

2012-10-09 Thread Axel Bock
Hi Klaus,

why not simply manage the file using puppet (file { "/to/my/file" : ensure 
=> present, content => "..." }) ? Puppet actually makes sure the file's 
contents are always constant.


HTH, 
Axel.



Am Dienstag, 9. Oktober 2012 14:08:52 UTC+2 schrieb Klaus Ethgen:
>
> Hello, 
>
> is it possible to replace a file on the system if a md5/sha1 sum 
> matches? For fixing a bug I want to replace a buggy file if it is the 
> buggy version checked by checksum. 
>
> Maybe its trivial, but I do not see a solution. 
>
> -- Klaus Ethgen 
> -- 
> Klaus Ethgen  http://www.ethgen.ch/ 
> pub  4096R/4E20AF1C 2011-05-16   Klaus Ethgen  
> Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C 
>
>

-- 
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/-/1XCELGchomcJ.
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] Invalid resource type anchor.

2012-10-09 Thread Fran Rodríguez
Thanks Hugh, you are right!! Now it works.

On Tuesday, October 9, 2012 12:20:33 PM UTC+2, Hugh Cole-Baker wrote:
>
> On Tuesday, October 9, 2012 10:24:53 AM UTC+1, Fran Rodríguez wrote:
>
>> Yes, it does. This occurs when change apt module for the puppetlabs-apt. 
>> Maybe is a issue with environments, im trying to figure out what is 
>> happening, and like the log said the module stdlib which provide the anchor 
>> type, is not being recognize. 
>>
>>
> I had the same problem, caused by the puppetlabs-stdlib Ruby libraries not 
> being available to the puppet master when it was parsing and compiling the 
> manifests. It's related to bug http://projects.puppetlabs.com/issues/13858as 
> far as I can tell. The solution was to run puppet agent on the master 
> itself, with pluginsync enabled, such that the required plugins from 
> the puppetlabs-stdlib module get "synced" onto the master.
>

-- 
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/-/S8PlYcE24TAJ.
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: Question about conditional exec notifications

2012-10-09 Thread Adrian Webb
That is definitely helpful information.  Thanks!

So about the repo notifications:

Could I assume that the true or false state of the def below in the 
vcsrepo.rb resource type controls whether the notification is fired or not 
for the related providers?  Forgive me I'm rather new to the lower level 
internals of resources and providers.

def insync?(is)
  @should ||= []

  case should
when :present
  return true unless [:absent, :purged, :held].include?(is)
when :latest
  if is == :latest
return true
  else
return false
  end
when :bare
return is == :bare
  end
end

About the other resource type:

I can definitely see what your saying but it seems like if the 
notifications on the repo update worked then all the other build state 
resources should just work if notified provided they manage their state 
effectively (which so far they do)?  Admittedly, I have been using execs 
for things like my make, make install, etc...  It just seems like the repo 
notification is the major obstacle even with a custom resource to manage 
the state of the build.

Adrian


On Tuesday, October 9, 2012 3:47:29 PM UTC+1, jcbollinger wrote:
>
>
>
> On Tuesday, October 9, 2012 6:12:30 AM UTC-5, Adrian Webb wrote:
>>
>> Hello,
>>
>> I've been trying to implement a puppet definition that uses vcsrepo and 
>> notifies the caller through an update_notify parameter when the repository 
>> contents change on disk.  I have however found this very hard to accomplish.
>>
>> Basically I am trying to pull down a git repo and when the head of the 
>> repo changes on the disk of the agent, run a build command (such as make) 
>> into a release directory.  So the system automatically tracks a branch or 
>> responds to changes in tags and the system automatically builds off of that 
>> information.  In order to allow for multiple types of build processes I am 
>> trying to notify other resources through the exec notify property.
>>
>> My problem is this:
>>
>> The only way to trigger the notification in a conditional manner that I 
>> have found is to use the onlyif or unless properties on the exec resource.  
>> Notifications still happen on the exec command even if the command fails so 
>> I can not use an inline command to notify or not (that I know of).  But the 
>> onlyif property which I have been trying seems to execute before any of the 
>> actual commands so it always runs before the vcsrepo update, which voids 
>> the intended purpose.  I can not use functions with a conditional because 
>> they are only run on puppet master and also suffer from the same issue 
>> where they run before any commands, and I can not use a fact because I need 
>> a directory parameter and it is also runs before any of the commands.
>>
>> So I need a way to conditionally trigger a notify during the course of a 
>> execution run right after the vcsrepo gets done pulling down any updates.  
>> Does anyone know how I might accomplish this task through puppet?  So far 
>> nothing I have tried works.  I would think that this goal would not be that 
>> isolated (building a repository after and only after repository updates).  
>> In my case I normally build into release directories so absolutely can not 
>> afford to rebuild on every puppet execution which runs every 5 minutes.
>>
>>
> In fact, your goal is not particularly well aligned with Puppet.   That 
> doesn't mean you can't accomplish it via Puppet, but it's not surprising 
> that you're having trouble getting there.  Puppet is focused on managing 
> state, and the actual tasks performed for that purpose are intentionally 
> de-emphasized, but your objective is characterized principally by 
> performing specific tasks, as opposed to by the state achieved via doing so.
>
> With that said, finding a suitable way forward probably depends on 
> understanding the model.  The relevant parts work like this:
>
>- A resource employing 'notify' sends an event to the designated other 
>resources each time it is non-trivially synchronized, meaning that Puppet 
>changes a managed property from out of sync to in sync
>- Exec resources have no persistent state to examine.  Whether they 
>are initially considered in sync is judged by their 'onlyif', 'unless', 
> and 
>'creates' properties.  Execs for which none of those is set are considered 
>out of sync on every Puppet run.
>- How out of sync Exec resources are synchronized depends on the 
>values of their 'refreshonly' parameters.  If an Exec's 'refreshonly' is 
>false (the default) then it is synchronized by running its 'command'; 
>otherwise, it is synchronized by doing nothing, but refreshed (if it 
>receives an event) by running the 'command'.
>- Resources that are initially in sync automatically succeed.  
>Resources that need to be synchronized succeed if and only if they can are 
>successfully synchronized.  For 

[Puppet Users] Seeing an error that is totally confusing the heck out of me

2012-10-09 Thread Peter Berghold
Got the following:

err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Could not autoload package: Could not autoload
/usr/local/lib/site_ruby/1.8/puppet/provider/package/windows.rb: no such
file to load -- windows/error at
/etc/puppet/modules/php/manifests/init.pp:28 on node

This after I reverted back to puppet v2.7.11 on my master.  Not running
windows anywhere... why am I seeing that?


-- 

Peter L. Berghold   salty.cowd...@gmail.com

http://blog.berghold.net

-- 
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] RHEL 5: Stuck on Puppet 2.7

2012-10-09 Thread Craig White
If you install ruby from one source, you can't use rpm's from another source 
and expect them to always work. Chances are that the libraries use to build 
ruby are not the same libraries to build passenger.

If you want to ensure a working passenger when using a non-official CentOS 
ruby, then just use gem to install passenger (ie… 'gem install passenger') and 
once passenger is installed, you can use passenger's installer scripts for 
apache or nginx ('passenger-install-apache-module')

Craig

On Oct 8, 2012, at 2:44 PM, Dan White wrote:

> I think you miss the point.
> I do not need to hand-build Ruby -- it is available from the puppetlabs-deps 
> repo
> 
> It is a chicken-egg dilemma with Ruby and Passenger.
> 
> Passenger depends on the installed version of Ruby.
> Trying to update Ruby causes a dependency error from Passenger.
> 
> I tried re-building Passenger from SRPM, but ran into problems.
> 
> It would be nice if the maintainer of the Passenger RPM's would surface and 
> help out, but ...?
> 
> If I force Ruby to update to 1.8.7.x, will yum continue to complain about a 
> dependency problem with Passenger or will it re-examine the system and "see" 
> the currently installed version ?
> 
> On Oct 8, 2012, at 3:13 PM, Jo Rhett wrote:
> 
 Actually, it's not specified in the source RPM. And just recompiling the 
 source RPM solves the problem. I ran into the same thing, just grabbed the 
>> 
>> On Oct 6, 2012, at 3:39 PM, Dan White wrote:
>>> Actually, it is.
>>> 
>>> https://github.com/erikogan/passenger/blob/master/rpm/passenger.spec
>>> 
>>> ruby_version_patch -- lines 55-67, line 86, and line 238
>>> 
>>> It looks for the version that is already installed.
>> 
>> Saying "use the current version" generally means "not specified" ;-)  
>> Especially when I was responding to your query about what to fix.
>> 
>>> So how do I update ruby ?
>> 
>> https://groups.google.com/d/msg/puppet-users/CQTHj9nIYCw/b2Cr7-BxAwkJ
>> 
>> I am trying to be helpful, but all of this is very google-able.
> 
> 
> -- 
> 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.

-- 
Craig White ~ craig.wh...@ttiltd.com
1.800.869.6908 ~~ www.ttiassessments.com 

Register Now!
TTI Winners' Conference 2013
January 20th - 22nd
The Earlier You Register the More FREE Product You Receive
Click here for more information!


-- 
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] Wierd errors RESOLVED

2012-10-09 Thread Peter Berghold
Found the issue with respect to the error I posted earlier.  Seems I had to
backdate facter as well as puppet to make the issue disappear.


-- 

Peter L. Berghold   salty.cowd...@gmail.com

http://blog.berghold.net

-- 
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] Seeing an error that is totally confusing the heck out of me

2012-10-09 Thread Michael Stahnke
On Tue, Oct 9, 2012 at 8:22 AM, Peter Berghold  wrote:
> Got the following:
>
> err: Could not retrieve catalog from remote server: Error 400 on SERVER:
> Could not autoload package: Could not autoload
> /usr/local/lib/site_ruby/1.8/puppet/provider/package/windows.rb: no such
> file to load -- windows/error at
> /etc/puppet/modules/php/manifests/init.pp:28 on node
>
> This after I reverted back to puppet v2.7.11 on my master.  Not running
> windows anywhere... why am I seeing that?
>
The contents of that php/manifests/init.pp file might be helpful here.

>
> --
>
> Peter L. Berghold   salty.cowd...@gmail.com
>
> http://blog.berghold.net
>
>
> --
> 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] Re: activerecord and puppet-3.0.0

2012-10-09 Thread Josh Cooper
Jonathan and Luca,

How did you install puppet (from source, gem, apt-get, ...)? In the
cases that fail, is it always that you installed 2.7.x and upgraded
from there? If so, how did you update?

We are tracking this issue at http://projects.puppetlabs.com/issues/16770

Josh

On Tue, Oct 9, 2012 at 7:30 AM, Luca Gioppo  wrote:
> Same problem for me:
>
> here is the trace:
> Error: Cached catalog for backup.cortile.cloudlabcsi.local failed: Could not
> autoload puppet/indirector/catalog/active_record: uninitialized constant
> ActiveRecord
> /usr/lib/ruby/site_ruby/1.8/puppet/util/autoload.rb:75:in `load_file'
> /usr/lib/ruby/site_ruby/1.8/puppet/util/autoload.rb:208:in `load'
> /usr/lib/ruby/site_ruby/1.8/puppet/util/instance_loader.rb:68:in
> `loaded_instance'
> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/terminus.rb:108:in
> `terminus_class'
> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:313:in
> `make_terminus'
> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:126:in
> `terminus'
> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/store_configs.rb:6:in
> `initialize'
> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:316:in `new'
> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:316:in
> `make_terminus'
> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:126:in
> `terminus'
> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:47:in `cache'
> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:217:in
> `find_in_cache'
> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:186:in `find'
> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:108:in `do_find'
> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:71:in `send'
> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:71:in `process'
> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick/rest.rb:24:in
> `service'
> /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
> /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:33:in `listen'
> /usr/lib/ruby/1.8/webrick/server.rb:173:in `call'
> /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
> /usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
> /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
> /usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
> /usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
> /usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
> /usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
> /usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:30:in `listen'
> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:29:in
> `initialize'
> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:29:in `new'
> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:29:in `listen'
> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:26:in
> `synchronize'
> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:26:in `listen'
> /usr/lib/ruby/site_ruby/1.8/puppet/network/server.rb:92:in `listen'
> /usr/lib/ruby/site_ruby/1.8/puppet/network/server.rb:104:in `start'
> /usr/lib/ruby/site_ruby/1.8/puppet/daemon.rb:136:in `start'
> /usr/lib/ruby/site_ruby/1.8/puppet/application/master.rb:199:in `main'
> /usr/lib/ruby/site_ruby/1.8/puppet/application/master.rb:148:in
> `run_command'
> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run'
> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:438:in `plugin_hook'
> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run'
> /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:500:in `exit_on_fail'
> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run'
> /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:76:in `execute'
> /usr/bin/puppet:10
>
> and
> gem list
>
> *** LOCAL GEMS ***
>
> json (1.5.1)
> rake (0.8.7)
> stomp (1.2.2)
>
>
>
> Il giorno mercoledì 3 ottobre 2012 11:26:42 UTC+2, Jonathan Gazeley ha
> scritto:
>>
>> Yesterday my puppetmaster and nodes got upgraded to puppet-3.0.0.
>>
>> Since then, all puppet runs have been failing with this error:
>>
>> Error: Could not retrieve catalog from remote server: Error 400 on
>> SERVER: Could not autoload puppet/indirector/node/active_record:
>> uninitialized constant ActiveRecord
>>
>>
>> My colleague and I have put a few hours into trying to work out what's
>> wrong. rubygem-activerecord-2.1.1-2.el6.noarch is installed from the
>> puppetlabs RPM repo. We've reinstalled all components but made no
>> progress.
>>
>> I found this thread which seems to describe the same behaviour, but
>> there are no replies:
>>
>> https://groups.google.com/forum/?fromgroups=#!topic/puppet-dev/D85TsZ70LKQ
>>
>> Anyone got any ideas?
>>
>> Thanks,
>> Jonathan
>
> --
> 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/puppe

Re: [Puppet Users] domain resolution in facter

2012-10-09 Thread Michael Stahnke
On Tue, Oct 9, 2012 at 5:05 AM, Klaus Ethgen  wrote:
> Hello,
>
> The domain.rb tries to get the domain by calling hostname without any
> option. This will mostly leed in only the name without any domain part.
> The hostname tool only give the fqdn if called with -f (or --fqdn or
> --long).
>
> Additional the output of domainname will only be used if there is one
> point inside the domain. That will fail for toplevel domains such as if
> the fqdn is example.com.
>
> I think that is a bug in facter but I do not know how to open a bug
> report on the website, there is only a way to display open issues.

You can open one here: http://projects.puppetlabs.com/projects/facter/issues

Note that this file has been changed quite a few times.  Is it
possible you're on an older version of facter?


>
> -- Klaus Ethgen
> --
> Klaus Ethgen  http://www.ethgen.ch/
> pub  4096R/4E20AF1C 2011-05-16   Klaus Ethgen 
> Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C
>
> --
> 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] Seeing an error that is totally confusing the heck out of me

2012-10-09 Thread Peter Berghold
On Tue, Oct 9, 2012 at 11:52 AM, Michael Stahnke wrote:

>
> The contents of that php/manifests/init.pp file might be helpful here.
>
> It actually turned out to be totally unrelated to the PHP module.   When I
backdated to 2.7.11 I needed to do two things as it turns out.

1. Backdate facter
2. clean out the provider subdirectory under
/usr/local/lib/site_ruby/1.8/provider and then reinstall puppet.

I might, of course, find other things that I need to clean out later, but
I've gotten things to work again.

-- 

Peter L. Berghold   salty.cowd...@gmail.com

http://blog.berghold.net

-- 
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] RHEL 5: Stuck on Puppet 2.7

2012-10-09 Thread Jakov Sosic

On 10/09/2012 05:26 PM, Craig White wrote:

If you install ruby from one source, you can't use rpm's from another source 
and expect them to always work. Chances are that the libraries use to build 
ruby are not the same libraries to build passenger.

If you want to ensure a working passenger when using a non-official CentOS 
ruby, then just use gem to install passenger (ie… 'gem install passenger') and 
once passenger is installed, you can use passenger's installer scripts for 
apache or nginx ('passenger-install-apache-module')


It is maybe the easiest way, but I would strongly suggest against it. It 
is unwise to mix up two package managers like that, it's better to built 
your own packages.



--
Jakov Sosic
www.srce.unizg.hr

--
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 master and Servants inside DMZ

2012-10-09 Thread Peter Spatz
Hey,

my puppet works great now. Plans are going in know.

My FW admin said, he dont wan´t s the servants polling from inside DMZ to 
the Master.
What´s the strategy then? Use kick, is this one connection doing all, or 
just wake up agent and he creates own new connection?

Regards

Peter 

-- 
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/-/hInSo6kbASMJ.
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] How to use prerun_command in puppet.conf ?

2012-10-09 Thread Sandra Schlichting
Hi,

I am using puppet 2.7.19 and if I use puppet.conf as

[main]
logdir = /var/log/puppet
rundir = /var/run/puppet
ssldir = $vardir/ssl
[agent]
classfile = $vardir/classes.txt
localconfig = $vardir/localconfig
prerun_command = /bin/false

or add prerun to [main] and do

puppet agent --listen --test --noop

then it doesn't fail, as I would have expected.

I would like to execute a script on the puppetmaster everytime a node tries 
to connect.

Am I doing something wrong?

Hugs,
Sandra





-- 
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/-/5zkorActIrUJ.
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] 3.0 and Passenger

2012-10-09 Thread Worker Bee
Can anyone direct me to documentation for configuring 3.0 to use
apache/passenger?  I cannot seem to fin this for puppet open source.

Thanks!

-- 
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: razor hang

2012-10-09 Thread Daniel Pittman
On Monday, October 8, 2012 9:30:37 AM UTC-7, Markus Falb wrote:

>
> I was playing with razor today. But I am not going far. 
>
> ipxe is downloading the microkernel but stays at 98% 
> On the server side I see 
>
> /opt/razor/Razor/bin/razor -w boot default 
> '{"hw_id":"00:50:56:2e:c4:50___","dhcp_mac":"01-00-50-56-2e-c4-50"}' 
> /opt/razor/Razor/bin/razor -w image path  mk kernel 
> {"http_err_code":200,"errcode":0,"response":"/opt/razor/Razor/image/mk/687EqtppQJQPbgeirdhZy4/boot/vmlinuz","command":null,"result":"Ok","resource":"ProjectRazor::Slice::Image"}
>  
>
>
> This suggests that the download of the microkernel finished 
> successfully. If so, why doesnt the microkernel do something? Or did it 
> and I only don't know how to tell? 
>

The iPXE progress meter is a bit special, in the classic "run to 99 
percent, sit there forever" sense, but you are not wrong: this is not doing 
the right thing.

The client should download the kernel, then download an initrd, and then 
boot a full Linux environment and run in it.  You should see the usual 
(verbose) Linux boot sequence progress through.
 

> Maybe I am missing something. I installed the server side (32bit) the 
> non puppet way, I added a microkernel, I configured dhcp and tftp. 
>
> The only razor thing I did was an razor image add -t mk -p ... 
> Not sure what to do next. 
>

Sounds like you need to figure out what is going on at that point: is data 
still being sent to the client?  tcpdump is probably the tool I would reach 
for, to verify that, but http://ipxe.org/howto/pcap documents it well.

You might also try a debug build of iPXE to see more of what is happening 
in their HTTP client; see http://ipxe.org/download#debug_builds for 
details, but that does require building your own iPXE image.

-- 
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/-/NeV4cPwik20J.
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] upgrade to 3.0, ruby and rhel 5

2012-10-09 Thread Andrei-Florian Staicu
Hi all,

I wanted to upgrade today the clients to 3.0 but, for RHEL 5, ruby
1.8.7 is not in the official repos. If we upgrade from the official
(1.8.5) package to the puppetlabs provided one, there is a good chance
that we will lose support for several applications that we are
running.
Is there a way around this? (except upgrading to PE, which will come
next year :D )

Thanks.

-- 
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] upgrade to 3.0, ruby and rhel 5

2012-10-09 Thread Matthaus Owens
ruby 1.8.7 is in the dependencies repo for el5. That repo is enabled
by default if you install the puppetlabs-release package
(http://yum.puppetlabs.com/el/5/products/x86_64/puppetlabs-release-5-6.noarch.rpm).

http://yum.puppetlabs.com/el/5/dependencies/{i386,x86_64,SRPMS}/

Once you add the dependencies repo, the new ruby will be available.

On Tue, Oct 9, 2012 at 9:51 AM, Andrei-Florian Staicu
 wrote:
> Hi all,
>
> I wanted to upgrade today the clients to 3.0 but, for RHEL 5, ruby
> 1.8.7 is not in the official repos. If we upgrade from the official
> (1.8.5) package to the puppetlabs provided one, there is a good chance
> that we will lose support for several applications that we are
> running.
> Is there a way around this? (except upgrading to PE, which will come
> next year :D )
>
> Thanks.
>
> --
> 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.
>



-- 
Matthaus Owens
Release Manager, 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] Re: activerecord and puppet-3.0.0

2012-10-09 Thread Jonathan Gazeley
My version of puppet 2.7 was installed on CentOS 6 from the puppetlabs 
RPM repo with "yum install puppet". When puppet 3 was released, I did a 
"yum update" to get the latest. The issue does not occur with a blank 
CentOS box starting out with puppet 3.


Want me to add this information to the tracked issue? Don't want to add 
unwanted noise to the issue unnecessarily :)


Cheers,
Jonathan


On 09/10/12 16:53, Josh Cooper wrote:

Jonathan and Luca,

How did you install puppet (from source, gem, apt-get, ...)? In the
cases that fail, is it always that you installed 2.7.x and upgraded
from there? If so, how did you update?

We are tracking this issue at http://projects.puppetlabs.com/issues/16770

Josh

On Tue, Oct 9, 2012 at 7:30 AM, Luca Gioppo  wrote:

Same problem for me:

here is the trace:
Error: Cached catalog for backup.cortile.cloudlabcsi.local failed: Could not
autoload puppet/indirector/catalog/active_record: uninitialized constant
ActiveRecord
/usr/lib/ruby/site_ruby/1.8/puppet/util/autoload.rb:75:in `load_file'
/usr/lib/ruby/site_ruby/1.8/puppet/util/autoload.rb:208:in `load'
/usr/lib/ruby/site_ruby/1.8/puppet/util/instance_loader.rb:68:in
`loaded_instance'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/terminus.rb:108:in
`terminus_class'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:313:in
`make_terminus'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:126:in
`terminus'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/store_configs.rb:6:in
`initialize'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:316:in `new'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:316:in
`make_terminus'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:126:in
`terminus'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:47:in `cache'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:217:in
`find_in_cache'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:186:in `find'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:108:in `do_find'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:71:in `send'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:71:in `process'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick/rest.rb:24:in
`service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:33:in `listen'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `call'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:30:in `listen'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:29:in
`initialize'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:29:in `new'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:29:in `listen'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:26:in
`synchronize'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:26:in `listen'
/usr/lib/ruby/site_ruby/1.8/puppet/network/server.rb:92:in `listen'
/usr/lib/ruby/site_ruby/1.8/puppet/network/server.rb:104:in `start'
/usr/lib/ruby/site_ruby/1.8/puppet/daemon.rb:136:in `start'
/usr/lib/ruby/site_ruby/1.8/puppet/application/master.rb:199:in `main'
/usr/lib/ruby/site_ruby/1.8/puppet/application/master.rb:148:in
`run_command'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:438:in `plugin_hook'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:500:in `exit_on_fail'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:76:in `execute'
/usr/bin/puppet:10

and
gem list

*** LOCAL GEMS ***

json (1.5.1)
rake (0.8.7)
stomp (1.2.2)



Il giorno mercoledě 3 ottobre 2012 11:26:42 UTC+2, Jonathan Gazeley ha
scritto:


Yesterday my puppetmaster and nodes got upgraded to puppet-3.0.0.

Since then, all puppet runs have been failing with this error:

Error: Could not retrieve catalog from remote server: Error 400 on
SERVER: Could not autoload puppet/indirector/node/active_record:
uninitialized constant ActiveRecord


My colleague and I have put a few hours into trying to work out what's
wrong. rubygem-activerecord-2.1.1-2.el6.noarch is installed from the
puppetlabs RPM repo. We've reinstalled all components but made no
progress.

I found this thread which seems to describe the same behaviour, but
there are no replies:

https://groups.google.com/forum/?fromgroups=#!topic/puppet-dev/D85TsZ70LKQ

Anyone

Re: [Puppet Users] upgrade to 3.0, ruby and rhel 5

2012-10-09 Thread Matthaus Owens
Oh, sorry, I didn't understand what you had written before responding.
Please ignore my reply :).

On Tue, Oct 9, 2012 at 9:54 AM, Matthaus Owens  wrote:
> ruby 1.8.7 is in the dependencies repo for el5. That repo is enabled
> by default if you install the puppetlabs-release package
> (http://yum.puppetlabs.com/el/5/products/x86_64/puppetlabs-release-5-6.noarch.rpm).
>
> http://yum.puppetlabs.com/el/5/dependencies/{i386,x86_64,SRPMS}/
>
> Once you add the dependencies repo, the new ruby will be available.
>
> On Tue, Oct 9, 2012 at 9:51 AM, Andrei-Florian Staicu
>  wrote:
>> Hi all,
>>
>> I wanted to upgrade today the clients to 3.0 but, for RHEL 5, ruby
>> 1.8.7 is not in the official repos. If we upgrade from the official
>> (1.8.5) package to the puppetlabs provided one, there is a good chance
>> that we will lose support for several applications that we are
>> running.
>> Is there a way around this? (except upgrading to PE, which will come
>> next year :D )
>>
>> Thanks.
>>
>> --
>> 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.
>>
>
>
>
> --
> Matthaus Owens
> Release Manager, Puppet Labs



-- 
Matthaus Owens
Release Manager, 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] Re: activerecord and puppet-3.0.0

2012-10-09 Thread Joe Hillenbrand
Same story here. Started with puppet 2.7 on Ubuntu 10.04, did apt-get
upgrade, then it broke.

I have since switched from storedconfig to PuppetDB, which I highly
recommend to anyone else having this issue.

On Tue, Oct 9, 2012 at 9:54 AM, Jonathan Gazeley
 wrote:
> My version of puppet 2.7 was installed on CentOS 6 from the puppetlabs RPM
> repo with "yum install puppet". When puppet 3 was released, I did a "yum
> update" to get the latest. The issue does not occur with a blank CentOS box
> starting out with puppet 3.
>
> Want me to add this information to the tracked issue? Don't want to add
> unwanted noise to the issue unnecessarily :)
>
> Cheers,
> Jonathan
>
>
>
> On 09/10/12 16:53, Josh Cooper wrote:
>>
>> Jonathan and Luca,
>>
>> How did you install puppet (from source, gem, apt-get, ...)? In the
>> cases that fail, is it always that you installed 2.7.x and upgraded
>> from there? If so, how did you update?
>>
>> We are tracking this issue at http://projects.puppetlabs.com/issues/16770
>>
>> Josh
>>
>> On Tue, Oct 9, 2012 at 7:30 AM, Luca Gioppo  wrote:
>>>
>>> Same problem for me:
>>>
>>> here is the trace:
>>> Error: Cached catalog for backup.cortile.cloudlabcsi.local failed: Could
>>> not
>>> autoload puppet/indirector/catalog/active_record: uninitialized constant
>>> ActiveRecord
>>> /usr/lib/ruby/site_ruby/1.8/puppet/util/autoload.rb:75:in `load_file'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/util/autoload.rb:208:in `load'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/util/instance_loader.rb:68:in
>>> `loaded_instance'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/terminus.rb:108:in
>>> `terminus_class'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:313:in
>>> `make_terminus'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:126:in
>>> `terminus'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/store_configs.rb:6:in
>>> `initialize'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:316:in `new'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:316:in
>>> `make_terminus'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:126:in
>>> `terminus'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:47:in
>>> `cache'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:217:in
>>> `find_in_cache'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:186:in
>>> `find'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:108:in
>>> `do_find'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:71:in `send'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:71:in
>>> `process'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick/rest.rb:24:in
>>> `service'
>>> /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
>>> /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:33:in `listen'
>>> /usr/lib/ruby/1.8/webrick/server.rb:173:in `call'
>>> /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
>>> /usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
>>> /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
>>> /usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
>>> /usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
>>> /usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
>>> /usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
>>> /usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:30:in `listen'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:29:in
>>> `initialize'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:29:in `new'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:29:in `listen'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:26:in
>>> `synchronize'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:26:in `listen'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/network/server.rb:92:in `listen'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/network/server.rb:104:in `start'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/daemon.rb:136:in `start'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/application/master.rb:199:in `main'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/application/master.rb:148:in
>>> `run_command'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:438:in `plugin_hook'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:500:in `exit_on_fail'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run'
>>> /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:76:in `execute'
>>> /usr/bin/puppet:10
>>>
>>> and
>>> gem list
>>>
>>> *** LOCAL GEMS ***
>>>
>>> json (1.5.1)
>>> rake (0.8.7)
>>> stomp (1.2.2)
>>>
>>>
>>>
>>> Il giorno mercoledě 3 ottobre 2012 11:26:42 UTC+2, Jonathan Gazeley ha
>>>
>>> scritto:


 Yesterday my puppetmaster an

[Puppet Users] Service Resources and Selinux

2012-10-09 Thread Tom

Hi list,

I've got an issue at the moment, which isn't really a big problem, but 
an untidy annoyance really, and I'd just like to understand what the 
best practice might be when dealing with the issue.


As a really quick summary, the issue is that Puppet is starting up the 
mysqld service for the first time as unconfined_u, and then when MySQL 
goes and creates a load of its initial files also as unconfined_u, 
Puppet goes and resets them all to system_u which is what they should be 
when checking matchpathcon:


The thing is, because the service is started as unconfined_u, any 
databases/tables that are created are going to inherit that, and puppet 
is going to be resetting them.


For some more detail, I've written something which will set the 
mysqld_db_t selinux file_context on my data directories which are in 
/home, and I have a notify which will go and check and re-set the 
selinux file_context if there are any changes in these directories.  
They're set to recurse, so to stop Puppet changing things from 
unconfined_u to system_u on a regular basis, and sending refresh notices 
to my Exec resources, I've set selinux_ignore_defaults to true in my 
File resources.


This strikes me as a bit of a dirty way of doing things, and I was 
wondering if anyone had any better ideas of how to manage this.


Please find below a sample of the relevant code - because I'm sure my 
verbose description is probably leaving some people scratching their 
heads! :)  I was going to make the file_context stuff much more 
re-usable, but want to get my head around the best practices first - as 
I'm not that experiened with all of this stuff to be honest!


Many thanks.  Tom.


  # List of directories we're going to use with MySQL
  $mysqldirs = [ "/home/data", "/home/logs", "/home/mysqltmp", ]

  # Set SELinux contexts
  define add_selinux_context ($context = "mysqld_db_t") {
file { $name:
  ensure  => "directory",
  owner   => "mysql",
  group   => "mysql",
  seltype => "mysqld_db_t",
  selinux_ignore_defaults => "true",
  recurse => "true",
  require => Package["mysql-server"],
  notify  => [ Exec["add_file_context_${context}_${name}"], 
Exec["set_file_context_${context}_${name}"], ],

}

# Set the default file_context regex for the path
exec { "add_file_context_${context}_${name}":
  command => "semanage fcontext -a -t ${context} \"${name}(/.*)?\"",
  unless  => "semanage fcontext -l | grep 
'^${name}(/.*)?:${context}:'",

  require => [ Package["policycoreutils-python"], File[$name], ],
  refreshonly => "true",
}

# Reset the file_context using restorecon
exec { "set_file_context_${context}_${name}":
  command => "restorecon -R ${name}",
  unless  => "ls -d --scontext ${name} | awk -F: '{print \$3}' | 
grep \"${context}\"",

  require => File["$name"],
  refreshonly => "true",
}
  }

  add_selinux_context { $mysqldirs:
context => "mysqld_db_t",
  }

  # Keep it running
  service { "mysqld":
ensure=> "running",
hasstatus => true,
require   => [ Package["mysql-server"], File[$mysqldirs], ]
  }

--
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] Setting Powershell execution policy through Puppet

2012-10-09 Thread Puppet 3.0 Powershell 2.0 Set ExecutionPolicy Err
Hi,

I am trying to set the execution policy on the Powershell 64 bit version. 


exec { 'rolesfeatures1':
command => 'C:\Windows\System32\cmd.exe /c 
C:\Windows\System32\WindowsPowerShell\v1.0\Powershell.exe Invoke-Command 
{Set-ExecutionPolicy RemoteSigned}',
  provider => windows,
  logoutput => true,
}

or

exec { 'rolesfeatures1':
command => 'C:\Windows\System32\WindowsPowerShell\v1.0\Powershell.exe 
Invoke-Command {Set-ExecutionPolicy RemoteSigned}',
   provider => windows,
   logoutput => true,
}

Both recipes do not work but when i execute the same command on the cmd 
windows works just fine.  Any clues?

-- 
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/-/cqynD9TtAR4J.
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] performance of source vs template vs file

2012-10-09 Thread Mihai Stan
Hello everyone,

I'm currently looking into using puppet to manage my homedir .dot files, 
including .vim/ folder with a bunch of plugins totaling a few tens of files 
(almost 100), in order to have a pleasant and productive working experience 
on our organization's 500+ machines.

While this looks like a cool thing to do, I can't help but wonder how will 
this affect puppet's performance both on the masters' and agents' sides and 
how good puppet is at distributing lots of infrequently updated files.

My common sense tells me that from a performance point of view, I could use 
the following methods, first in the list being the most recommended:

file {
content => file('file'),
}

file {
  source => "puppet:///modules/...",
}

file {
  content => template('template.erb'),
}


Personally, I'd go with using file() function for distributing static files 
and source => "puppet:///" to manage directories recursively, which would 
simplify the setup part a lot.


Does anyone have a more in-depth insight into the performance of all these 
methods ? Or, for that matter, why I shouldn't be doing the above as it 
blows puppet performance in ways I can't comprehend ?


Thanks for your feedback,
Mihai

-- 
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/-/psSkZ5Ww2H8J.
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: upgrade to 3.0, ruby and rhel 5

2012-10-09 Thread Puppet 3.0 Powershell 2.0 Set ExecutionPolicy Err
Hi,

I dont know about redhat but i did change my ubuntu repository list to 
point to the /dev repositories rather than the /main repositories and it 
worked. 

On Tuesday, October 9, 2012 12:51:59 PM UTC-4, SAF wrote:
>
> Hi all, 
>
> I wanted to upgrade today the clients to 3.0 but, for RHEL 5, ruby 
> 1.8.7 is not in the official repos. If we upgrade from the official 
> (1.8.5) package to the puppetlabs provided one, there is a good chance 
> that we will lose support for several applications that we are 
> running. 
> Is there a way around this? (except upgrading to PE, which will come 
> next year :D ) 
>
> Thanks. 
>

-- 
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/-/toDaZoS2B40J.
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] domain resolution in facter

2012-10-09 Thread Michael Stahnke
On Tue, Oct 9, 2012 at 9:46 AM, Klaus Ethgen  wrote:
> Michael Stahnke  schrieb:
> [Bug in domain.rb]
>>> I think that is a bug in facter but I do not know how to open a bug
>>> report on the website, there is only a way to display open issues.
>>
>> You can open one here: http://projects.puppetlabs.com/projects/facter/issues

You should be able to once you sign up.


>
> I thought so. But there is no way for me to open new reports. I can only
> view and filter existing bugs.
>
>> Note that this file has been changed quite a few times.  Is it
>> possible you're on an older version of facter?
>
> I know. But I see this on very many versions. My newest version is
> facter 1.6.10.
>
> -- Klaus
> --
> Klaus Ethgen  http://www.ethgen.ch/
> pub  4096R/4E20AF1C 2011-05-16   Klaus Ethgen 
> Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C
>
> --
> 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] Re: Puppet 2.7 v 3.0 in the PuppetLabs yum repo

2012-10-09 Thread Jeff McCune
On Mon, Oct 8, 2012 at 12:21 PM, Jeff McCune  wrote:
>
> Finally, we acknowledge that using `ensure => latest` inside of
> Puppet, or doing the equivalent of `yum install puppet` in kickstart,
> scripts, or cobbler doesn't qualify as knowingly deciding to upgrade
> across incompatible versions.  Not everyone reads the documentation or
> our announcements, and not everyone is an expert in apt and yum.  This
> acknowledgement applies for any system we support that has online
> repositories such as APT and IPS.  Furthermore, there is quite a bit
> of documentation [1] [2] [3] that indicates this is a problem with our
> design.

I'd like to amend the paragraph above because I prematurely spoke for
Puppet Labs and more importantly our release engineering team who is
responsible for our repositories.  This paragraph is too prescriptive
of the solution domain; the more general design principle we're
subjecting ourselves to can be summed up as, "stupid users are a myth"
and a good litmus test we are applying to this issue is; "If you're
using our repositories, Puppet runs successfully 10 times in a row,
and on the 11th run Puppet is broken," then that's a design issue
we'll work to correct.

-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] RHEL 5: Stuck on Puppet 2.7

2012-10-09 Thread Craig White
different strokes for different folks.

ruby and the various gem packages move so fast that no packaging system really 
has a chance of keeping up. It's also extremely likely that what we are talking 
about is a puppet master where you will have to resort to gem packaging anyway 
to install rails/rack and other things anyway.

Craig

On Oct 9, 2012, at 9:02 AM, Jakov Sosic wrote:

> On 10/09/2012 05:26 PM, Craig White wrote:
>> If you install ruby from one source, you can't use rpm's from another source 
>> and expect them to always work. Chances are that the libraries use to build 
>> ruby are not the same libraries to build passenger.
>> 
>> If you want to ensure a working passenger when using a non-official CentOS 
>> ruby, then just use gem to install passenger (ie… 'gem install passenger') 
>> and once passenger is installed, you can use passenger's installer scripts 
>> for apache or nginx ('passenger-install-apache-module')
> 
> It is maybe the easiest way, but I would strongly suggest against it. It is 
> unwise to mix up two package managers like that, it's better to built your 
> own packages.



-- 
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] Setting Powershell execution policy through Puppet

2012-10-09 Thread Josh Cooper
On Tue, Oct 9, 2012 at 9:58 AM, Puppet 3.0 Powershell 2.0 Set
ExecutionPolicy Err  wrote:
> Hi,
>
> I am trying to set the execution policy on the Powershell 64 bit version.
>
>
> exec { 'rolesfeatures1':
> command => 'C:\Windows\System32\cmd.exe /c
> C:\Windows\System32\WindowsPowerShell\v1.0\Powershell.exe Invoke-Command
> {Set-ExecutionPolicy RemoteSigned}',
>   provider => windows,
>   logoutput => true,
> }
>
> or
>
> exec { 'rolesfeatures1':
> command => 'C:\Windows\System32\WindowsPowerShell\v1.0\Powershell.exe
> Invoke-Command {Set-ExecutionPolicy RemoteSigned}',
>provider => windows,
>logoutput => true,
> }
>
> Both recipes do not work but when i execute the same command on the cmd
> windows works just fine.  Any clues?
>
> --
> 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/-/cqynD9TtAR4J.
> 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.

Since ruby is a 32-bit process, Windows will automatically redirect
file system access from C:\Windows\System32 to C:\Windows\SysWOW64.
Use C:\Windows\sysnative in your path instead.

See 
http://docs.puppetlabs.com/windows/running.html#file-system-redirection-in-64-bit-windows-versions
and the very end of
http://docs.puppetlabs.com/windows/troubleshooting.html#error-messages

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] 3.0 and Passenger

2012-10-09 Thread Jeff McCune
On Tue, Oct 9, 2012 at 9:31 AM, Worker Bee  wrote:
> Can anyone direct me to documentation for configuring 3.0 to use
> apache/passenger?  I cannot seem to fin this for puppet open source.

The documentation is largely the same as previous versions [1], the
difference being a new config.ru [2] file to configure and rack up the
puppet master.

Hope this helps,

[1] http://docs.puppetlabs.com/guides/passenger.html
[2] https://github.com/puppetlabs/puppet/blob/master/ext/rack/files/config.ru

-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] 3.0 and Passenger

2012-10-09 Thread Worker Bee
Ok, thanks!

On Tue, Oct 9, 2012 at 2:01 PM, Jeff McCune  wrote:

> On Tue, Oct 9, 2012 at 9:31 AM, Worker Bee  wrote:
> > Can anyone direct me to documentation for configuring 3.0 to use
> > apache/passenger?  I cannot seem to fin this for puppet open source.
>
> The documentation is largely the same as previous versions [1], the
> difference being a new config.ru [2] file to configure and rack up the
> puppet master.
>
> Hope this helps,
>
> [1] http://docs.puppetlabs.com/guides/passenger.html
> [2]
> https://github.com/puppetlabs/puppet/blob/master/ext/rack/files/config.ru
>
> -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.



[Puppet Users] Answer a question after a command has been run in a init.pp in a module.

2012-10-09 Thread JGonza1
I have the command below in a init.pp file that I run to startup splunk for 
the first time but it outputs the license agreement which requires to input 
a y or n. Is there a way to input a y after the lincese agreement? 
 
exec { "start":
 command => "/opt/splunkforwarder/bin/splunk start",
  }
I have tried to redirect a y in the command below but it did not work.
exec { "start":
 command => "/opt/splunkforwarder/bin/splunk start < y",
  }
 

-- 
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/-/e0p23HYdbYQJ.
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 3.0 on Debian Lenny

2012-10-09 Thread Felipe Salum
Hi guys.

I don't see the latest puppet 3.0 on the puppetlabs debian repository for 
lenny and also the latest puppet dashboard.

Aren't you guys adding the new versions to the deprecated Debian Lenny 
anymore ?

Can I grab the puppet 3.0 agent from squeeze to use on Lenny ?

Regards,
Felipe

-- 
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/-/uLwlJAd5VIIJ.
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] upgrade to 3.0, ruby and rhel 5

2012-10-09 Thread Andrei-Florian Staicu
On Tue, Oct 9, 2012 at 7:55 PM, Matthaus Owens  wrote:
> Oh, sorry, I didn't understand what you had written before responding.
> Please ignore my reply :).

No worries, thanks for replying.

Another solution/question would be: could i function properly with
puppetmaster 3.0 and clients 2.7.19 (on RHEL 5 only) for the next half
of year? Or might I run into some kind of horrendous incompatibilities
(except the puppetd-never-ending-run problem).

-- 
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] upgrade to 3.0, ruby and rhel 5

2012-10-09 Thread Matthaus Owens
2.7.19 clients should work just fine against a 3.0 master.

On Tue, Oct 9, 2012 at 11:38 AM, Andrei-Florian Staicu
 wrote:
> On Tue, Oct 9, 2012 at 7:55 PM, Matthaus Owens  
> wrote:
>> Oh, sorry, I didn't understand what you had written before responding.
>> Please ignore my reply :).
>
> No worries, thanks for replying.
>
> Another solution/question would be: could i function properly with
> puppetmaster 3.0 and clients 2.7.19 (on RHEL 5 only) for the next half
> of year? Or might I run into some kind of horrendous incompatibilities
> (except the puppetd-never-ending-run problem).
>
> --
> 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.
>



-- 
Matthaus Owens
Release Manager, 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] upgrade to 3.0, ruby and rhel 5

2012-10-09 Thread Andrei-Florian Staicu
On Tue, Oct 9, 2012 at 9:48 PM, Matthaus Owens  wrote:
> 2.7.19 clients should work just fine against a 3.0 master.

Excellent. I'll remove the 3.0 packages from our satellite then.

Thanks for you answer.

-- 
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] Question about conditional exec notifications

2012-10-09 Thread Ramin K

On 10/9/2012 7:43 AM, Adrian Webb wrote:

Will do.  Thanks!

Do you by any chance know how notifications are generated by providers?
In essence, what tells Puppet that there needs to be a notify?  I was
looking through the vcsrepo git provider code but did not see anything
that looked like it would tell but I am newer to the low level details
of providers.  If you know where I would start I would be happy to
troubleshoot issues with the vcsrepo git provider as they come up.

Thanks,
Adrian


	I don't know much about building providers though I've hacked on the 
vcsrepo a bit. My basic understanding is changes would be a create 
property and Puppet would generate a notify from it.


http://docs.puppetlabs.com/guides/custom_types.html#properties

Most of my issues have centered around the git provider not pulling from 
source before trying to apply tags, branches, or revisions, but that 
looks like it was fixed three weeks ago.


Ramin

--
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 3.0, Passenger not starting

2012-10-09 Thread Worker Bee
Hello Everyone;

I am somewhat of a newbie to puppet...
I have installed puppet 3.0 and configured according to the insteuctions
for 2.6
I updated the config.ru as instructed for 3.0.

However, when I start httpd manually, passenger starts.  When I start
puppetmaster, it does not start httpd and is still using WebBrick...
I am stumped and not really even sure where to begin troubleshooting.
Any assistance would be greatly appreciated!!

Thanks in advance!

-- 
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] RHEL 5: Stuck on Puppet 2.7

2012-10-09 Thread Jo Rhett
Dude, seriously. Install Ruby, then build the passenger RPMs. It just works.

No, you can't use passenger between the time you update Ruby and before you 
update Passenger. You are updating interlocked dependancies. Install them both 
at once.

On Oct 8, 2012, at 2:44 PM, Dan White wrote:
> I think you miss the point.
> I do not need to hand-build Ruby -- it is available from the puppetlabs-deps 
> repo
> 
> It is a chicken-egg dilemma with Ruby and Passenger.
> 
> Passenger depends on the installed version of Ruby.
> Trying to update Ruby causes a dependency error from Passenger.
> 
> I tried re-building Passenger from SRPM, but ran into problems.
> 
> It would be nice if the maintainer of the Passenger RPM's would surface and 
> help out, but ...?
> 
> If I force Ruby to update to 1.8.7.x, will yum continue to complain about a 
> dependency problem with Passenger or will it re-examine the system and "see" 
> the currently installed version ?
> 
> On Oct 8, 2012, at 3:13 PM, Jo Rhett wrote:
> 
 Actually, it's not specified in the source RPM. And just recompiling the 
 source RPM solves the problem. I ran into the same thing, just grabbed the 
>> 
>> On Oct 6, 2012, at 3:39 PM, Dan White wrote:
>>> Actually, it is.
>>> 
>>> https://github.com/erikogan/passenger/blob/master/rpm/passenger.spec
>>> 
>>> ruby_version_patch -- lines 55-67, line 86, and line 238
>>> 
>>> It looks for the version that is already installed.
>> 
>> Saying "use the current version" generally means "not specified" ;-)  
>> Especially when I was responding to your query about what to fix.
>> 
>>> So how do I update ruby ?
>> 
>> https://groups.google.com/d/msg/puppet-users/CQTHj9nIYCw/b2Cr7-BxAwkJ
>> 
>> I am trying to be helpful, but all of this is very google-able.
> 
> 
> -- 
> 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.

-- 
Jo Rhett
Net Consonance : net philanthropy to improve open source and internet projects.



-- 
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 3.0, Passenger not starting

2012-10-09 Thread Jo Rhett
On Oct 9, 2012, at 12:04 PM, Worker Bee wrote:
> However, when I start httpd manually, passenger starts.  When I start 
> puppetmaster, it does not start httpd and is still using WebBrick…  
> I am stumped and not really even sure where to begin troubleshooting.

Yes, puppetmaster service is webrick. You should disable puppetmaster service 
and enable httpd service. Your puppetmaster is now a passenger service within 
your apache instance.

-- 
Jo Rhett
Net Consonance : net philanthropy to improve open source and internet projects.



-- 
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 3.0, Passenger not starting

2012-10-09 Thread Ellison Marks
Running the puppetmaster from it's init script runs the default server, and 
you don't want it running if you're using passenger. As long as you've set 
up passenger correctly and httpd is running, you have a puppetmaster 
running. Try triggering a client.

On Tuesday, October 9, 2012 12:04:54 PM UTC-7, Worker Bee wrote:
>
> Hello Everyone;
>
> I am somewhat of a newbie to puppet...
> I have installed puppet 3.0 and configured according to the insteuctions 
> for 2.6
> I updated the config.ru as instructed for 3.0.
>
> However, when I start httpd manually, passenger starts.  When I start 
> puppetmaster, it does not start httpd and is still using WebBrick...  
> I am stumped and not really even sure where to begin troubleshooting.
> Any assistance would be greatly appreciated!!
>
> Thanks in advance!
>
>
>
>

-- 
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/-/_PoHqhGKWF8J.
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 3 killed my environment variables

2012-10-09 Thread Hawk Kroeger
Hey jwkoelewijn, do you mind posting your solution for the rabbitmq 
provider.

Thanks!

On Monday, 8 October 2012 04:18:42 UTC-7, jwkoelewijn wrote:
>
> Thanks for this suggestion,
>
> this did the trick!
>
> Kind regards,
>
> J.W. Koelewijn
>
> On Thursday, October 4, 2012 4:24:26 PM UTC+2, jcbollinger wrote:
>>
>>
>>
>> On Wednesday, October 3, 2012 8:11:55 AM UTC-5, Daniele Sluijters wrote:
>>>
>>> Hi,
>>>
>>> Sorry, I got confused between two things. It's not the actual Exec type. 
>>> it's when a provider executes a command that the environment cannot be set.
>>>
>>>
>> Puppet's guts have code for setting a custom environment for commands, 
>> but the 'command' and 'commands' functions don't provide an interface to 
>> it.  I'm working from the code here, not actual experience, but it looks 
>> like you can use the has_command() function instead, something like:
>>
>> has_command(:my_command, '/usr/sbin') do
>>   environment({ 'HOME' => '/some/homedir' })
>> end
>>
>> I don't remember seeing that documented anywhere, so it probably 
>> qualifies as an internal interface -- use at your own risk.  Since you'll 
>> probably want to look at the code yourself, you can find that function in 
>> puppet/lib/puppet/provider.rb.  In particular, you can examine how it is 
>> used by the documented 'command' and 'commands' functions.
>>
>>
>> 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/-/FhtxtSinbo4J.
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] Trying to set up a class parameter override.

2012-10-09 Thread jeff.b
I'm trying to set up some classes where there is a default action that is 
applied to everything in a base class.  And then have a subclass that can 
override the default action for specific resources.  I am using this blog 
post as 
inspiration: 
http://www.craigdunn.org/2011/09/puppet-parameterized-classes-vs-definitions/ 

I created a test case of what I'm trying to achieve but the part where I'm 
overriding the value does not seem to take effect.   Please let me know 
what I'm doing wrong.


class example_env ( $env = 'default' ) {
# Set $env and do something with it
notify {"Env: ${env}": }
#file {...}
}

class example_setdefault {
   # Instantiate example_env class with default value
   class { example_env: }
}

class example_override inherits example_setdefault {
  # Override example_env class env param with new value
  Class["example_env"] { env => 'orverride'}
}

class example_base {
# Base class that is included to just about everyone

# Set default value
include example_setdefault
}

class example_sub {
# Sub class that includes base class
include example_base

# Override default value
include example_override
}

node "example1" {
# host with default config
include example_base
}

node "example2" {
# host with override config
include example_sub
}

When you run this as example2 it still shows $env being 'default'.   Please 
let me know where I went wrong.  Thanks.

-- 
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/-/Oijycw-YmWYJ.
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 3.0 on Debian Lenny

2012-10-09 Thread Matthaus Owens
Yes, the squeeze packages *should* work just fine on lenny. We aren't
building new packages for lenny because, as you note, lenny went EOL
in February.

On Tue, Oct 9, 2012 at 11:29 AM, Felipe Salum  wrote:
> Hi guys.
>
> I don't see the latest puppet 3.0 on the puppetlabs debian repository for
> lenny and also the latest puppet dashboard.
>
> Aren't you guys adding the new versions to the deprecated Debian Lenny
> anymore ?
>
> Can I grab the puppet 3.0 agent from squeeze to use on Lenny ?
>
> Regards,
> Felipe
>
> --
> 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/-/uLwlJAd5VIIJ.
> 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.



-- 
Matthaus Owens
Release Manager, 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] Re: Puppet 3.0, Passenger not starting

2012-10-09 Thread Worker Bee
Thanks, guys!  Totally forgot about that!  Much appreciated!

Have a great evening!






On Tue, Oct 9, 2012 at 3:14 PM, Ellison Marks  wrote:

> Running the puppetmaster from it's init script runs the default server,
> and you don't want it running if you're using passenger. As long as you've
> set up passenger correctly and httpd is running, you have a puppetmaster
> running. Try triggering a client.
>
>
> On Tuesday, October 9, 2012 12:04:54 PM UTC-7, Worker Bee wrote:
>>
>> Hello Everyone;
>>
>> I am somewhat of a newbie to puppet...
>> I have installed puppet 3.0 and configured according to the insteuctions
>> for 2.6
>> I updated the config.ru as instructed for 3.0.
>>
>> However, when I start httpd manually, passenger starts.  When I start
>> puppetmaster, it does not start httpd and is still using WebBrick...
>> I am stumped and not really even sure where to begin troubleshooting.
>> Any assistance would be greatly appreciated!!
>>
>> Thanks in advance!
>>
>>
>>
>>  --
> 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/-/_PoHqhGKWF8J.
>
> 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] Answer a question after a command has been run in a init.pp in a module.

2012-10-09 Thread Gonzalo Servat
On Wed, Oct 10, 2012 at 5:26 AM, JGonza1  wrote:

> I have the command below in a init.pp file that I run to startup splunk
> for the first time but it outputs the license agreement which requires to
> input a y or n. Is there a way to input a y after the lincese agreement?
>

According to
http://docs.splunk.com/Documentation/Splunk/latest/Installation/Startsplunkforthefirsttime
:

To accept the license automatically when you start Splunk for the first
time, add the accept-license option to the start command:

$SPLUNK_HOME/bin/splunk start --accept-license

- Gonzalo

-- 
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: Answer a question after a command has been run in a init.pp in a module.

2012-10-09 Thread Michael Dodwell
For future reference you where trying to do: command => "yes | 
/opt/splunkforwarder/bin/splunk start",

'yes' is a unix program that will type 'y' over and over again.. you could 
also of used 'echo y | ' if you needed just 1 y..



On Wednesday, October 10, 2012 5:26:37 AM UTC+11, JGonza1 wrote:
>
> I have the command below in a init.pp file that I run to startup splunk 
> for the first time but it outputs the license agreement which requires to 
> input a y or n. Is there a way to input a y after the lincese agreement? 
>  
> exec { "start":
>  command => "/opt/splunkforwarder/bin/splunk start",
>   }
> I have tried to redirect a y in the command below but it did not work.
> exec { "start":
>  command => "/opt/splunkforwarder/bin/splunk start < y",
>   }
>  
>

-- 
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/-/hN5rvvsIKRQJ.
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] preseed chroot enterprise install failing

2012-10-09 Thread Andrew Galka
Hi

I'm installing puppet enterprise 2.6 in the preseed last_command process 
for ubuntu. While running the installer in a chroot, it is failing while it 
attempts to start the agent (pe-puppet-agent: unrecognized service). This 
all makes perfect sense. I was wondering is there a way to stop the 
installer from attempting to start the service?

Thanks

Andrew

-- 
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/-/icMo6mh0dv0J.
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] preseed chroot enterprise install failing

2012-10-09 Thread Matthaus Owens
Andrew,
If you set 'q_puppet_agent_first_run=n' in your answers file, the
agent service won't be started at the end of the install.

On Tue, Oct 9, 2012 at 4:24 PM, Andrew Galka  wrote:
> Hi
>
> I'm installing puppet enterprise 2.6 in the preseed last_command process for
> ubuntu. While running the installer in a chroot, it is failing while it
> attempts to start the agent (pe-puppet-agent: unrecognized service). This
> all makes perfect sense. I was wondering is there a way to stop the
> installer from attempting to start the service?
>
> Thanks
>
> Andrew
>
> --
> 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/-/icMo6mh0dv0J.
> 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.



-- 
Matthaus Owens
Release Manager, 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] Service Resources and Selinux

2012-10-09 Thread Peter Brown
You need to add a require to the service for the config files you are managing.
I find the best way to do that is put all the config files in a config
subclass and then require that in in the service.


On 10 October 2012 01:02, Tom  wrote:
> Hi list,
>
> I've got an issue at the moment, which isn't really a big problem, but an
> untidy annoyance really, and I'd just like to understand what the best
> practice might be when dealing with the issue.
>
> As a really quick summary, the issue is that Puppet is starting up the
> mysqld service for the first time as unconfined_u, and then when MySQL goes
> and creates a load of its initial files also as unconfined_u, Puppet goes
> and resets them all to system_u which is what they should be when checking
> matchpathcon:
>
> The thing is, because the service is started as unconfined_u, any
> databases/tables that are created are going to inherit that, and puppet is
> going to be resetting them.
>
> For some more detail, I've written something which will set the mysqld_db_t
> selinux file_context on my data directories which are in /home, and I have a
> notify which will go and check and re-set the selinux file_context if there
> are any changes in these directories.  They're set to recurse, so to stop
> Puppet changing things from unconfined_u to system_u on a regular basis, and
> sending refresh notices to my Exec resources, I've set
> selinux_ignore_defaults to true in my File resources.
>
> This strikes me as a bit of a dirty way of doing things, and I was wondering
> if anyone had any better ideas of how to manage this.
>
> Please find below a sample of the relevant code - because I'm sure my
> verbose description is probably leaving some people scratching their heads!
> :)  I was going to make the file_context stuff much more re-usable, but want
> to get my head around the best practices first - as I'm not that experiened
> with all of this stuff to be honest!
>
> Many thanks.  Tom.
>
>
>   # List of directories we're going to use with MySQL
>   $mysqldirs = [ "/home/data", "/home/logs", "/home/mysqltmp", ]
>
>   # Set SELinux contexts
>   define add_selinux_context ($context = "mysqld_db_t") {
> file { $name:
>   ensure  => "directory",
>   owner   => "mysql",
>   group   => "mysql",
>   seltype => "mysqld_db_t",
>   selinux_ignore_defaults => "true",
>   recurse => "true",
>   require => Package["mysql-server"],
>   notify  => [ Exec["add_file_context_${context}_${name}"],
> Exec["set_file_context_${context}_${name}"], ],
> }
>
> # Set the default file_context regex for the path
> exec { "add_file_context_${context}_${name}":
>   command => "semanage fcontext -a -t ${context} \"${name}(/.*)?\"",
>   unless  => "semanage fcontext -l | grep '^${name}(/.*)?:${context}:'",
>   require => [ Package["policycoreutils-python"], File[$name], ],
>   refreshonly => "true",
> }
>
> # Reset the file_context using restorecon
> exec { "set_file_context_${context}_${name}":
>   command => "restorecon -R ${name}",
>   unless  => "ls -d --scontext ${name} | awk -F: '{print \$3}' | grep
> \"${context}\"",
>   require => File["$name"],
>   refreshonly => "true",
> }
>   }
>
>   add_selinux_context { $mysqldirs:
> context => "mysqld_db_t",
>   }
>
>   # Keep it running
>   service { "mysqld":
> ensure=> "running",
> hasstatus => true,
> require   => [ Package["mysql-server"], File[$mysqldirs], ]
>   }
>
> --
> 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.



[Puppet Users] Re: preseed chroot enterprise install failing

2012-10-09 Thread Andrew Galka
TY!!!

On Wednesday, October 10, 2012 10:24:47 AM UTC+11, Andrew Galka wrote:
>
> Hi
>
> I'm installing puppet enterprise 2.6 in the preseed last_command process 
> for ubuntu. While running the installer in a chroot, it is failing while it 
> attempts to start the agent (pe-puppet-agent: unrecognized service). This 
> all makes perfect sense. I was wondering is there a way to stop the 
> installer from attempting to start the service?
>
> Thanks
>
> Andrew
>

-- 
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/-/kNU8dyOl2LMJ.
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: Creation of modifiable files via puppet

2012-10-09 Thread pdurkin
Thanks for all the help, the two solutions + using them both together will 
solve all the situations I'm considering.

Paul

On Tuesday, October 9, 2012 9:19:20 AM UTC+4, pdurkin wrote:
>
> I've been looking around but can't seem to find an answer to this.
>
> I would like to create a file whose initial contents come from the default 
> in the puppet server but is subsequently modifiable and puppet won't 
> overwrite any changes.
>
> The reason for this is that if I deploy a user account via puppet and 
> upload a default .bashrc/.profile, the user should be able to modify these 
> without having puppet change them back to the originals every time it runs.
>
> Thanks
>
> Paul
>

-- 
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/-/CDzGG-naGVUJ.
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 client not listening on port 8139

2012-10-09 Thread Pondy
Hi everyone,

Please help, I have built a new server and installed puppet (2.6.17) 
running on RHEL 6.3. It seems that it is not listening on port 8139.

iptables -L:
Chain INPUT (policy ACCEPT)
target prot opt source   destination 

Chain FORWARD (policy ACCEPT)
target prot opt source   destination 

Chain OUTPUT (policy ACCEPT)
target prot opt source   destination 

/etc/puppet/puppet.conf:
[main]
# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet

# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/run/puppet

# Where SSL certificates are kept.
# The default value is '$confdir/ssl'.
ssldir = $vardir/ssl

[agent]
# The file in which puppetd stores a list of the classes
# associated with the retrieved configuratiion.  Can be loaded in
# the separate ``puppet`` executable using the ``--loadclasses``
# option.
# The default value is '$confdir/classes.txt'.
classfile = $vardir/classes.txt

# Where puppetd caches the local configuration.  An
# extension indicating the cache format is added automatically.
# The default value is '$confdir/localconfig'.
localconfig = $vardir/localconfig
listen = true
server = mypuppet server.fqdn

/etc/puppet/namespaceauth.conf:
[puppetmaster]
allow mypuppet server.fqdn

/etc/puppet/auth.conf:
# This is an example auth.conf file, it mimics the puppetmasterd defaults
#
# The ACL are checked in order of appearance in this file.
#
# Supported syntax:
# This file supports two different syntax depending on how
# you want to express the ACL.
#
# Path syntax (the one used below):
# -
# path /path/to/resource
# [environment envlist]
# [method methodlist]
# [auth[enthicated] {yes|no|on|off|any}]
# allow [host|ip|*]
# deny [host|ip]
#
# The path is matched as a prefix. That is /file match at
# the same time /file_metadat and /file_content.
#
# Regex syntax:
# -
# This one is differenciated from the path one by a '~'
#
# path ~ regex
# [environment envlist]
# [method methodlist]
# [auth[enthicated] {yes|no|on|off|any}]
# allow [host|ip|*]
# deny [host|ip]
#
# The regex syntax is the same as ruby ones.
#
# Ex:
# path ~ .pp$
# will match every resource ending in .pp (manifests files for instance)
#
# path ~ ^/path/to/resource
# is essentially equivalent to path /path/to/resource
#
# environment:: restrict an ACL to a specific set of environments
# method:: restrict an ACL to a specific set of methods
# auth:: restrict an ACL to an authenticated or unauthenticated request
# the default when unspecified is to restrict the ACL to authenticated 
requests
# (ie exactly as if auth yes was present).
#

### Authenticated ACL - those applies only when the client
### has a valid certificate and is thus authenticated

# allow nodes to retrieve their own catalog (ie their configuration)
path ~ ^/catalog/([^/]+)$
method find
allow $1

# allow all nodes to access the certificates services
path /certificate_revocation_list/ca
method find
allow *

# allow all nodes to store their reports
path /report
method save
allow *

# Puppetrun settings
path /run
allow mypuppet server fqdn

# inconditionnally allow access to all files services
# which means in practice that fileserver.conf will
# still be used
path /file
allow *

### Unauthenticated ACL, for clients for which the current master doesn't
### have a valid certificate

# allow access to the master CA
path /certificate/ca
auth no
method find
allow *

path /certificate/
auth no
method find
allow *

path /certificate_request
auth no
method find, save
allow *

# this one is not stricly necessary, but it has the merit
# to show the default policy which is deny everything else
path /
auth any

It seems as though the puppet is running:
 4074 ?Ss 0:00 /usr/bin/ruby /usr/sbin/puppetd 
--server=mypuppetserver.fqdn --logdest=/var/log/puppet/puppet.log

But I cant even telnet to port 8139 on the localhost to test that the port 
is open.

Can any one please help?

Any suggestions welcome, I have copied the /etc/puppet/*.conf files from 
another working server.

Please 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/-/7kFNpVNAyd4J.
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] Scalability and performance

2012-10-09 Thread Robjon
Hi guys,

I am pretty new to this space, playing around with a few tools.
I am trying to read up on how I would scale Puppet (or other tools) up in 
my installation, and came across this blog post comparing Puppet and 
CFEngine: 
http://www.blogcompiler.com/2012/09/30/scalability-of-cfengine-and-puppet-2/

The numbers presented here are pretty extreme: CFEngine agents running 166 
times faster than Puppet agents in a small installation - and the 
difference is increasing?
Also, it seems to be the case that Puppet is more centralized which results 
in everything slowing down: "as the master gets more loaded, all the Puppet 
agents run slower".

Is this correct? Could some of you with more experience please comment on 
this?

Thanks.

-- 
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/-/5LcBoBBaZGQJ.
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] Scalability and performance

2012-10-09 Thread Dan Bode
On Tue, Oct 9, 2012 at 4:56 PM, Robjon  wrote:

> Hi guys,
>
> I am pretty new to this space, playing around with a few tools.
> I am trying to read up on how I would scale Puppet (or other tools) up in
> my installation, and came across this blog post comparing Puppet and
> CFEngine:
> http://www.blogcompiler.com/2012/09/30/scalability-of-cfengine-and-puppet-2/
>
> The numbers presented here are pretty extreme: CFEngine agents running 166
> times faster than Puppet agents in a small installation


The results of that paper are not very realistic. The benchmark is based on
doing nothing but running echo commands.  Since cfengine is written in C
(or C++) there is not question that it will perform many actions faster
than Puppet, but saying that it is 100X faster or whatever is disingenuous
(unless you can manage your infrastructure with nothing but echo commands).
I would be more interested to see comparisons based on real admin tasks
like managing packages or services.



> - and the difference is increasing?
> Also, it seems to be the case that Puppet is more centralized which
> results in everything slowing down: "as the master gets more loaded, all
> the Puppet agents run slower".
>

it is possible to either run puppet with or without a master. If you want
more centralized control, use a master, if you need something that scales
to the extreme, run puppet without a master using puppet apply (which is
must more similar to how cfengine works)


>
> Is this correct? Could some of you with more experience please comment on
> this?
>
> Thanks.
>
> --
> 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/-/5LcBoBBaZGQJ.
> 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] Service Resources and Selinux

2012-10-09 Thread Tom

Hi,

Thanks for the response.  Really, I think the way I'm approaching this 
is thinking about starting mysqld under the right selinux user context 
so that it doesn't label its own files incorrectly.  Every time a 
database or table is created, MySQL will be creating it under the wrong 
user context, and selinux will then go and reset it back.


I think maybe a wrapper script using runcon which invokes the mysqld 
service under the correct context is going to be the way to go.  Really 
though, I'd hoped that puppet had some kind of provision for starting 
services with the correct user context!


Just wondering if anyone else has had the same issue in the past, or do 
they just ignore all those seluser notifications? :-)


Many thanks.  Tom.



On 10/10/12 01:50, Peter Brown wrote:

You need to add a require to the service for the config files you are managing.
I find the best way to do that is put all the config files in a config
subclass and then require that in in the service.


On 10 October 2012 01:02, Tom  wrote:

Hi list,

I've got an issue at the moment, which isn't really a big problem, but an
untidy annoyance really, and I'd just like to understand what the best
practice might be when dealing with the issue.

As a really quick summary, the issue is that Puppet is starting up the
mysqld service for the first time as unconfined_u, and then when MySQL goes
and creates a load of its initial files also as unconfined_u, Puppet goes
and resets them all to system_u which is what they should be when checking
matchpathcon:

The thing is, because the service is started as unconfined_u, any
databases/tables that are created are going to inherit that, and puppet is
going to be resetting them.

For some more detail, I've written something which will set the mysqld_db_t
selinux file_context on my data directories which are in /home, and I have a
notify which will go and check and re-set the selinux file_context if there
are any changes in these directories.  They're set to recurse, so to stop
Puppet changing things from unconfined_u to system_u on a regular basis, and
sending refresh notices to my Exec resources, I've set
selinux_ignore_defaults to true in my File resources.

This strikes me as a bit of a dirty way of doing things, and I was wondering
if anyone had any better ideas of how to manage this.

Please find below a sample of the relevant code - because I'm sure my
verbose description is probably leaving some people scratching their heads!
:)  I was going to make the file_context stuff much more re-usable, but want
to get my head around the best practices first - as I'm not that experiened
with all of this stuff to be honest!

Many thanks.  Tom.


   # List of directories we're going to use with MySQL
   $mysqldirs = [ "/home/data", "/home/logs", "/home/mysqltmp", ]

   # Set SELinux contexts
   define add_selinux_context ($context = "mysqld_db_t") {
 file { $name:
   ensure  =>  "directory",
   owner   =>  "mysql",
   group   =>  "mysql",
   seltype =>  "mysqld_db_t",
   selinux_ignore_defaults =>  "true",
   recurse =>  "true",
   require =>  Package["mysql-server"],
   notify  =>  [ Exec["add_file_context_${context}_${name}"],
Exec["set_file_context_${context}_${name}"], ],
 }

 # Set the default file_context regex for the path
 exec { "add_file_context_${context}_${name}":
   command =>  "semanage fcontext -a -t ${context} \"${name}(/.*)?\"",
   unless  =>  "semanage fcontext -l | grep '^${name}(/.*)?:${context}:'",
   require =>  [ Package["policycoreutils-python"], File[$name], ],
   refreshonly =>  "true",
 }

 # Reset the file_context using restorecon
 exec { "set_file_context_${context}_${name}":
   command =>  "restorecon -R ${name}",
   unless  =>  "ls -d --scontext ${name} | awk -F: '{print \$3}' | grep
\"${context}\"",
   require =>  File["$name"],
   refreshonly =>  "true",
 }
   }

   add_selinux_context { $mysqldirs:
 context =>  "mysqld_db_t",
   }

   # Keep it running
   service { "mysqld":
 ensure=>  "running",
 hasstatus =>  true,
 require   =>  [ Package["mysql-server"], File[$mysqldirs], ]
   }

--
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.