Issue #3156 has been updated by Peter Meier.

this is similar (or maybe even a dupe?) to #2198 . 

There have been some discussion about that on: 
http://groups.google.com/group/puppet-dev/browse_thread/thread/424b7cbfe52ccfd0/f1065d31cab567ef
 and 
http://groups.google.com/group/puppet-dev/browse_thread/thread/424b7cbfe52ccfd0/f1065d31cab567ef

Unfortunately track on the work got lost, as nobody commented on 
http://groups.google.com/group/puppet-dev/msg/12f918125efd898a

I would really appreciate this feature. I think that other resource-types might 
be able to be batched together as well, however packages are the most obvious 
to be done.

However for me it is clear that with the underlying graph only resources which 
have either no dependencies attached or only other deps of the same 
resource-type can be batched.

So I imagine 2 things:

1. batching resources of the same resource-type (which are batchable) with no 
other dependencies and which target the same state (such as absent or present) 
together and apply them in one shot.
2. doing some optimizations on the graph, which batches resources of the same 
resource-type targeting the same state together and hence apply them in one 
shot as well.

For the second one imagine the following manifest, which might be quite common:

<pre>
yumrepo{'somerepo':
  [...]
}

package{'rpmforge':
  [...],
  require => Yumrepo['somerepo'],
}

package{'some-service-package':
  [...],
  require => Package['rpmforge'],
}

file{'/etc/some-service.conf':
  [...],
  require => Package['some-service-package'],
  notify => Service['some-service'],
}

service{'some-service':
  [...],
}
</pre>

As far as I understood the graph that puppet builds (please correct me if I'm 
wrong) would look like:

<pre>
 Yumrepo{'somerepo'] -> Package['rpmforge'] -> Package['some-service-package'] 
-> File['/etc/some-service.conf'] -> Service['some-service']
</pre>

So what I imagine that this work on the graph would do the following:

<pre>
 Yumrepo{'somerepo'] -> BatchedPackage['rpmforge','some-service-package'] -> 
File['/etc/some-service.conf'] -> Service['some-service']
</pre>

which would apply @yum-cron@ and @some-service-package@ in one shot, if both 
would need to be applied.

For sure for both use-cases puppet should sort out the resources that wouldn't 
need to be applied and don't take any action on them, however I imagine that 
could be done within this batched-resource.

I think that the second use-case is harder to implement and as discussed in the 
previous discussion the first 1 would already be a good shot and also a solid 
basis for the second one.

Disclaimer: This is all based on how I understand the resource-graph that 
puppet builds, it can be that what I proposed can't be done, as I misunderstood 
something. Please, correct me if I'm wrong. Further I think that I might have 
missed some cases where this won't work.
----------------------------------------
Bug #3156: batchable yum and RPM transactions should be batched
http://projects.reductivelabs.com/issues/3156

Author: Michael DeHaan
Status: Unreviewed
Priority: High
Assigned to: 
Category: 
Target version: 
Affected version: 0.25.4
Keywords: performance yum rpm redhat fedora centos
Branch: 


For users mantaining systems with a lot of managed packages (such as desktop 
configurations), puppet runs can approach 30 minutes plus.

Most of this is due to yum being slow if run multiple times, and it is 
desirable to batch all yum invocations into single yum commands as much as 
possible.

It has been suggested that this also be done for rpmquery so as to not repeat 
it.

We should be able to walk the graph and move the yum/RPM opeartions together in 
a batchable way, and this would help tremendously with run time on 
RHEL/CentOS/Fedora.

(May offer similar savings WRT up2date, though IMHO yum on RHEL4 is a desirable 
practice if you are not a Satellite user.)



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://reductivelabs.com/redmine/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to