]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mplement ceph.created_pool
authorWarren Usui <warren.usui@inktank.com>
Sat, 23 Aug 2014 00:39:38 +0000 (17:39 -0700)
committerWarren Usui <warren.usui@inktank.com>
Sat, 23 Aug 2014 00:39:38 +0000 (17:39 -0700)
ceph.created_pool allows the user (via yaml lines) to add pools
that the ceph_manager knows about.

Fixes: 9091
Signed-off-by: Warren Usui <warren.usui@inktank.com>
tasks/ceph.py

index 07eb604ba9a02d237921efe805379264149369a7..b3e759b9ce68cfa313031fa2024b54a7a64d868e 100644 (file)
@@ -1038,6 +1038,17 @@ def wait_for_mon_quorum(ctx, config):
         time.sleep(1)
 
 
+def created_pool(ctx, config):
+    """
+    Add new pools to the dictionary of pools that the ceph-manager
+    knows about.
+    """
+    for new_pool in config:
+        if new_pool not in ctx.manager.pools:
+            ctx.manager.pools[new_pool] = ctx.manager.get_pool_property(
+                                          new_pool, 'pg_num')
+
 @contextlib.contextmanager
 def restart(ctx, config):
     """