Forum Discussion

nrgraham23_3188's avatar
nrgraham23_3188
Historic F5 Account
Sep 08, 2017

transaction partial runs

Is it possible to partially run a transaction, run some checks, then add more calls to the same transaction?

 

I will have several sets of iControlRest calls that may or may not fire based on a conditional. Each set of calls will be associated with its own conditional statement, and previous sets of calls may affect the outcome of future conditional checks.

 

For example, lets say the first conditional checks if a pool exists. If it does, it adds node1 to it. The next conditional checks if node1 is part of a pool. If it is not part of a pool, it deletes it.

 

There may be many of these types of checks and calls, there may be multiple calls per check or vice versa. I do not know what calls or checks will be made ahead of time (they will be user generated).

 

I need to be able to undo all of the calls made if any of them fail so as not to leave the system in a strange state. I cannot use a transaction in the traditional way because I need to check the conditional for the next set of calls before calling them.

 

If it is not possible to partially run a transaction, is it possible to set a point before the calls begin executing, then if a call fails, roll back to that point, or something along those lines?

 

Thanks.

 

1 Reply