Feature #2198

Install multiple package within a single call to the package manager

Added by Stéphan Gorget about 3 years ago. Updated 5 days ago.

Status:In Topic Branch Pending Review Start date:04/25/2009
Priority:Normal Due date:
Assignee:Nick Lewis % Done:

0%

Category:transactions
Target version:2.7.x
Affected Puppet version:0.25.0 Branch:http://github.com/phantez/puppet/commit/51ff88c950c172e6060ae63c1c71968e7898b462
Keywords:communitypatch
Votes: 31

Description

During the configuration applying process the package manager is called for each package installation. It is possible to reduce the number of calls to the package manager by gathering package installation and delayed some package installation. Naturally, this modification should not break the dependency graph.


Related issues

related to Puppet - Bug #3156: batchable yum and RPM transactions should be batched Needs More Information 02/06/2010
related to Puppet - Feature #4983: Remove packages at same time Duplicate 10/11/2010
related to Puppet - Bug #1935: Unable to handle 2 packages with a circular dependency Closed 02/05/2009
duplicated by Puppet - Feature #4797: Providers should be able to process more than one resourc... Duplicate 09/16/2010
duplicated by Puppet - Bug #4846: uninstalling packages gives failed dependencies errors Duplicate 09/27/2010

History

Updated by Luke Kanies about 3 years ago

  • Category set to transactions
  • Status changed from Unreviewed to Accepted

Updated by Stéphan Gorget about 3 years ago

I’d like this feature request to be assigned to me.

Updated by James Turnbull about 3 years ago

  • Assignee set to Stéphan Gorget
  • Target version set to 4

Updated by Stéphan Gorget about 3 years ago

  • Status changed from Accepted to Needs Decision

Discussion about implementation and architecture design : http://groups.google.com/group/puppet-dev/browse_thread/thread/584c9db44f5e2253

Updated by Stéphan Gorget almost 3 years ago

Comments about implementation : http://groups.google.com/group/puppet-dev/browse_thread/thread/424b7cbfe52ccfd0

Updated by James Turnbull over 2 years ago

Stephan – is this code current – any updates to it?

Updated by Stéphan Gorget over 2 years ago

The last update is here : http://github.com/phantez/puppet/tree/features/master/2198 But I guess many changes have be done on resource transactions and the code might have to be updated.

Updated by Stéphan Gorget over 2 years ago

I’ve just rebased the branch against master (no conflict appeared) but I haven’t test that the patch is still working. (I no longer have CentOS/RedHat based OS around me)

Updated by Stéphan Gorget about 2 years ago

Is there still someone interested by this patch ? I’ve now some time to go over it and rewrite it. The patch can be found here : http://github.com/phantez/puppet/commit/51ff88c950c172e6060ae63c1c71968e7898b462 and here : http://groups.google.com/group/puppet-dev/browse_thread/thread/424b7cbfe52ccfd0

I’ll be pleased to have some comments and help.

Updated by Peter Meier about 2 years ago

Is there still someone interested by this patch ? I’ve now some time to go over it and rewrite it.

yes, I think it would be usefull!

Updated by Peter Meier about 2 years ago

you might want to have as well a look at #3156

Updated by Nigel Kersten about 2 years ago

absolutely this would be useful!

Updated by Stéphan Gorget about 2 years ago

I’ve tried the patch rebased on the master and it is still working fine on CentOS 5.4


package { “w3m”: ensure => installed, combine => true, } package { “elinks”: ensure => installed, combine => true, } package { “lynx”: ensure => installed, combine => true,

}

The patch is only active when combine is defined. If not, the classical behaviour will applied.

The modified behaviour is that each time a transaction has to occur on an element that implement combine it looks in the dependency graph and if an other element has the combine argument and its dependency is in a state that make it possible to applied it, and then the elements are combined. It only gather packages that can be installed (dependency graph resolved and ok) and that has the combine flag set to true

Updated by Stéphan Gorget about 2 years ago

I need someone to review the patch and tell me what have to be improved or rethink to make it acceptable. I have not resend it on the mailing list it is already there : http://groups.google.com/group/puppet-dev/browse_thread/thread/424b7cbfe52ccfd0

Updated by Mike Lococo about 2 years ago

Any progress on reviewing this patch? Being able to batch package transactions would also solve Bug #1935 as a side effect.

Updated by Nigel Kersten over 1 year ago

ugh. How did this slip by for so long? Reminder being sent on dev list.

Updated by Matt Robinson over 1 year ago

  • Status changed from Needs Decision to In Topic Branch Pending Review
  • Keywords set to communitypatch
  • Branch set to http://github.com/phantez/puppet/commit/51ff88c950c172e6060ae63c1c71968e7898b462

Making this easily to find in the backlog of community patches to review.

Updated by James Turnbull over 1 year ago

  • Target version changed from 4 to 2.7.x

Updated by Nigel Kersten about 1 year ago

Did we test this? I didn’t see it get merged in.

