]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk: set '--cluster=ceph' in 'prepare' subcommand 4367/head
authorKefu Chai <kchai@redhat.com>
Wed, 15 Apr 2015 07:55:42 +0000 (15:55 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 15 Apr 2015 08:07:28 +0000 (16:07 +0800)
otherwise the 'ceph' default value won't be catched by "main_prepare()",
this breaks TEST_corrupt_and_repair_replicated. seems the behaviour
was changed in python 2.7.9, so we move the default value to where
the '--cluster' argument is added instead of setting it in the
main argument parser.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/ceph-disk

index 5bc161dc92ecce785b1b7662ce30d18e126bbfc6..df48a2a9c675a3f8d270c9ebea1e210db43ee4e3 100755 (executable)
@@ -2773,7 +2773,6 @@ def parse_args():
     parser.set_defaults(
         # we want to hold on to this, for later
         prog=parser.prog,
-        cluster='ceph',
         )
 
     subparsers = parser.add_subparsers(
@@ -2786,6 +2785,7 @@ def parse_args():
     prepare_parser.add_argument(
         '--cluster',
         metavar='NAME',
+        default='ceph',
         help='cluster name to assign this disk to',
         )
     prepare_parser.add_argument(