Stephen Wallace
2013-Jun-04 12:18 UTC
[Puppet Users] Delete ypbind.........dependancy headaches.. yp-tools is needed by (installed) ypbind
Hi, My brain is hurting a bit over this one. How does one delete ypbind cleanly from a RHEL6 box? It has a dep of yp-tools. No problem...I add both to the uninstall list in hiera; packages_oel6_absent: <snip> - ypbind - yp-tools SNIP from manifest; $packagesabsent = hiera("${packages_key}_absent",''nil'') if $packagesabsent != ''nil'' { package { $packagesabsent: ensure => absent, } Works a treat for all other packages removing cleanly, apart from these two. Here''s the error when I add both programs to the delete list; err: /Stage[main]/Axx_packages/Package[yp-tools]/ensure: change from 2.9-12.el6 to absent failed: Execution of ''/bin/rpm -e yp-tools-2.9-12.el6.x86_64'' returned 1: error: Failed dependencies: yp-tools is needed by (installed) ypbind-3:1.20.4-29.el6.x86_64 err: /Stage[main]/Axx_packages/Package[ypbind]/ensure: change from 1.20.4-29.el6 to absent failed: Execution of ''/bin/rpm -e ypbind-1.20.4-29.el6.x86_64'' returned 1: error: Failed dependencies: ypbind is needed by (installed) yp-tools-2.9-12.el6.x86_64 If I only state one of the packages for removal....I only get one of the errors. I read some historical threads from a few years back reporting the same issue, but hoping it''s fixed by now. Other than doing a bit of a nasty exec rpm -e / onlyif rpm -q ypbind blah....what''s a chap to do? Regs, Stephen -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
jcbollinger
2013-Jun-04 14:32 UTC
[Puppet Users] Re: Delete ypbind.........dependancy headaches.. yp-tools is needed by (installed) ypbind
On Tuesday, June 4, 2013 7:18:26 AM UTC-5, Stephen Wallace wrote:> > Hi, > > My brain is hurting a bit over this one. How does one delete ypbind > cleanly from a RHEL6 box? It has a dep of yp-tools. No problem...I add both > to the uninstall list in hiera; > > packages_oel6_absent: > <snip> > - ypbind > - yp-tools > > SNIP from manifest; > $packagesabsent = hiera("${packages_key}_absent",''nil'') > > if $packagesabsent != ''nil'' { > package { $packagesabsent: > ensure => absent, > } > > Works a treat for all other packages removing cleanly, apart from these > two. > > Here''s the error when I add both programs to the delete list; > > err: /Stage[main]/Axx_packages/Package[yp-tools]/ensure: change from > 2.9-12.el6 to absent failed: Execution of ''/bin/rpm -e > yp-tools-2.9-12.el6.x86_64'' returned 1: error: Failed dependencies: > yp-tools is needed by (installed) ypbind-3:1.20.4-29.el6.x86_64 > > err: /Stage[main]/Axx_packages/Package[ypbind]/ensure: change from > 1.20.4-29.el6 to absent failed: Execution of ''/bin/rpm -e > ypbind-1.20.4-29.el6.x86_64'' returned 1: error: Failed dependencies: > ypbind is needed by (installed) yp-tools-2.9-12.el6.x86_64 > > If I only state one of the packages for removal....I only get one of the > errors. > > I read some historical threads from a few years back reporting the same > issue, but hoping it''s fixed by now. > > Other than doing a bit of a nasty exec rpm -e / onlyif rpm -q ypbind > blah....what''s a chap to do? > >Supposing that the ''yum'' Package provider is being selected (as should be the case for RHEL 6), a chap should use ensure => ''purged'' instead of ensure => ''absent'' for the affected packages. The basic problem there is the circular dependency between the two packages. I''d account that a packaging error, for if two packages each depend on the other, then they cannot really be considered separate. On the Puppet side, Puppet strives to avoid doing modifying system state in any way you did not actually tell it to do. In order to achieve that for Package resources, its ''yum'' package provider normally uses "rpm -e" to remove packages (as opposed to "yum remove"). Furthermore, in order for resource relationships to work correctly, Puppet needs to manage each package individually; it cannot combine multiple package removals into a single command. If what you want is for the package to be removed, no matter what it takes, then ''purged'' is how you express that to Puppet. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
James A. Peltier
2013-Jun-05 06:31 UTC
Re: [Puppet Users] Delete ypbind.........dependancy headaches.. yp-tools is needed by (installed) ypbind
----- Original Message ----- | Hi, | My brain is hurting a bit over this one. How does one delete ypbind | cleanly from a RHEL6 box? It has a dep of yp-tools. No problem...I | add both to the uninstall list in hiera; | packages_oel6_absent: | <snip> | - ypbind | - yp-tools | SNIP from manifest; | $packagesabsent = hiera("${packages_key}_absent",''nil'') | if $packagesabsent != ''nil'' { | package { $packagesabsent: | ensure => absent, | } | Works a treat for all other packages removing cleanly, apart from | these two. | Here''s the error when I add both programs to the delete list; | err: /Stage[main]/Axx_packages/Package[yp-tools]/ensure: change from | 2.9-12.el6 to absent failed: Execution of ''/bin/rpm -e | yp-tools-2.9-12.el6.x86_64'' returned 1: error: Failed dependencies: | yp-tools is needed by (installed) ypbind-3:1.20.4-29.el6.x86_64 | err: /Stage[main]/Axx_packages/Package[ypbind]/ensure: change from | 1.20.4-29.el6 to absent failed: Execution of ''/bin/rpm -e | ypbind-1.20.4-29.el6.x86_64'' returned 1: error: Failed dependencies: | ypbind is needed by (installed) yp-tools-2.9-12.el6.x86_64 | If I only state one of the packages for removal....I only get one of | the errors. | I read some historical threads from a few years back reporting the | same issue, but hoping it''s fixed by now. | Other than doing a bit of a nasty exec rpm -e / onlyif rpm -q ypbind | blah....what''s a chap to do? | Regs, | Stephen Try with ensure => purge -- James A. Peltier Manager, IT Services - Research Computing Group Simon Fraser University - Burnaby Campus Phone : 778-782-6573 Fax : 778-782-3045 E-Mail : jpeltier@sfu.ca Website : http://www.sfu.ca/itservices “A successful person is one who can lay a solid foundation from the bricks others have thrown at them.” -David Brinkley via Luke Shaw -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.