Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #7 from koor-tech/update_readme
Browse files Browse the repository at this point in the history
  • Loading branch information
galexrt authored Dec 12, 2022
2 parents 7865702 + a294389 commit d9dce15
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 16 deletions.
49 changes: 33 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,36 @@ It collects the following information:

1. All the pod logs from Rook Ceph cluster and if separate operator namespace in individual files.
2. Ceph command outputs for debugging the current state of the cluster.
3. Output of `# kubectl version`
4. All the Deployment YAMLs : `kubectl get -n rook-ceph deployments --output yaml`
5. Configmaps : `kubectl get configmap -n rook-ceph -oyaml`
6. Node related information : `kubectl get nodes` and `kubectl get nodes -oyaml`
7. rook-config-override ConfigMap : `kubectl -n rook-ceph get ConfigMap rook-config-override -o yaml`

**Pre-requisites: Toolbox pod must be running to collect some of the information needed by the debug script**

Usage : `sh gather-logs.sh <-hd>`
* `-h`: Show help menu.
* `-d` : Optional command line argument to crank up the debug logging for rook-ceph cluster.
* `-n CLUSTER_NAMESPACE`: Optional command line argument to set the rook-ceph cluster namespace.
* `-o OPERATOR_NAMESPACE`: Optional command line argument to set the rook-ceph-operator namespace.
* `-t` - Disable tar-ing the collected info to the current working dir.

The script creates a temp directory on the system prefixed with `gather-logs-`.
3. Output of `kubectl version`
4. All the Deployment YAMLs: `kubectl get -n rook-ceph deployments --output yaml`
5. Configmaps: `kubectl get configmap -n rook-ceph -oyaml`
6. Node related information: `kubectl get nodes` and `kubectl get nodes -oyaml`
7. `rook-config-override` ConfigMap: `kubectl -n rook-ceph get ConfigMap rook-config-override -o yaml`

## Prerequisites

* Currently only works with Rook Ceph clusters
* [Toolbox pod](https://rook.io/docs/rook/latest-release/Troubleshooting/ceph-toolbox/) must be running to collect some of the information needed by the debug script
* `kubectl` configured with access to the Kubernetes clusters running the Rook Ceph clusters

## Usage

```console
$ ./gather-info.sh -h
Usage: ./gather-info.sh [FLAGS]
Flags:
-h - Show help menu.
-d - Set Rook Ceph Operator and CSI log level to debug/trace.
-n NAMESPACE - Rook Ceph Cluster namespace, default: 'rook-ceph' (CLUSTER_NAMESPACE).
-o NAMESPACE - If the operator is run separately from the cluster, specify the namespace (OPERATOR_NAMESPACE).
-t - Disable tar-ing the collected info to the current working dir.
```

The script creates a temp directory (`mktemp`) on the system prefixed with `gather-logs-`.

## Contributing

We use [`shellcheck`](https://www.shellcheck.net/) for linting and checking the scripts in this repository.
`shellcheck` is run by our CI process for any code changes to ensure the scripts are formatted properly.

Please open a pull request with code changes you want to make, thanks!
Empty file modified gather-info.sh
100644 → 100755
Empty file.

0 comments on commit d9dce15

Please sign in to comment.