Luke- Just update ot puppet 2.24.4 ( accidental upgrade really), and know the recipes that worked uder 2.24.1 with exec are now failing. under 2.24.1 defining multiple instances of Exec[/bin/rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-*] ran fine. under 2.24.4 it no longer runs and gives a err: about duplicate definition on the first instance and then about not being able to redefine the Resource at the second instance. I did not see this change in behavior reflected in teh documents anywhere. Is this a bug or a behavior change? Evan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Luke Kanies
2008-Apr-01 20:17 UTC
[Puppet Users] Re: puppet 2.24.4 type exec pehavior change
On Apr 1, 2008, at 2:58 PM, Evan Hisey wrote:> Luke- > Just update ot puppet 2.24.4 ( accidental upgrade really), and know > the recipes that worked uder 2.24.1 with exec are now failing. under > 2.24.1 defining multiple instances of Exec[/bin/rpm --import > /etc/pki/rpm-gpg/RPM-GPG-KEY-*] ran fine. under 2.24.4 it no longer > runs and gives a err: about duplicate definition on the first instance > and then about not being able to redefine the Resource at the second > instance. I did not see this change in behavior reflected in teh > documents anywhere. Is this a bug or a behavior change?It is listed as a behaviour change in the changelog: Exec resources must now have unique names, although the commands can still be duplicated. This is easily accomplished by just specifying a unique name with whatever (unique or otherwise) command you need. As the entry says, just give each exec instance a unique name, and they can have duplicate commands. -- I don''t know the key to success, but the key to failure is trying to please everybody. -- Bill Cosby --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Evan Hisey
2008-Apr-01 20:38 UTC
[Puppet Users] Re: puppet 2.24.4 type exec pehavior change
Luke> It is listed as a behaviour change in the changelog: > > Exec resources must now have unique names, although the commands > can still > be duplicated. This is easily accomplished by just specifying a > unique > name with whatever (unique or otherwise) command you need. > > As the entry says, just give each exec instance a unique name, and > they can have duplicate commands. >Okay, when I get a bit more time, I''ll see about editing the Upgrade Wiki page. Some one else will need to update the Type refrence page to reflect the new behavior, as it autogenerates form somewhere. Evan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Evan Hisey
2008-Apr-01 20:48 UTC
[Puppet Users] Re: puppet 2.24.4 type exec pehavior change
Luke-> It is listed as a behaviour change in the changelog: > > Exec resources must now have unique names, although the commands > can still > be duplicated. This is easily accomplished by just specifying a > unique > name with whatever (unique or otherwise) command you need. > > As the entry says, just give each exec instance a unique name, and > they can have duplicate commands.When I went back in to change the exec call I found that it was not two exec calls but one exec call in a definition that was being called twice with different arguments. I do not thin this should have been effected by the change. Class making the call: class common-repos{ yum-rpm{ ["epel-release", "razorsedge-release"]: enabled => true } } Definintion called: define yum-rpm ($enabled = true) { package {$name: ensure => $enabled ? { true => present, false => absent }, require => File["/etc/yum.repos.d/coe.repo"], } exec {"/bin/rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-*":} } As I am seeing the type exec work right now on my test system it is now only useable in classes. Still learning puppet, so it may just be me. Evan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Luke Kanies
2008-Apr-01 21:37 UTC
[Puppet Users] Re: puppet 2.24.4 type exec pehavior change
On Apr 1, 2008, at 3:48 PM, Evan Hisey wrote:> When I went back in to change the exec call I found that it was not > two exec calls but one exec call in a definition that was being called > twice with different arguments. I do not thin this should have been > effected by the change.Puppet resource uniqueness is currently based entirely on the resource type and title; if two resources have the same type and title, Puppet considers them to be the same resource. This has been a long-admitted limitation (and is easy to find filed as a bug). Most everyone will be excited to know that I *finally* merged into ''master'' today the code that will enable us to fix this. Resource uniqueness is now handled entirely by the resource catalog, and it will be much easier to add more sophisticated behaviour to its uniqueness checker. In the meantime, however, resources of the same type cannot have the same title. Two users named ''luke'' but with different shells are both the ''luke'' user. In the same way, two execs with the same command but different cwds are considered the same exec. It''s easy to fix: Use a custom title for each exec (titles don''t affect how execs behave at all). Yes, it''s a hack. However, exec is currently the only resource type that requires this hack, and frankly, exec is always going to be just a touch hackish. -- In our civilization, and under our republican form of government, intelligence is so highly honored that it is rewarded by exemption from the cares of office. --Ambrose Bierce --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Evan Hisey
2008-Apr-01 21:59 UTC
[Puppet Users] Re: puppet 2.24.4 type exec pehavior change
> > Puppet resource uniqueness is currently based entirely on the resource > type and title; if two resources have the same type and title, Puppet > considers them to be the same resource. > > This has been a long-admitted limitation (and is easy to find filed as > a bug). Most everyone will be excited to know that I *finally* merged > into ''master'' today the code that will enable us to fix this. > Resource uniqueness is now handled entirely by the resource catalog, > and it will be much easier to add more sophisticated behaviour to its > uniqueness checker. > > In the meantime, however, resources of the same type cannot have the > same title. Two users named ''luke'' but with different shells are both > the ''luke'' user. In the same way, two execs with the same command but > different cwds are considered the same exec. > > It''s easy to fix: Use a custom title for each exec (titles don''t > affect how execs behave at all). Yes, it''s a hack. However, exec is > currently the only resource type that requires this hack, and frankly, > exec is always going to be just a touch hackish. >I can accept that. I ran into lots things that were hackish when maintaining a custom SCM system. Frankly the degree of hackishness I was producing lead me to finding puppet and making the change. Solved this by naming each instance of exec after what had called it :) hackish but cute. Evan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
James Turnbull
2008-Apr-01 22:50 UTC
[Puppet Users] Re: puppet 2.24.4 type exec pehavior change
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Evan Hisey wrote: | Luke | |> It is listed as a behaviour change in the changelog: |> |> Exec resources must now have unique names, although the commands |> can still |> be duplicated. This is easily accomplished by just specifying a |> unique |> name with whatever (unique or otherwise) command you need. |> |> As the entry says, just give each exec instance a unique name, and |> they can have duplicate commands. |> | Okay, when I get a bit more time, I''ll see about editing the Upgrade | Wiki page. Some one else will need to update the Type refrence page to | reflect the new behavior, as it autogenerates form somewhere. | It''s already in there - http://reductivelabs.com/trac/puppet/wiki/UPGRADE#id60. Regards James Turnbul - -- James Turnbull (james@lovedthanlost.net) - -- Author of: - - Pulling Strings with Puppet (http://www.amazon.com/gp/product/1590599780/) - - Pro Nagios 2.0 (http://www.amazon.com/gp/product/1590596099/) - - Hardening Linux (http://www.amazon.com/gp/product/1590594444/) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFH8rwg9hTGvAxC30ARAhChAKCWvZhwACzx1P/SmfEXa388k8i3VgCdEZPw fpQ3goddCGYd7f6DQsaUC18=tJv2 -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---