From: Sage Weil Date: Mon, 22 Jul 2019 20:29:26 +0000 (-0500) Subject: mon/FSCommands: set pg_autoscale_factor on 'fs new', not via mgr/volumes X-Git-Tag: v15.1.0~2095^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=5a827e3a52670bf5dad30d881f52321a8c7e4ce3;p=ceph-ci.git mon/FSCommands: set pg_autoscale_factor on 'fs new', not via mgr/volumes Signed-off-by: Sage Weil --- diff --git a/src/mon/FSCommands.cc b/src/mon/FSCommands.cc index 86cde4ad181..38f677d417f 100644 --- a/src/mon/FSCommands.cc +++ b/src/mon/FSCommands.cc @@ -257,6 +257,9 @@ class FsNewHandler : public FileSystemCommandHandler mon->osdmon()->do_set_pool_opt(metadata, pool_opts_t::RECOVERY_PRIORITY, static_cast(5)); + mon->osdmon()->do_set_pool_opt(metadata, + pool_opts_t::PG_AUTOSCALE_BIAS, + static_cast(4.0)); mon->osdmon()->propose_pending(); // All checks passed, go ahead and create. diff --git a/src/pybind/mgr/volumes/fs/volume.py b/src/pybind/mgr/volumes/fs/volume.py index e3e4501c252..b97a8f88ed9 100644 --- a/src/pybind/mgr/volumes/fs/volume.py +++ b/src/pybind/mgr/volumes/fs/volume.py @@ -200,7 +200,7 @@ class VolumeClient(object): """ return ve.to_tuple() - def create_pool(self, pool_name, pg_num, pg_num_min=None, pg_autoscale_factor=None): + def create_pool(self, pool_name, pg_num, pg_num_min=None): # create the given pool command = {'prefix': 'osd pool create', 'pool': pool_name, 'pg_num': pg_num} if pg_num_min: @@ -209,11 +209,6 @@ class VolumeClient(object): if r != 0: return r, outb, outs - # set pg autoscale if needed - if pg_autoscale_factor: - command = {'prefix': 'osd pool set', 'pool': pool_name, 'var': 'pg_autoscale_bias', - 'val': str(pg_autoscale_factor)} - r, outb, outs = self.mgr.mon_command(command) return r, outb, outs def remove_pool(self, pool_name): @@ -258,7 +253,7 @@ class VolumeClient(object): """ metadata_pool, data_pool = self.gen_pool_names(volname) # create pools - r, outs, outb = self.create_pool(metadata_pool, 16, pg_num_min=16, pg_autoscale_factor=4.0) + r, outs, outb = self.create_pool(metadata_pool, 16, pg_num_min=16) if r != 0: return r, outb, outs r, outb, outs = self.create_pool(data_pool, 8)