On Tue, Dec 21, 2010 at 5:54 AM, Stefan Schulte < [email protected]> wrote:
> Hi, > > I was working on implementing a service provider for #5197 when I had > the following thoughts: > > I can run ONE command to prefetch every service (running/stoppped, > enabled/disabled). This is great when I manage a lot of services and all > these services are in sync. I just have to run one command in a > prefetch method. But here is one problem: > > When I start a service gentoo will resolve dependencies and will > eventually start other services as well. If I'm managing these services too > puppet will try to start them eventhough they are already started > (because when I prefetched they were stopped). > > The same can happen for a package provider. When I implement a prefetch > method that detects two packages as absent, installing one package may > automatically install the other package and my prefetched ensure state > of that second package is outdated. > > For ticket #5197 I dont really know if I > - should not implement a prefetch method (I will run the same command > for every service just in case I have dependencies between them) > - don't care about this kind of dependencies because a) the user should > define them by using requires b) the user should not write a resource > definition for a service that is managed by another service anyways. > c) I dont mind when one service start command will fail because this > service was started in the meantime > - use prefetch but make sure that I refresh the property hash of all not > yet applied resources after each change (dont know how to archieve > that now) > > I would be interested in your oppinions/thoughts about that matter > I think the last option is the right one, but yes, you've identified a bunch of problems whenever Puppet has to interact with resources that have their own dependencies. I've just had a quick skim through and I can't seem to see any of our existing service providers doing this, but perhaps it's happening at a higher level above the actual service providers. > > -Stefan > -- You received this message because you are subscribed to the Google Groups "Puppet Developers" 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-dev?hl=en.
