]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: do not autotune when _no_autotune_memory label is present
authorSage Weil <sage@newdream.net>
Tue, 4 May 2021 20:22:21 +0000 (16:22 -0400)
committerSage Weil <sage@newdream.net>
Thu, 20 May 2021 23:03:01 +0000 (18:03 -0500)
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 1e4d20a592aa6ca111201b0a3edc4dd619885f93)

doc/cephadm/host-management.rst
src/pybind/mgr/cephadm/serve.py

index 5b6e0c2f9a9bc0f5f9e15ce23d015c4d010da644..012dafc33889ad5c3f4219deb67abf3aeaca1e06 100644 (file)
@@ -140,6 +140,12 @@ The following host labels have a special meaning to cephadm.  All start with ``_
   an existing host that already contains Ceph daemons, it will cause cephadm to move
   those daemons elsewhere (except OSDs, which are not removed automatically).
 
+* ``_no_autotune_memory``: *Do not autotune memory on this host*.
+
+  This label will prevent daemon memory from being tuned even when the
+  ``osd_memory_target_autotune`` or similar option is enabled for one or more daemons
+  on that host.
+
 * ``_admin``: *Distribute client.admin and ceph.conf to this host*.
 
   By default, an ``_admin`` label is applied to the first host in the cluster (where
index d419ff2bb57594ca58d526307d53a7541153bc13..681434ddcf274f534b3a7e194f1bb7ba69684d72 100644 (file)
@@ -283,7 +283,10 @@ class CephadmServe:
                 if r:
                     failures.append(r)
 
-            if self.mgr.cache.host_needs_autotune_memory(host):
+            if (
+                    self.mgr.cache.host_needs_autotune_memory(host)
+                    and not self.mgr.inventory.has_label(host, '_no_autotune_memory')
+            ):
                 self.log.debug(f"autotuning memory for {host}")
                 self._autotune_host_memory(host)