]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
[RM-12374] Pass mon host list from ceph.conf to mon_create 328/head
authorTravis Rhoden <trhoden@redhat.com>
Thu, 16 Jul 2015 21:48:33 +0000 (14:48 -0700)
committerTravis Rhoden <trhoden@redhat.com>
Thu, 16 Jul 2015 21:48:33 +0000 (14:48 -0700)
When using mon_create_initial(), we already have list of initial mon
members from the config file.  Pass it to mon_create() in args.mon
so that mon_create() does not throw an exception when it finds that
args.mon does not exist.

This is actually an optimization as well. mon_create_initial() always
looked up mon_initial_members from the config file, but didn't pass that
to mon_create().  mon_create() would then see that args.mon was empty
and then look up mon_initial_members *again*.  Now we only need to open
and read the file once.

Fixes: #12374
Signed-off-by: Travis Rhoden <trhoden@redhat.com>
ceph_deploy/mon.py

index 93ede58a1837ee170b098dabd98a2e568dfbe7e6..8de59daebd0f3b233a2bef06b2c0a4ca95c6db85 100644 (file)
@@ -395,6 +395,7 @@ def mon_create_initial(args):
     mon_initial_members = get_mon_initial_members(args, error_on_empty=True)
 
     # create them normally through mon_create
+    args.mon = mon_initial_members
     mon_create(args)
 
     # make the sets to be able to compare late