From d61d4edd79727a28959a2e9b9504fc35dacf26a9 Mon Sep 17 00:00:00 2001 From: nicofnt <16099943+nicofnt@users.noreply.github.com> Date: Thu, 25 Jul 2024 22:20:28 +0200 Subject: [PATCH] docs: add new topic in troubleshooting guide for the LimitNOFILE issue Create new topic in the troubleshooting guide to explain how to fix a new rook-ceph deployment that could remain in an unhealthy state or fails to config because of the LimitNOFILE value specified in the containerd.service configuration. Signed-off-by: Nicola Fantacuzzi (cherry picked from commit 0952e36ba1633a264ab523a75a00e78830e261d9) --- .../Troubleshooting/ceph-common-issues.md | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/Documentation/Troubleshooting/ceph-common-issues.md b/Documentation/Troubleshooting/ceph-common-issues.md index b7735e773..8cca5195b 100644 --- a/Documentation/Troubleshooting/ceph-common-issues.md +++ b/Documentation/Troubleshooting/ceph-common-issues.md @@ -67,6 +67,9 @@ title: Ceph Common Issues - [Symptoms](#symptoms-11) - [Investigation](#investigation-7) - [Solution](#solution-12) +- [The cluster is in an unhealthy state or fails to configure when LimitNOFILE=infinity in containerd](#the-cluster-is-in-an-unhealthy-state-or-fails-to-configure-when-limitnofileinfinity-in-containerd) + - [Symptoms](#symptoms-12) + - [Solution](#solution-13) Many of these problem cases are hard to summarize down to a short phrase that adequately describes the problem. Each problem will start with a bulleted list of symptoms. Keep in mind that all symptoms may not apply depending on the configuration of Rook. If the majority of the symptoms are seen there is a fair chance you are experiencing that problem. @@ -774,3 +777,36 @@ data: {} ``` If the ConfigMap exists, remove any keys that you wish to configure through the environment. + +## The cluster is in an unhealthy state or fails to configure when LimitNOFILE=infinity in containerd + +### Symptoms + +When trying to create a new deployment, Ceph mons keep crashing and the cluster fails to configure or remains in an unhealthy state. The nodes' CPUs are stuck at 100%. + +```console +NAME DATADIRHOSTPATH MONCOUNT AGE PHASE MESSAGE HEALTH EXTERNAL FSID +rook-ceph /var/lib/rook 3 4m6s Ready Failed to configure ceph cluster HEALTH_ERR +``` + +### Solution + +Before systemd v240, systemd would leave `fs.nr_open` as-is because it had no mechanism to set a safe upper limit for it. The kernel hard-coded value for the default number of max open files is **1048576**. Starting from systemd v240, when `LimitNOFILE=infinity` is specified in the containerd.service configuration, this value will typically be set to **~1073741816** (INT_MAX for x86_64 divided by two). + +To fix this, set LimitNOFILE in the systemd service configuration to **1048576**. + +Create an override.conf file with the new LimitNOFILE value: + +```console +$ vim /etc/systemd/system/containerd.service.d/override.conf +[Service] +LimitNOFILE=1048576 +``` + +Reload systemd manager configuration, restart containerd and restart all monitors deployments: + +```console +$ systemctl daemon-reload +$ systemctl restart containerd +$ kubectl rollout restart deployment rook-ceph-mon-a rook-ceph-mon-b rook-ceph-mon-c -n rook-ceph +```