From 49186299743db6f86d752addd467230f23f395fb Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Mon, 23 Oct 2023 13:42:09 +0000 Subject: [PATCH] cephadm: add new option to CLI this adds the `--deploy-cephadm-agent` option to the cephadm CLI's bootstrap subcommand. Signed-off-by: Guillaume Abrioux (cherry picked from commit 4c3979788fccbe01ff23163ea61cbdf8f74d9cbd) --- src/cephadm/cephadm.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/cephadm/cephadm.py b/src/cephadm/cephadm.py index 3b31fd049a5..313e52b49a6 100755 --- a/src/cephadm/cephadm.py +++ b/src/cephadm/cephadm.py @@ -6493,6 +6493,10 @@ def command_bootstrap(ctx): 'For more information see:\n\n' '\thttps://docs.ceph.com/en/latest/mgr/telemetry/\n') logger.info('Bootstrap complete.') + + if getattr(ctx, 'deploy_cephadm_agent', None): + cli(['config', 'set', 'mgr', 'mgr/cephadm/use_agent', 'true']) + return ctx.error_code ################################## @@ -10492,6 +10496,10 @@ def _get_parser(): '--log-to-file', action='store_true', help='configure cluster to log to traditional log files in /var/log/ceph/$fsid') + parser_bootstrap.add_argument( + '--deploy-cephadm-agent', + action='store_true', + help='deploy the cephadm-agent') parser_deploy = subparsers.add_parser( 'deploy', help='deploy a daemon') -- 2.39.5