Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
}
return features
+ @_hide_in_features
+ def cancel_completions(self):
+ # type: () -> None
+ """
+ Cancels ongoing completions. Unstuck the mgr.
+ """
+ raise NotImplementedError()
+
def add_host(self, host):
# type: (str) -> Completion
"""
return HandleCommandResult(-errno.EINVAL, stderr="Module '{0}' not found".format(module_name))
+ @_write_cli('orchestrator cancel',
+ desc='cancels ongoing operations')
+ def _cancel(self):
+ """
+ ProgressReferences might get stuck. Let's unstuck them.
+ """
+ self.cancel_completions()
+ return HandleCommandResult()
+
@orchestrator._cli_read_command(
'orchestrator status',
desc='Report configured backend and its status')
self._shutdown.wait(5)
+ def cancel_completions(self):
+ for p in self.all_progress_references:
+ p.fail()
+ self.all_progress_references.clear()
+
@deferred_read
def get_inventory(self, node_filter=None, refresh=False):
node_list = None