From e4752ce15ad073842be54b6ca4d7c8b73599ea53 Mon Sep 17 00:00:00 2001 From: parth-gr Date: Tue, 23 Aug 2022 20:12:37 +0530 Subject: [PATCH] docs: add debug mode steps to troubleshooting docs Debug mode spport is added in the krew plugin So adding it in the docs so user can use it Closes: https://github.com/rook/rook/issues/5709 Signed-off-by: parth-gr (cherry picked from commit f59374b7a84d9473c2584d21f079c0024d7b269e) --- .github/ISSUE_TEMPLATE/bug_report.md | 4 +- Documentation/Troubleshooting/.pages | 1 + Documentation/Troubleshooting/ceph-toolbox.md | 3 ++ Documentation/Troubleshooting/krew-plugin.md | 38 +++++++++++++++---- 4 files changed, 36 insertions(+), 10 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index cd077b134..593c179bd 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -37,7 +37,7 @@ labels: bug To get the health of the cluster, use `kubectl rook-ceph health` To get the status of the cluster, use `kubectl rook-ceph ceph status` - For other commands and how to use Krew Read [Krew Plugin](https://rook.io/docs/rook/latest/Troubleshooting/krew-plugin) + For more details, see the [Rook Krew Plugin](https://rook.io/docs/rook/latest-release/Troubleshooting/krew-plugin) **Environment**: * OS (e.g. from /etc/os-release): @@ -47,4 +47,4 @@ labels: bug * Storage backend version (e.g. for ceph do `ceph -v`): * Kubernetes version (use `kubectl version`): * Kubernetes cluster type (e.g. Tectonic, GKE, OpenShift): -* Storage backend status (e.g. for Ceph use `ceph health` in the [Rook Ceph toolbox](https://rook.io/docs/rook/latest/Troubleshooting/ceph-toolbox/#interactive-toolbox)): +* Storage backend status (e.g. for Ceph use `ceph health` in the [Rook Ceph toolbox](https://rook.io/docs/rook/latest-release/Troubleshooting/ceph-toolbox/#interactive-toolbox)): diff --git a/Documentation/Troubleshooting/.pages b/Documentation/Troubleshooting/.pages index 971e3e853..1c138e208 100644 --- a/Documentation/Troubleshooting/.pages +++ b/Documentation/Troubleshooting/.pages @@ -1,4 +1,5 @@ nav: + - krew-plugin.md - ceph-toolbox.md - common-issues.md - ceph-common-issues.md diff --git a/Documentation/Troubleshooting/ceph-toolbox.md b/Documentation/Troubleshooting/ceph-toolbox.md index cde8e4f66..cb118114f 100644 --- a/Documentation/Troubleshooting/ceph-toolbox.md +++ b/Documentation/Troubleshooting/ceph-toolbox.md @@ -13,6 +13,9 @@ The toolbox can be run in two modes: !!! hint Before running the toolbox you should have a running Rook cluster deployed (see the [Quickstart Guide](../Getting-Started/quickstart.md)). +!!! note + The toolbox is not necessary if you are using [Krew plugin](krew-plugin.md) to execute Ceph commands. + ## Interactive Toolbox The rook toolbox can run as a deployment in a Kubernetes cluster where you can connect and diff --git a/Documentation/Troubleshooting/krew-plugin.md b/Documentation/Troubleshooting/krew-plugin.md index d831d714e..de61275f7 100644 --- a/Documentation/Troubleshooting/krew-plugin.md +++ b/Documentation/Troubleshooting/krew-plugin.md @@ -2,21 +2,27 @@ title: Krew Plugin --- +The Rook Krew plugin is a tool to help troubleshoot your Rook cluster. Here are a few of the operations that the plugin will assist with: +- Health of the Rook pods +- Health of the Ceph cluster +- Create "debug" pods for mons and OSDs that are in need of special Ceph maintenance operations +- Restart the operator +- Purge an OSD +- Run any `ceph` command + +See the [kubectl-rook-ceph documentation](https://github.com/rook/kubectl-rook-ceph) for more details. + ## Installation * Install [Krew](https://krew.sigs.k8s.io/docs/user-guide/setup/install/) -* Install Krew rook-ceph plugin +* Install Rook plugin ```console kubectl krew install rook-ceph ``` -## Working +## Ceph Commands -Krew rook-ceph plugin will help in troubleshooting the cluster as by getting the stauts of the working cluster. - -### Example: - -* Get the ceph status: +* Run any `ceph` command with `kubectl rook-ceph ceph `. For example, get the Ceph status: ```console kubectl rook-ceph ceph status ``` @@ -44,4 +50,20 @@ Krew rook-ceph plugin will help in troubleshooting the cluster as by getting the client: 1.2 KiB/s rd, 2 op/s rd, 0 op/s wr ``` -Reference: [kubectl-rook-ceph](https://github.com/rook/kubectl-rook-ceph#kubectl-rook-ceph) +Reference: [Ceph Status](https://github.com/rook/kubectl-rook-ceph/blob/master/README.md#run-a-ceph-command) + +## Debug Mode + +Debug mode can be useful when a MON or OSD needs advanced maintenance operations that require the daemon to be stopped. Ceph tools such as `ceph-objectstore-tool`, `ceph-bluestore-tool`, or `ceph-monstore-tool` are commonly used in these scenarios. Debug mode will set up the MON or OSD so that these commands can be run. + +* Start the debug pod for mon b + ```console + kubectl rook-ceph debug start rook-ceph-mon-b + ``` + +* Stop the debug pod for mon b + ```console + kubectl rook-ceph debug stop rook-ceph-mon-b + ``` + +Reference: [Debug Mode](https://github.com/rook/kubectl-rook-ceph/blob/master/README.md#debug-mode)