From: Sage Weil Date: Tue, 4 May 2021 20:22:21 +0000 (-0400) Subject: mgr/cephadm: do not autotune when _no_autotune_memory label is present X-Git-Tag: v17.1.0~1976^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=1e4d20a592aa6ca111201b0a3edc4dd619885f93;p=ceph-ci.git mgr/cephadm: do not autotune when _no_autotune_memory label is present Signed-off-by: Sage Weil --- diff --git a/doc/cephadm/host-management.rst b/doc/cephadm/host-management.rst index 5b6e0c2f9a9..012dafc3388 100644 --- a/doc/cephadm/host-management.rst +++ b/doc/cephadm/host-management.rst @@ -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 diff --git a/src/pybind/mgr/cephadm/serve.py b/src/pybind/mgr/cephadm/serve.py index 467c1fab32a..e9724364fcc 100644 --- a/src/pybind/mgr/cephadm/serve.py +++ b/src/pybind/mgr/cephadm/serve.py @@ -280,7 +280,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)