On Jun 9, 2010, at 10:46 PM, Nigel Kersten wrote:
So this was reasonably obvious on 0.25.x, but the master changes I'm
less sure about...
Basically the idea is that for debugging purposes we have a flag like
--exitonfail and we exit as soon as a resource fails to apply.
The whole transaction layer looks quite different now in master, and
I'm unsure where the appropriate place to exit is, so looking for some
guidance on where this would naturally fit.
The simple answer is to just exit at Transaction::Change.apply but
that doesn't feel right.
Is Transaction::ResourceHarness.apply_changes more appropriate? Or
should it break out there and propagate up? If so where should we
stop?
Transaction.apply ?
Resource::Catalog.apply ?
Application::Apply ?
Application.run ?
My recommendation is somewhere in Transaction - it can check the
resource status object of each resource once it's applied, and if the
status says there's a failure (and exit_on_fail is enabled) it can exit.
Having it anywhere else makes it difficult because either the exit
will get caught as an exception or there isn't enough information
available.
--
America believes in education: the average professor earns more money
in a year than a professional athlete earns in a whole week.
-- Evan Esar
---------------------------------------------------------------------
Luke Kanies -|- http://puppetlabs.com -|- +1(615)594-8199
--
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.