]> git.apps.os.sepia.ceph.com Git - ceph-ci.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:10:16 +0000 (15:10 +0000)
this adds the `--deploy-cephadm-agent` option to the cephadm
CLI's bootstrap subcommand.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit 4c3979788fccbe01ff23163ea61cbdf8f74d9cbd)

src/cephadm/cephadm.py

index 3b31fd049a591acaeadd949c2125ab0688cd3e58..313e52b49a680df213d52c2e8d61b48335a49c4e 100755 (executable)
@@ -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')