Skip to content

Commit

Permalink
ceph_pool: set target size ratio on both 'on' and 'warn' mode
Browse files Browse the repository at this point in the history
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 <[email protected]>
(cherry picked from commit bb849a5)
  • Loading branch information
clwluvw authored and guits committed Jun 7, 2022
1 parent 4d3e25c commit 6c9b1e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/ceph_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,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',
Expand Down

0 comments on commit 6c9b1e1

Please sign in to comment.