LUs may override this method if they know how to prepare for an internal retry after temporarily being out of resources.
Signed-off-by: Klaus Aehlig <[email protected]> --- lib/cmdlib/base.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/cmdlib/base.py b/lib/cmdlib/base.py index dc8a264..31f65d2 100644 --- a/lib/cmdlib/base.py +++ b/lib/cmdlib/base.py @@ -354,6 +354,18 @@ class LogicalUnit(object): # pylint: disable=R0902 else: raise NotImplementedError + def PrepareRetry(self, _feedback_fn): + """Prepare the LU to run again. + + This method is called if the Exec failed for temporarily lacking resources. + It is expected to change the state of the LU so that it can be tried again, + and also change its locking policy to acquire more resources to have a + better chance of suceeding in the retry. + + """ + # pylint: disable=R0201 + raise errors.OpRetryNotSupportedError() + def BuildHooksEnv(self): """Build hooks environment for this LU. -- 2.1.0.rc2.206.gedb03e5
