]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: add new option to CLI
authorGuillaume Abrioux <gabrioux@ibm.com>
Mon, 23 Oct 2023 13:42:09 +0000 (13:42 +0000)
committerGuillaume Abrioux <gabrioux@ibm.com>
Thu, 25 Jan 2024 15:07:20 +0000 (15:07 +0000)
this adds the `--deploy-cephadm-agent` option to the cephadm
CLI's bootstrap subcommand.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
src/cephadm/cephadm.py

index ec0dca656115a2f82d446199d49a1f0061747547..e65e837d9f3d6cca29cafb2de3e89b7cc86208b7 100755 (executable)
@@ -2969,6 +2969,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
 
 ##################################
@@ -5328,6 +5332,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')