Dynflow - how to abort if a plan_action plan fails?

@inecas,

I have a plan() that does some setup and validation that should block proceeding any further planning (this is in Actions::Katello::System::Create[1]), how do I do this? Calling 'fail' with the error message does not cancel the current plan.

[1] https://github.com/Katello/katello/blob/master/app/lib/actions/katello/system/create.rb#L23

··· -- @thomasmckay


“The leader must aim high, see big, judge widely, thus setting himself apart form the ordinary people who debate in narrow confines.” ~ Charles De Gaulle

“Leadership is about making others better as a result of your presence and making sure that impact lasts in your absence.” ~ Harvard Business School

So is this a problem, that some planing happens even when some previous fail already occurred?

That might be just behaviour that is in Dynflow right now. Probably would be better to not perform any additional planning, so we can fix that to work that way. Anyway, at the end it should not matter that much, as the plan phase is wrapped in db transation, and it should not proceed with execution, ending up with execution plan in stopped state with error result, but no actual inconsistency in the data.

– Ivan

··· ----- Original Message ----- > > @inecas, > > I have a plan() that does some setup and validation that should block > proceeding any further planning (this is in > Actions::Katello::System::Create[1]), how do I do this? Calling 'fail' with > the error message does not cancel the current plan. > > [1] > https://github.com/Katello/katello/blob/master/app/lib/actions/katello/system/create.rb#L23 > > -- > @thomasmckay > > -- > "The leader must aim high, see big, judge widely, thus setting himself apart > form the ordinary people who debate in narrow confines." ~ Charles De Gaulle > > "Leadership is about making others better as a result of your presence and > making sure that impact lasts in your absence." ~ Harvard Business School > > -- > You received this message because you are subscribed to the Google Groups > "foreman-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to foreman-dev+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. >