[Re-sending for 2.12, sorry for the mistake.] Since the 'forkProcess' call is sometimes failing mysteriously (probably due forking a multi-threading process), retry it up to 3 times.
We only retry if the first socket communication with the child process fails. If there is an error later, we proceed as usual, marking the job as failed. (Also retrying in the case of any error could result in spawning multiple processes for the same job.) Petr Pudlak (2): Add a module with utility functions for MonadPlus operations Retry forking a new process several times Makefile.am | 1 + src/Ganeti/Query/Exec.hs | 93 +++++++++++++++++++++++++------------------ src/Ganeti/Utils/MonadPlus.hs | 42 +++++++++++++++++++ 3 files changed, 98 insertions(+), 38 deletions(-) create mode 100644 src/Ganeti/Utils/MonadPlus.hs -- 1.9.1.423.g4596e3a
