]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Merge PR #33817 into octopus
authorSage Weil <sage@redhat.com>
Thu, 12 Mar 2020 03:39:32 +0000 (22:39 -0500)
committerSage Weil <sage@redhat.com>
Thu, 12 Mar 2020 03:39:32 +0000 (22:39 -0500)
* refs/pull/33817/head:
mgr/dashboard: Adapt tests to new DriveGroupSpec
fixup mgr/test_orchestrator: validate drive group matches anything.
mgr/orch: CLI: No Tracebacks for ServiceSpecValidationError
mgr/test_orchestrator: validate drive group matches anything.
python-common: don't run flake8 on tests.
python-common: Add support for legacy serialization format for Drive Groups
doc: Move Move ServiceSpec to python-common
python-common: Add `host_pattern` to `PlacementSpec.from_string()`
cephadm: add host_pattern to supported scheduling
python-common: Joined ServiceSpec and DriveGroupSpec from_json()
python-common: Make DriveGroupSpec a sub type of ServiceSpec
pybind/mgr: Move ServiceSpec to python-common: Fix imports
python-common, orch: Move ServiceSpec to python-common: Fix imports
python-common, orch: Move ServiceSpec tests to python-common
python-common: Move ServiceSpec to python-common: fix linting
python-common, orch: Move ServiceSpec (+deps) to python-common

Reviewed-by: Joshua Schmid <jschmid@suse.de>
1  2 
src/pybind/mgr/cephadm/module.py
src/pybind/mgr/cephadm/tests/test_cephadm.py
src/pybind/mgr/cephadm/tests/test_scheduling.py
src/pybind/mgr/orchestrator/module.py

index 6f3851ee7d7db03307c52a63496e1d4bdc497846,5746089e5d3188203e2c7c0bf6667d738f92cb11..2b0b37edb034ab310bcf494e501f669c807fc02c
@@@ -2433,23 -2424,18 +2434,23 @@@ class CephadmOrchestrator(orchestrator.
          if spec.placement.is_empty():
              # fill in default placement
              defaults = {
-                 'mon': orchestrator.PlacementSpec(count=5),
-                 'mgr': orchestrator.PlacementSpec(count=2),
-                 'mds': orchestrator.PlacementSpec(count=2),
-                 'rgw': orchestrator.PlacementSpec(count=2),
-                 'rbd-mirror': orchestrator.PlacementSpec(count=2),
-                 'grafana': orchestrator.PlacementSpec(count=1),
-                 'alertmanager': orchestrator.PlacementSpec(count=1),
-                 'prometheus': orchestrator.PlacementSpec(count=1),
-                 'node-exporter': orchestrator.PlacementSpec(all_hosts=True),
-                 'crash': orchestrator.PlacementSpec(all_hosts=True),
+                 'mon': PlacementSpec(count=5),
+                 'mgr': PlacementSpec(count=2),
+                 'mds': PlacementSpec(count=2),
+                 'rgw': PlacementSpec(count=2),
+                 'rbd-mirror': PlacementSpec(count=2),
+                 'grafana': PlacementSpec(count=1),
+                 'alertmanager': PlacementSpec(count=1),
+                 'prometheus': PlacementSpec(count=1),
+                 'node-exporter': PlacementSpec(all_hosts=True),
+                 'crash': PlacementSpec(all_hosts=True),
              }
              spec.placement = defaults[spec.service_type]
 +        elif spec.service_type in ['mon', 'mgr'] and \
 +             spec.placement.count is not None and \
 +             spec.placement.count < 1:
 +            raise OrchestratorError('cannot scale %s service below 1' % (
 +                spec.service_type))
          self.log.info('Saving service %s spec with placement %s' % (
              spec.service_name(), spec.placement.pretty_str()))
          self.spec_store.save(spec)
Simple merge