Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cells+dcache: fix Reply handling in batch processing
Motivation: A command may return a DelayedReply; such commands will (likely) return before they have completed. There are various places where a list of commands is used to establish state, batch and setup files being two examples. In some cases, these list of commands have commands that rely on a previous command completing; for example, establishing a new mover queue and configuring the job timeout for that queue. Currently, if a command relies on an earlier command that returns a DelayedReply then there is a race-condition. Modification: Update list-of-command executing code so that they check whether the returned object is a DelayedReply; if so, the execution of that command will block until the result becomes available. A side effect of this patch is that if a batch script calls a command that returns a DelayedReply and that command throws a declared exception then with this patch, that command invocation is considered a error and the behaviour described by the "onerror" command is honoured. Note that this patch is a stop-gap solution; the real solution would involve refactoring Reply to support a blocking call. Result: Batch files are executed in strict order. Some possible command failures are correctly considered an error. Target: master Request: 3.0 Request: 2.16 Require-notes: yes Require-book: no Fixes: #2943 Patch: https://rb.dcache.org/r/9940/ Acked-by: Gerd Behrmann Acked-by: Tigran Mkrtchyan
- Loading branch information