Updated by Stéphan Gorget old account about 1 year ago

It has not been merged yet and I don’t think someone has tested it since I rebased one year ago. Nobody contacted me.

Updated by Stéphan Gorget about 1 year ago

Updated with the wrong account, but if you have questioned don’t hesitate to contact me.

Updated by Nigel Kersten about 1 year ago

I’m sorry Stephan, I’ll make sure this is chased up.

Updated by John Florian 11 months ago

Any plans for this to make it into a release? Will this ‘combine’ feature work for package removal as well?

After looking at #1935, #2833 and #3707, all paths seem to lead here. RHEL is purportedly the most popular enterprise Linux and that means yum/rpm is the most popular package provider in the enterprise.

It appears that lots of people are hacking up Exec resources to work around this deficiency.

Updated by Nigel Kersten 11 months ago

erk. This is completely my fault. I was incorrectly filtering and failed to chase it up.

Updated by Mike Lococo 9 months ago

RPM circular deps came up on the mailing list again, and will be resolved as a side-effect when this feature lands: http://groups.google.com/group/puppet-users/browse_thread/thread/610cba4ead88480a/

Please please please review and merge this patch unless it causes puppet to punch you in the nose on every run. * It has a patch submitted (and has had one for 2-years). * With 16 votes it’s the fifth top-voted issue in the bug-tracker. * It’s the oldest issue in the top-5. * If I read the history correctly, it’s simply been awaiting patch review this whole time. No technical objection has been identified at this point, it may be ready for merge today if it gets the right pair of eyeballs on it. But I suppose it’s more likely that it will need a third-cleanup because it’s been bit-rotting so long.

Please merge, between circular deps and the performance improvements of batched transactions, this is a much desired feature that consistently hits the mailing list every few months.

Updated by Michael Rooney 7 months ago

This would be fantastic indeed, and save us a lot of time on spin-ups. Looking at the linked branch, I notice it seems to only add support for this to yum; it would be great to get this in for apt at the same time if possible! Let me know if I can be of any help there.

Updated by Janardhan Molumuri 7 months ago

Recently I was looking at the same feature and I was tempted to write something similar but found that there is already a patch available.

This patch will be really useful. Puppet team, Do you have any timelines on when this will be integrated into the upstream?

Updated by Bill Tong 6 months ago

This bug is causing problems with a puppet deployment of mine.

The idea is that puppet takes control once the minimal base system has been installed. The need for puppet to run three thousand separate transactions rather than one transaction is causing a lot of grief at the moment.

An ETA on this would be really helpful. Thanks a lot.

Updated by Nick Lewis 6 months ago

  • Assignee changed from Stéphan Gorget to Nick Lewis

I’ll have a look at this, and see what’s happened in the… long… time since it was submitted. Given the changes we’ve recently made around dynamically traversing the graph and deferring resources, I would really like to finally make this go.

Updated by Bill Tong 3 months ago

Thanks.

Updated by Joshua Hoblitt 3 months ago

I’ve run into problems with circular dependencies when trying to uninstall packages that are part of RHEL6.x @base. I haven’t seen any discussion of what’s holding up merging this patch (I haven’t tried it myself yet). Could summarize in this ticket what the problems with the patch are?

Updated by Ryan Conway 3 months ago

Came across this when trying to debug a series of related packages, and thought I would also up-vote.

Does anyone know what the hold up is with merging? If its close to being released, would be great to hear, as I need to either put in a temporary hack using an Exec or make a larger change if we’re unlikely to see this released within say the next month?

Any ideas?

Ta!

Updated by Daniel Pittman 3 months ago

Ryan Conway wrote:

Came across this when trying to debug a series of related packages, and thought I would also up-vote.

Does anyone know what the hold up is with merging? If its close to being released, would be great to hear, as I need to either put in a temporary hack using an Exec or make a larger change if we’re unlikely to see this released within say the next month?

Really, what needs to happen with this is that someone grabs it, checks that it actually works with the next major release, and turns it into a formal pull request to get it reviewed, as documented in http://github.com/puppetlabs/puppet/tree/master/CONTRIBUTING.md

The last time this was looked at predated my time leading the platform team, and it wasn’t on the list of “active” tickets at that point, so it dropped from sight, unfortunately. Worse, we are unlikely to get time to look at it ourselves – and work out if, for example, the API extension is sufficient to meet more than just “install packages in a batch” needs, ensure it doesn’t violate any ordering constraints, and so forth.

Absent any other action we will absolutely get around to looking at this, but it isn’t likely to happen on the platform team side any time soon, I fear.

Updated by Stéphan Gorget 3 months ago

The transaction.rb has changed a lot since I worked on this patch and the apply_changes function does not exist anymore. This was where the magic used to happen. Actually, this patch was written for 0.24.x and 0.25.x in june 2009 and I think that it will be more easy to rewrite the patch completely than to try to merge it into the next version of puppet.

If someone is interested to rewrite it, I will be happy to help.

Also available in: Atom PDF