Hi all, I have defined in my site.pp: Package { provider => yum, ensure => latest, } and in one of my modules: package {"qt": provider => yum, ensure => absent, } package {"ati-fglrx": provider => yum, ensure => absent, } package {"libmng": provider => yum, ensure => absent, } (I''ve dobled provider definition cause I tought it was not working). Then, if I go to node and run it by hand I see next error: err: /:main/Node[td007.pic.es]/blade_x5355/glite31/yaim_packages/Package[libmng]/ensure: change from 1.0.8-1 to absent failed: Execution of ''/bin/rpm -e libmng-1.0.8-1.x86_64'' returned 1: error: Failed dependencies: libmng.so.1()(64bit) is needed by (installed) qt-3.3.3-16.el4.x86_64 Why is it executing rmp -e and not yum remove? TIA, Arnau --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I also noticed this today. Is there a better yum provider? I want to ensure cups and all the crap it comes with is absent. puppet calls rpm -e cups and fails on dependencies check. thanks for any tips On Jun 22, 8:12 am, Arnau Bria <arnaub...@pic.es> wrote:> Hi all, > > I have defined in my site.pp: > > Package { > provider=>yum, > ensure => latest, > } > > and in one of my modules: > > package {"qt": > provider=>yum, > ensure => absent, > } > package {"ati-fglrx": > provider=>yum, > ensure => absent, > } > > package {"libmng": > provider=>yum, > ensure => absent, > } > > (I''ve dobledproviderdefinition cause I tought it was not working). > > Then, if I go to node and run it by hand I see next error: > > err: /:main/Node[td007.pic.es]/blade_x5355/glite31/yaim_packages/Package[libmng]/ensure: change from 1.0.8-1 to absent failed: Execution of ''/bin/rpm -e libmng-1.0.8-1.x86_64'' returned 1: error: Failed dependencies: > libmng.so.1()(64bit) is needed by (installed) qt-3.3.3-16.el4.x86_64 > > Why is it executing rmp -e and notyumremove? > > TIA, > Arnau--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi> I also noticed this today. > Is there a better yum provider? > I want to ensure cups and all the crap it comes with is absent. > puppet calls rpm -e cups and fails on dependencies check. > > thanks for any tipshave a look at the code @ lib/puppet/provider/package/yum.rb you''ll see that the yum provider inherits from the rpm provider and doesn''t override the uninstall/absent method. Hence it uses the one from the rpm provider. So you could add an overrided method of uninstall. (and propose it to the -dev list?!) While looking at the code and http://reductivelabs.com/trac/puppet/wiki/TypeReference#package you''ll also see that the yum provider is purgeable and that the yum provider has an own purge method. So if this would fit your needs you can set ensure to purged and it would use yum -y erase $package cheers pete --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Fletch wrote:> I also noticed this today. > Is there a better yum provider? > I want to ensure cups and all the crap it comes with is absent. > puppet calls rpm -e cups and fails on dependencies check.We discussed this on irc a couple of days ago. I cant seem to find the logfile but if i remember correctly someone (Luke?) mentioned that an unobserved call of "yum -y remove package" can result in unexpected results. See this pastie for an example: http://pastie.org/529143 Cheers Alex --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi> We discussed this on irc a couple of days ago. I cant seem to find the > logfile but if i remember correctly someone (Luke?) mentioned that an > unobserved call of "yum -y remove package" can result in unexpected results. > > See this pastie for an example: http://pastie.org/529143yeah I also thought that. On the other side installing things (which will install a bunch of dependecies) is also an unexpected result somehow, as the dependencies aren''t managed by puppet. For sure this result isn''t that worse as uninstall, but I don''t think that this is really an argument, however I agree that in this case we simply also not care. But why do we care on uninstall? anyway I''m fine with the current way puppet is handling things and I think it''s ok to say that if we want to remove things we should name everything, if there are dependecies. so another mail with no sense :P cheers pete --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Tue, 30 Jun 2009 10:58:33 +0200 Peter Meier wrote: Hi, [...]> While looking at the code and > http://reductivelabs.com/trac/puppet/wiki/TypeReference#package you''ll > also see that the yum provider is purgeable and that the yum provider > has an own purge method. > So if this would fit your needs you can set ensure to purged and it > would use yum -y erase $packagethanks, did not notice that diff. I was using absent.> cheers peteCheers, Arnau --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Tue, 2009-06-30 at 11:46 +0200, Peter Meier wrote:> yeah I also thought that. On the other side installing things (which > will install a bunch of dependecies) is also an unexpected result > somehow, as the dependencies aren''t managed by puppet. For sure this > result isn''t that worse as uninstall, but I don''t think that this is > really an argument, however I agree that in this case we simply also not > care. But why do we care on uninstall?The basic issue is that puppet doesn''t know about dependencies (not sure it should), but once you throw ''yum -y erase'' into the mix, it becomes very easy to write inconsistent manifests, where a package erase removes a package that is explicitly mentioned by the manifest for install - sure the next puppet run will then install that package again, but in the meantime, you have a very broken system as the ''yum erase file'' example shows. David --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi>> yeah I also thought that. On the other side installing things (which >> will install a bunch of dependecies) is also an unexpected result >> somehow, as the dependencies aren''t managed by puppet. For sure this >> result isn''t that worse as uninstall, but I don''t think that this is >> really an argument, however I agree that in this case we simply also not >> care. But why do we care on uninstall? > > The basic issue is that puppet doesn''t know about dependencies (not sure > it should), but once you throw ''yum -y erase'' into the mix, it becomes > very easy to write inconsistent manifests, where a package erase removes > a package that is explicitly mentioned by the manifest for install - > sure the next puppet run will then install that package again, but in > the meantime, you have a very broken system as the ''yum erase file'' > example shows.yeah, which might be definitely worse than installing a package we''d like to have uninstalled. On the other side it''s an inconsistency we can''t solve using yum without declaring all yum dependencies within puppet, which would lead us to simply use rpm... ;) cheers pete --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Peter Meier wrote:> Hi > >>> yeah I also thought that. On the other side installing things (which >>> will install a bunch of dependecies) is also an unexpected result >>> somehow, as the dependencies aren''t managed by puppet. For sure this >>> result isn''t that worse as uninstall, but I don''t think that this is >>> really an argument, however I agree that in this case we simply also not >>> care. But why do we care on uninstall? >> The basic issue is that puppet doesn''t know about dependencies (not sure >> it should), but once you throw ''yum -y erase'' into the mix, it becomes >> very easy to write inconsistent manifests, where a package erase removes >> a package that is explicitly mentioned by the manifest for install - >> sure the next puppet run will then install that package again, but in >> the meantime, you have a very broken system as the ''yum erase file'' >> example shows. > > > yeah, which might be definitely worse than installing a package we''d > like to have uninstalled. On the other side it''s an inconsistency we > can''t solve using yum without declaring all yum dependencies within > puppet, which would lead us to simply use rpm... ;)FWIW: the apt provider removes packages+deps. And yes, this already lead to problems. It is even worse if one doesn''t control all "important" packages with puppet, since those might be removed without anybody noticing... Regards, DavidS --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Tuesday, June 30, 2009 6:22:26 PM UTC-4, lutter wrote:> > > The basic issue is that puppet doesn''t know about dependencies (not sure > it should), but once you throw ''yum -y erase'' into the mix, it becomes > very easy to write inconsistent manifests, where a package erase removes > a package that is explicitly mentioned by the manifest for install - > sure the next puppet run will then install that package again, but in > the meantime, you have a very broken system as the ''yum erase file'' > example shows. > > I don''t buy it. I would MUCH rather have puppet go all cyclical like thatthan not have any decent way to remove packages. At least if I saw that behavior, I could intervene and make things better. Instead I can''t make things work at all short of creating my own definition which just wraps an exec of "yum -y remove $name" anyway. If someone really wants the super conservative behavior, let them use the ''rpm'' provider, but lets make the ''yum'' provider do what yum was intended to do in the first place, manage dependencies! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
On Tuesday, June 30, 2009 4:58:33 AM UTC-4, Peter Meier wrote:> > While looking at the code and > > http://reductivelabs.com/trac/puppet/wiki/TypeReference#package you''ll > also see that the yum provider is purgeable and that the yum provider > has an own purge method. > So if this would fit your needs you can set ensure to purged and it > would use yum -y erase $package >I tried this but it''s worse than my own definition that wraps an exec around a "yum -y remove $name". The problem with ensure => purged is that puppet isn''t smart enough to realize the package is already purged so it attempts removal every time. The first time does work, but the remainder just make gobs of tagmail spam. FTR, here''s what I''m going back to, in case anyone finds it helpful: define yum::remove { exec { "yum -y remove ${name}": onlyif => "rpm -q ${name}", } } -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.