From: Adam King Date: Wed, 3 Feb 2021 13:14:07 +0000 (-0500) Subject: mgr/orchestrator: useful message when no service type in "ceph orch apply" X-Git-Tag: v17.1.0~3045^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b68675b516292ed3a2fb7a9377723fe9049b54ea;p=ceph.git mgr/orchestrator: useful message when no service type in "ceph orch apply" Right now it just gives a traceback. A message telling users they have not provided a proper service type would be more useful Signed-off-by: Adam King --- diff --git a/src/pybind/mgr/orchestrator/module.py b/src/pybind/mgr/orchestrator/module.py index 534da49bde45..c6c566cbfffe 100644 --- a/src/pybind/mgr/orchestrator/module.py +++ b/src/pybind/mgr/orchestrator/module.py @@ -1099,7 +1099,8 @@ Usage: specs.append(spec) else: placementspec = PlacementSpec.from_string(placement) - assert service_type + if not service_type: + raise OrchestratorValidationError(usage) specs = [ServiceSpec(service_type.value, placement=placementspec, unmanaged=unmanaged, preview_only=dry_run)]