From: Sage Weil Date: Fri, 30 Apr 2021 15:10:38 +0000 (-0400) Subject: mgr/cephadm: set host crush location based on HostSpec X-Git-Tag: v17.1.0~2054^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2f2c997652539795845184f938a70e67d245705c;p=ceph.git mgr/cephadm: set host crush location based on HostSpec Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 4a8454e12840f..08813a4653d00 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -1400,6 +1400,15 @@ Then run the following: raise OrchestratorError('New host %s (%s) failed check(s): %s' % ( spec.hostname, spec.addr, errors)) + # prime crush map? + if spec.location: + self.check_mon_command({ + 'prefix': 'osd crush add-bucket', + 'name': spec.hostname, + 'type': 'host', + 'args': [f'{k}={v}' for k, v in spec.location.items()], + }) + self.inventory.add_host(spec) self.cache.prime_empty_host(spec.hostname) self.offline_hosts_remove(spec.hostname)