From: Sage Weil Date: Sat, 29 Feb 2020 16:50:42 +0000 (-0600) Subject: cephadm: do not magically deploy 'crash' container X-Git-Tag: v15.1.1~167^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1ad9291337e1ed8ac00df64f7e5926017cee7af1;p=ceph-ci.git cephadm: do not magically deploy 'crash' container We'll soon do this explicitly with a persistent spec instead. Signed-off-by: Sage Weil --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 0fc9c1ac678..7c97fb4b54f 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -1496,14 +1496,6 @@ def install_base_units(fsid): } """ % fsid) -def deploy_crash(fsid, uid, gid, config, keyring): - # type: (str, int, int, str, str) -> None - crash_dir = os.path.join(args.data_dir, fsid, 'crash') - makedirs(crash_dir, uid, gid, DATA_DIR_MODE) - c = get_container(fsid, 'crash', get_hostname()) - deploy_daemon(fsid, 'crash', get_hostname(), c, uid, gid, - config, keyring) - def get_unit_file(fsid, uid, gid): # type: (str, int, int) -> str install_path = find_program('install') @@ -1952,11 +1944,6 @@ def command_bootstrap(): mgr_c = get_container(fsid, 'mgr', mgr_id) deploy_daemon(fsid, 'mgr', mgr_id, mgr_c, uid, gid, config, mgr_keyring) - # crash unit - logger.info('Creating crash agent...') - deploy_crash(fsid, uid, gid, config, - '[client.crash.%s]\n\tkey = %s\n' % (hostname, crash_key)) - # output files with open(args.output_keyring, 'w') as f: os.fchmod(f.fileno(), 0o600) @@ -2112,9 +2099,6 @@ def command_deploy(): osd_fsid=args.osd_fsid, reconfig=args.reconfig) - if crash_keyring and not args.reconfig: - deploy_crash(args.fsid, uid, gid, config, crash_keyring) - elif daemon_type in Monitoring.components: # monitoring daemon - prometheus, grafana, alertmanager, node-exporter monitoring_args = [] # type: List[str] diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index d3b0f291cc6..3645b99e7bd 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -2019,21 +2019,9 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule): if extra_config: config += extra_config - if daemon_type != 'crash': - # crash_keyring - ret, crash_keyring, err = self.mon_command({ - 'prefix': 'auth get-or-create', - 'entity': 'client.crash.%s' % host, - 'caps': ['mon', 'profile crash', - 'mgr', 'profile crash'], - }) - else: - crash_keyring = None - j = json.dumps({ 'config': config, 'keyring': keyring, - 'crash_keyring': crash_keyring, }) extra_args.extend(['--config-and-keyrings', '-'])