From: Sage Weil Date: Fri, 21 Feb 2020 16:57:16 +0000 (-0600) Subject: mgr/orch: remove label: prefix when parsing placementspec X-Git-Tag: v15.1.1~282^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4a14f9c2724b894a1b218fb7ad0f7c81a52c8855;p=ceph.git mgr/orch: remove label: prefix when parsing placementspec Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/orchestrator/_interface.py b/src/pybind/mgr/orchestrator/_interface.py index 59fa605f85c3..30347796973b 100644 --- a/src/pybind/mgr/orchestrator/_interface.py +++ b/src/pybind/mgr/orchestrator/_interface.py @@ -1246,7 +1246,7 @@ class PlacementSpec(object): strings.remove('all:true') hosts = [x for x in strings if x != '*' and 'label:' not in x] - labels = [x for x in strings if 'label:' in x] + labels = [x[6:] for x in strings if 'label:' in x] if len(labels) > 1: raise OrchestratorValidationError('more than one label provided: {}'.format(labels))