The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using https://tickets.puppetlabs.com. See the following page for information on filing tickets with JIRA:

Bug #1935

Unable to handle 2 packages with a circular dependency

Added by Hari Sekhon about 7 years ago. Updated over 3 years ago.

Status:ClosedStart date:02/05/2009
Priority:LowDue date:
Assignee:Nigel Kersten% Done:

0%

Category:-
Target version:-
Affected Puppet version:0.24.7 Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com


Description

When trying to remove 2 packages with circular dependencies on one another, neither is ever removed. This occurs on CentOS 5.2 using the std rpm -e operation that puppet defaults to.

The problem is that puppet attempts to remove one package at a time, so it fails on one because of the other, and then when it tries to remove the other it fails on the first.

There are 2 possible solutions that I can tell:

  1. Make a list of all packages to be removed and remove them all in one go in a single rpm command (although a single package name typo may prevent all other packages from being removed in this case which is not that good)

  2. Define a way of specifying that 2 or more packages must be removed simultaneously in one command. If you were to do an rpm -e PackageA PackageB then rpm is smart enough to actually resolve both deps and remove both, but if you only specify one, it will not let you.

Examples of packages with this circular dep behaviour on CentOS 5.2 include: ypbind <=> yp-tools ifd-egate <=> pcsc-lite oddjob <=> oddjob-libs … etc

I think a force or a recursive removal through yum should be avoided lest people destroy their systems with cascading package deletions.


Related issues

Related to Puppet - Feature #2198: Install multiple package within a single call to the pack... Investigating 04/25/2009
Duplicated by Puppet - Feature #4983: Remove packages at same time Duplicate 10/11/2010

History

#1 Updated by James Turnbull about 7 years ago

  • Status changed from Unreviewed to Rejected

This has been raised before and we’d need to add an option to the package type to specify unique behaviour for RPM as it’s also principally an RPM issue. We could jury-rig the package type to cater for this but I hate to see edge cases dictate this sort of behaviour.

#2 Updated by Hari Sekhon about 7 years ago

Forgive my ignorance but how can this be flatly rejected if the configuration system plains fails to deal with the issue of package management on one of the most standard systems?

You don’t think that it is worth an option or way of specifying to remove a specified 2 packages simultaneously instead of at once in order to resolve this? Most Linux package management systems allow to remove 2 packages simultaneously.

Currently I am working around it with an exec of my own.

#3 Updated by James Turnbull about 7 years ago

It wasn’t flatly rejected. My point is we are a cross-platform configuration management system – we try to avoid catering for every edge case. This isn’t a change to the provider but rather to the type and its a change to the resource model. This is a big change for one case and makes an exception that only functions for Red Hat.

#4 Updated by Peter Meier about 7 years ago

It wasn’t flatly rejected. My point is we are a cross-platform configuration management system – we try to avoid catering for every edge case. This isn’t a change to the provider but rather to the type and its a change to the resource model. This is a big change for one case and makes an exception that only functions for Red Hat.

I was already thinking various time about how we could change the package provider to install/remove more than one package at a time. Personally more because yum is very slow and calling it with a set of packages would speed up a puppet run drastically. However I didn’t yet come to a solution/idea which I thought is worth sharing. Noting that this might lead for big changes and might be as well interesting for other package managers like apt-get, aptitude, etc. it might be worth to start a discussion thread about that on the dev list, so we could discuss possible solutions for that.

#5 Updated by James Turnbull about 7 years ago

Sure – good idea. Would welcome the discussion.

#6 Updated by Luke Kanies about 7 years ago

  • Status changed from Rejected to Accepted
  • Priority changed from High to Low

I’m fine accepting the ticket, but until someone’s willing to actually work on it, I can’t call it a ‘High’ priority – it doesn’t affect many platforms or many people, and it’s the result of what amounts to a ridiculous design choice (cyclical dependencies).

It’s probably a decent bit of work to fix this, since Puppet does not allow cycles, but someone enterprising enough could probably make it happen.

#7 Updated by Mike Lococo about 6 years ago

It’s not clear to me how to specify a “related issue”, but this should be resolved as a side-effect of 2198 when that lands as long as the rpm and yum providers are handled appropriately. Circular deps are handled naturally when performed as batch operations in both rpm and yum, but until 2198 lands there’s no way to request a batch-operation except by manually coding an exec.

#8 Updated by Nigel Kersten over 5 years ago

  • Status changed from Accepted to Closed
  • Assignee set to Nigel Kersten

Added #2198 as a related issue.

I’m much more comfortable having this resolved as a side-effect of batching package operations than I am implementing a specific hack to deal with circular dependencies.

I’m going to close this issue in favor of #2198.

Also available in: Atom PDF