]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph_pool: set target size ratio on both 'on' and 'warn' mode
authorSeena Fallah <seenafallah@gmail.com>
Mon, 25 Apr 2022 22:07:28 +0000 (00:07 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 2 Jun 2022 07:13:22 +0000 (09:13 +0200)
when we set target_size_ratio to warn it means that the administrator wants to get suggestion from the mgr module but apply it manually when he/she wants. So it's in the same approach as 'on' mode just triggered by hand.
So there is no need to set pg_num when target_size_ratio is 'warn' and the mgr module will calculate the correct pg_num and the administrator will adjust it whenever he/she wants.

It is the same approach that was in #6471

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit bb849a55861e3900362ec46e68a02754b2c892ec)

library/ceph_pool.py

index 0028282217b83c22fb7414030ee6a94a50478161..7191c4ab4205e411e608673e8e10149ba61cd019 100644 (file)
@@ -446,7 +446,7 @@ def create_pool(cluster,
     args = ['create', user_pool_config['pool_name']['value'],
             user_pool_config['type']['value']]
 
-    if user_pool_config['pg_autoscale_mode']['value'] != 'on':
+    if user_pool_config['pg_autoscale_mode']['value'] == 'off':
         args.extend(['--pg_num',
                      user_pool_config['pg_num']['value'],
                      '--pgp_num',