]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: make --cleanup-on-failure False by default 53864/head
authorAdam King <adking@redhat.com>
Fri, 6 Oct 2023 18:59:49 +0000 (14:59 -0400)
committerAdam King <adking@redhat.com>
Tue, 10 Oct 2023 17:03:38 +0000 (13:03 -0400)
It was agreed when implementing the bootstrap
cleanup that it would be backported but default
to being off in those backports. On main, and later
the squid release, it will default to being on.

This commit is for the backport to change it to
default to being off

Signed-off-by: Adam King <adking@redhat.com>
src/cephadm/cephadm.py

index 081870fb0b8c37c42d2fe1c0799b6e8d23b8b20e..b9a441f8bec6b6e9554dca06ffb6cd66626d21cc 100755 (executable)
@@ -6103,7 +6103,7 @@ def rollback(func: FuncT) -> FuncT:
                 logger.info('\n\n'
                             '\t***************\n'
                             '\tCephadm hit an issue during cluster installation. Current cluster files will be deleted automatically,\n'
-                            '\tto disable this behaviour you can pass the --no-cleanup-on-failure flag. In case of any previous\n'
+                            '\tto disable this behaviour do not pass the --cleanup-on-failure flag. In case of any previous\n'
                             '\tbroken installation user must use the following command to completely delete the broken cluster:\n\n'
                             '\t> cephadm rm-cluster --force --zap-osds --fsid <fsid>\n\n'
                             '\tfor more information please refer to https://docs.ceph.com/en/latest/cephadm/operations/#purging-a-cluster\n'
@@ -10307,23 +10307,11 @@ def _get_parser():
         '--allow-overwrite',
         action='store_true',
         help='allow overwrite of existing --output-* config/keyring/ssh files')
-    # following logic to have both '--cleanup-on-failure' and '--no-cleanup-on-failure'
-    # has been included in argparse of python v3.9, however since we have to support
-    # older python versions the following is more generic. Once python v3.9 becomes
-    # the minium supported version we can implement the same by using the new option
-    # argparse.BooleanOptionalAction
-    group = parser_bootstrap.add_mutually_exclusive_group()
-    group.add_argument(
+    parser_bootstrap.add_argument(
         '--cleanup-on-failure',
         action='store_true',
-        default=True,
+        default=False,
         help='Delete cluster files in case of a failed installation')
-    group.add_argument(
-        '--no-cleanup-on-failure',
-        action='store_const',
-        const=False,
-        dest='cleanup_on_failure',
-        help='Do not delete cluster files in case of a failed installation')
     parser_bootstrap.add_argument(
         '--allow-fqdn-hostname',
         action='store_true',