return None
def _deploy_etc_ceph_ceph_conf(self, host: str) -> Optional[str]:
- ret, config, err = self.check_mon_command({
- "prefix": "config generate-minimal-conf",
- })
+ config = self.get_minimal_ceph_conf()
try:
with self._remote_connection(host) as tpl:
return f'failed to create /etc/ceph/ceph.conf on {host}: {str(e)}'
return None
+ def get_minimal_ceph_conf(self) -> str:
+ _, config, _ = self.check_mon_command({
+ "prefix": "config generate-minimal-conf",
+ })
+ return config
+
+
def _invalidate_daemons_and_kick_serve(self, filter_host=None):
if filter_host:
self.cache.invalidate_host_daemons(filter_host)
'entity': entity,
})
- # generate config
- ret, config, err = self.mgr.check_mon_command({
- "prefix": "config generate-minimal-conf",
- })
+ config = self.mgr.get_minimal_ceph_conf()
+
if extra_ceph_config:
config += extra_ceph_config
'entity': 'client.bootstrap-osd',
})
- # generate config
- ret, config, err = self.mgr.check_mon_command({
- "prefix": "config generate-minimal-conf",
- })
-
j = json.dumps({
- 'config': config,
+ 'config': self.mgr.get_minimal_ceph_conf(),
'keyring': keyring,
})