]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: Change default upmap_max_deviation to 5 32586/head
authorDavid Zafman <dzafman@redhat.com>
Sat, 14 Dec 2019 01:43:44 +0000 (17:43 -0800)
committerDavid Zafman <dzafman@redhat.com>
Fri, 10 Jan 2020 04:06:33 +0000 (20:06 -0800)
Fixes: https://tracker.ceph.com/issues/43312
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit b0a1b758d012dfea40db3feca1a841c96f79defe)

Conflicts:
src/pybind/mgr/balancer/module.py (default isn't in COMMANDS section)
        qa/standalone/mgr/balancer.sh (setting upmap_max_deviations to 1 differ)
        src/test/cli/osdmaptool/missing-argument.t (usage included here)

doc/man/8/osdmaptool.rst
doc/rados/operations/upmap.rst
qa/standalone/mgr/balancer.sh
src/pybind/mgr/balancer/module.py
src/test/cli/osdmaptool/help.t
src/test/cli/osdmaptool/missing-argument.t
src/test/cli/osdmaptool/upmap-out.t
src/test/cli/osdmaptool/upmap.t
src/tools/osdmaptool.cc

index 23f415d1da1aecb228786db42fd744188a269544..d5c0c7788b690ee726707cf649dffe403efb051c 100644 (file)
@@ -92,7 +92,7 @@ Options
 
 .. option:: --upmap-deviation <max-deviation>
 
-   max deviation from target [default: 1]
+   max deviation from target [default: 5]
 
 .. option:: --upmap-pool <poolname>
 
index 3fe65ea8d6f33aaeedce7eff1b3c60effb0239e1..8bad0d9592859260454bd008d1be48eb8e8fb34f 100644 (file)
@@ -58,7 +58,7 @@ Upmap entries are updated with an offline optimizer built into ``osdmaptool``.
    If it cannot find any additional changes to make it will stop early
    (i.e., when the pool distribution is perfect).
 
-   The ``max-deviation`` value defaults to `1`.  If an OSD PG count
+   The ``max-deviation`` value defaults to `5`.  If an OSD PG count
    varies from the computed target number by less than or equal
    to this amount it will be considered perfect.
 
index 71acc0d2ad05a2cc93ad001e830fc46fd3f3cc8f..cd7c0e8a3f97c5978d864f9b3c164123f9155431 100755 (executable)
@@ -121,6 +121,8 @@ function TEST_balancer2() {
     CEPH_ARGS+="--debug_osd=20 "
     setup $dir || return 1
     run_mon $dir a || return 1
+    # Must do this before starting ceph-mgr
+    ceph config-key set mgr/balancer/upmap_max_deviation 1
     run_mgr $dir x || return 1
     for i in $(seq 0 $(expr $OSDS - 1))
     do
index 612015bc1c2a353a27fcf5f9c629fe0d7abdea9b..23bb72e2a92d815fac85fde93b2bae9e80e845c5 100644 (file)
@@ -753,7 +753,7 @@ class Module(MgrModule):
     def do_upmap(self, plan):
         self.log.info('do_upmap')
         max_iterations = int(self.get_config('upmap_max_iterations', 10))
-        max_deviation = int(self.get_config('upmap_max_deviation', 1))
+        max_deviation = int(self.get_config('upmap_max_deviation', 5))
 
         ms = plan.initial
         if len(plan.pools):
index a63a6a08543d851f7ac591661cd0c3026a7c5b67..843211495d33802c6aba9b2b6f734567c2a35d7b 100644 (file)
@@ -20,7 +20,7 @@
                              writing commands to <file> [default: - for stdout]
      --upmap-max <max-count> set max upmap entries to calculate [default: 10]
      --upmap-deviation <max-deviation>
-                             max deviation from target [default: 1]
+                             max deviation from target [default: 5]
      --upmap-pool <poolname> restrict upmap balancing to 1 or more pools
      --upmap-save            write modified OSDMap with upmap changes
      --upmap-active          Act like an active balancer, keep applying changes until balanced
index 37abf8307c34c604bdc6274202d3e8c57763d82a..4f4790b6f5453b2697d729c850a866e7e376e061 100644 (file)
@@ -20,7 +20,7 @@
                              writing commands to <file> [default: - for stdout]
      --upmap-max <max-count> set max upmap entries to calculate [default: 10]
      --upmap-deviation <max-deviation>
-                             max deviation from target [default: 1]
+                             max deviation from target [default: 5]
      --upmap-pool <poolname> restrict upmap balancing to 1 or more pools
      --upmap-save            write modified OSDMap with upmap changes
      --upmap-active          Act like an active balancer, keep applying changes until balanced
index 8a167aba09a9281649828a080c4a70d453e21a8d..02b13ec561b5321b4030fddc70245346e20d1973 100644 (file)
@@ -7,7 +7,7 @@
   marking OSD@147 as out
   writing upmap command output to: c
   checking for upmap cleanups
-  upmap, max-count 11, max deviation 1
+  upmap, max-count 11, max deviation 5
   pools rbd 
   prepared 11/11 changes
   $ cat c
index 8fa1a610313649a7a869a7997179e104b59aea2d..23a5d5d32d4bf61cf8e489fe93df0ccfcd0b39b1 100644 (file)
@@ -6,7 +6,7 @@
   marking all OSDs up and in
   writing upmap command output to: c
   checking for upmap cleanups
-  upmap, max-count 11, max deviation 1
+  upmap, max-count 11, max deviation 5
   pools rbd 
   prepared 11/11 changes
   $ cat c
index 4263e9407bfeba070d55734dfa405a4087bb473e..4cf7f9b552082109a0674c7b24da80e6de93534e 100644 (file)
@@ -50,7 +50,7 @@ void usage()
   cout << "                           writing commands to <file> [default: - for stdout]" << std::endl;
   cout << "   --upmap-max <max-count> set max upmap entries to calculate [default: 10]" << std::endl;
   cout << "   --upmap-deviation <max-deviation>" << std::endl;
-  cout << "                           max deviation from target [default: 1]" << std::endl;
+  cout << "                           max deviation from target [default: 5]" << std::endl;
   cout << "   --upmap-pool <poolname> restrict upmap balancing to 1 or more pools" << std::endl;
   cout << "   --upmap-save            write modified OSDMap with upmap changes" << std::endl;
   cout << "   --upmap-active          Act like an active balancer, keep applying changes until balanced" << std::endl;
@@ -131,7 +131,7 @@ int main(int argc, const char **argv)
   bool health = false;
   std::string upmap_file = "-";
   int upmap_max = 10;
-  int upmap_deviation = 1;
+  int upmap_deviation = 5;
   bool upmap_active = false;
   std::set<std::string> upmap_pools;
   int64_t pg_num = -1;