Skip to content

Commit 64468f3

Browse files
authored
Merge pull request #127 from iranzo/formatting
doc: Adjust formatting
2 parents 749d9a0 + af5454e commit 64468f3

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

scripts/README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A set of scripts to run basic checks on an OpenShift cluster. PRs welcome!
44

5-
> :warning: This is an unofficial tool, don't blame us if it breaks your cluster
5+
This >:warning: is an unofficial tool, don't blame us if it breaks your cluster
66

77
## ovn_cleanConntrack.sh
88

@@ -42,7 +42,7 @@ Single node execution:
4242
$ ./ovn_cleanConntrack.sh -s my.node.com
4343
```
4444

45-
For the -k parameter, the original behavior is still the same but if you want to analyse different clusters from the same bastion you can do it using the -k parameter to pass the kubeconfig file to the script, for example:
45+
For the -k parameter, the original behavior is still the same but if you want to analyze different clusters from the same bastion you can do it using the -k parameter to pass the kubeconfig file to the script, for example:
4646

4747
```bash
4848
$ ./ovn_cleanConntrack.sh -k /home/kni/clusterconfigs/cluster1/auth/kubeconfig
@@ -56,15 +56,16 @@ If no -k is indicated the script expects to have the KUBECONFIG variable exporte
5656
For the -q parameter, instead of printing the output to the standard output now you can indicate the file were to save the output of the script, to cover the commented use case for running on batch mode:
5757

5858
```bash
59+
5960
$ ./ovn_cleanConntrack.sh -k /home/kni/clusterconfigs/cluster1/auth/kubeconfig -q /tmp/cluster1.output
6061
$ ./ovn_cleanConntrack.sh -k /home/kni/clusterconfigs/cluster2/auth/kubeconfig -q /tmp/cluster2.output
6162
$ ./ovn_cleanConntrack.sh -k /home/kni/clusterconfigs/cluster3/auth/kubeconfig -q /tmp/cluster3.output
6263
```
6364

64-
If no conntracks with issues are found the files `/tmp/cluster?.output` won't be created. If no -q is indicated, the script will print the results in the standard output.
65+
If no conntracks with issues are found the files `/tmp/cluster?.output` won't be created. If no `-q` is indicated, the script will print the results in the standard output.
6566

66-
Here is an example on how to configure a cronjob to run the script every hour (you can place it on /etc/cron.d/1conntracks).
67-
This example uses the parameters -k and -q indicating the kubeconfig and the file to save the output:
67+
Here is an example of how to configure a cronjob to run the script every hour (you can place it on `/etc/cron.d/1conntracks`).
68+
This example uses the parameters `-k` and `-q` indicating the kubeconfig and the file to save the output:
6869

6970
```bash
7071
# Run hourly
@@ -76,13 +77,13 @@ MAILTO=root
7677
20 * * * * kni /usr/local/bin/ovn_cleanConntrack.sh -k /home/kni/clusterconfigs/cluster3/auth/kubeconfig -q /tmp/ovnconntracks_cluster3.log
7778
```
7879

79-
In that example, the debug log is still being generated using the LOG var inside the script, but that is a debug log file in case we need to debug the script behaviour, and it can be modified according to bastion space and needs.
80+
In that example, the debug log is still being generated using the LOG var inside the script, but that is a debug log file in case we need to debug the script behavior, and it can be modified according to bastion space and needs.
8081

8182
## recover-northd.sh
8283

8384
### Usage
8485

85-
````bash
86+
```bash
8687
$ ./recover-northd.sh -h
8788
This script checks if northd is stuck and optionally intervene
8889

@@ -91,15 +92,17 @@ This script checks if northd is stuck and optionally intervene
9192
Save extra DEBUG lines into the log: recover-northd.sh -d
9293
Set the KUBECONFIG env var to /kubeconfig/file: recover-northd.sh -k /kubeconfig/file
9394
Remediate the issue: recover-northd.sh -r
95+
```
9496
95-
After the execution a logfile will be generated with the name recover-northd.DATE.log
97+
After the execution, a logfile will be generated with the name `recover-northd.DATE.log`
9698
9799
### Examples
98100
99101
Saving extra debug lines in the log file:
102+
100103
```bash
101104
$ ./recover-northd.sh -d
102-
````
105+
```
103106
104107
For the -k parameter, the original behavior is still the same but if you want to analyse different clusters from the same bastion you can do it using the -k parameter to pass the kubeconfig file to the script, for example:
105108
@@ -110,9 +113,10 @@ $ ./recover-northd.sh -k /home/kni/clusterconfigs/cluster3/auth/kubeconfig
110113
```
111114
112115
In the previous example, the script will analyse the clusters indicated by the kubeconfig files on `/home/kni/clusterconfigs/cluster1/kubeconfig`, `/home/kni/clusterconfigs/cluster2/kubeconfig` and `/home/kni/clusterconfigs/cluster3/kubeconfig`
113-
If no -k is indicated the script expects to have the KUBECONFIG variable exported in the system otherwise it will give an error because it can't connect.
114116
115-
For the -r parameter, the script will send an exit to the northd container for OVN to elect a new leader:
117+
If no `-k` is indicated the script expects to have the KUBECONFIG variable exported in the system otherwise it will give an error because it can't connect.
118+
119+
For the `-r` parameter, the script will send an exit to the northd container for OVN to elect a new leader:
116120
117121
```bash
118122
$ ./recover-northd.sh -k /home/kni/clusterconfigs/cluster1/auth/kubeconfig -r

0 commit comments

Comments
 (0)