From: Sage Weil Date: Sat, 29 Feb 2020 21:55:40 +0000 (-0600) Subject: mgr/cephadm: catch and log exceptions from apply X-Git-Tag: v15.1.1~191^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1d4e683b6c9f475232e8e70eb7b776ddb440da57;p=ceph.git mgr/cephadm: catch and log exceptions from apply Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index c39c9abc34c4..a415568bdd35 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -2813,7 +2813,11 @@ receivers: specs = self.spec_store.find(service_name) completions = list() for spec in specs: - completions.append(func(spec)) + try: + completions.append(func(spec)) + except Exception as e: + self.log.warning('Failed to apply %s spec %s: %s' % ( + service_name, spec, e)) if completions: return completions return [trivial_result("Nothing to do..")]