]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #37135 from sebastian-philipp/cephadm-race-add-host-vs-apply
authorJoshua Schmid <jschmid@suse.de>
Fri, 18 Sep 2020 08:55:17 +0000 (10:55 +0200)
committerGitHub <noreply@github.com>
Fri, 18 Sep 2020 08:55:17 +0000 (10:55 +0200)
mgr/cephadm: Fix race between host_add and _apply_all_specs

1  2 
src/pybind/mgr/cephadm/module.py
src/pybind/mgr/cephadm/services/osd.py
src/pybind/mgr/cephadm/tests/test_cephadm.py
src/python-common/ceph/deployment/service_spec.py

index 0632f1e68efeb3f0a64e57aba4b6f495d46121ae,fc725bb5370244b41f5c6c7ec326c263a22d61ca..8becef0b332a81c7695a3f66cb6eb9418576c674
@@@ -2387,11 -2365,9 +2400,9 @@@ To check that the host is reachable
      @trivial_completion
      def add_mgr(self, spec):
          # type: (ServiceSpec) -> List[str]
 -        return self._add_daemon('mgr', spec, self.mgr_service.create)
 +        return self._add_daemon('mgr', spec, self.mgr_service.prepare_create)
  
      def _apply(self, spec: GenericSpec) -> str:
-         self.migration.verify_no_migration()
          if spec.service_type == 'host':
              return self._add_host(cast(HostSpec, spec))