Skip to content

Commit 3d72ce1

Browse files
committed
TELCODOCS-778 updating About the OVN-Kubernetes with intro information
1 parent 00dce91 commit 3d72ce1

26 files changed

+1819
-1
lines changed

_topic_maps/_topic_map.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,13 @@ Topics:
12081208
Topics:
12091209
- Name: About the OVN-Kubernetes network plugin
12101210
File: about-ovn-kubernetes
1211-
- Name: Migrating from the OpenShift SDN network plugin
1211+
- Name: OVN-Kubernetes architecture
1212+
File: ovn-kubernetes-architecture-assembly
1213+
- Name: OVN-Kubernetes troubleshooting
1214+
File: ovn-kubernetes-troubleshooting-sources
1215+
- Name: OVN-Kubernetes traffic tracing
1216+
File: ovn-kubernetes-tracing-using-ovntrace
1217+
- Name: Migrating from the OpenShift SDN network plug-in
12121218
File: migrate-from-openshift-sdn
12131219
- Name: Rolling back to the OpenShift SDN network plugin
12141220
File: rollback-to-openshift-sdn
64.2 KB
Loading
123 KB
Loading
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/ovn_kubernetes_network_provider/ovn-kubernetes-troubleshooting-sources.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="nw-ovn-kubernetes-alerts-cli_{context}"]
7+
= Viewing OVN-Kubernetes alerts in the CLI
8+
9+
You can get information about alerts and their governing alerting rules and silences from the command line.
10+
11+
.Prerequisites
12+
13+
* Access to the cluster as a user with the `cluster-admin` role.
14+
* The OpenShift CLI (`oc`) installed.
15+
* You have installed `jq`.
16+
17+
.Procedure
18+
19+
. View active or firing alerts by running the following commands.
20+
21+
.. Set the alert manager route environment variable by running the following command:
22+
+
23+
[source,terminal]
24+
----
25+
$ ALERT_MANAGER=$(oc get route alertmanager-main -n openshift-monitoring \
26+
-o jsonpath='{@.spec.host}')
27+
----
28+
29+
.. Issue a `curl` request to the alert manager route API with the correct authorization details requesting specific fields by running the following command:
30+
+
31+
[source,terminal]
32+
----
33+
$ curl -s -k -H "Authorization: Bearer \
34+
$(oc create token prometheus-k8s -n openshift-monitoring)" \
35+
https://$ALERT_MANAGER/api/v1/alerts \
36+
| jq '.data[] | "\(.labels.severity) \(.labels.alertname) \(.labels.pod) \(.labels.container) \(.labels.endpoint) \(.labels.instance)"'
37+
----
38+
39+
. View alerting rules by running the following command:
40+
+
41+
[source,terminal]
42+
----
43+
$ oc -n openshift-monitoring exec -c prometheus prometheus-k8s-0 -- curl -s 'http://localhost:9090/api/v1/rules' | jq '.data.groups[].rules[] | select(((.name|contains("ovn")) or (.name|contains("OVN")) or (.name|contains("Ovn")) or (.name|contains("North")) or (.name|contains("South"))) and .type=="alerting")'
44+
----
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/ovn_kubernetes_network_provider/ovn-kubernetes-troubleshooting-sources.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="nw-ovn-kubernetes-alerts-console_{context}"]
7+
= Viewing OVN-Kubernetes alerts in the console
8+
9+
The Alerting UI provides detailed information about alerts and their governing alerting rules and silences.
10+
11+
.Prerequisites
12+
13+
* You have access to the cluster as a developer or as a user with view permissions for the project that you are viewing metrics for.
14+
15+
.Procedure (UI)
16+
17+
. In the *Administrator* perspective, select *Observe* -> *Alerting*. The three main pages in the Alerting UI in this perspective are the *Alerts*, *Silences*, and *Alerting Rules* pages.
18+
19+
. View the rules for OVN-Kubernetes alerts by selecting *Observe* -> *Alerting* -> *Alerting Rules*.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/ovn_kubernetes_network_provider/ovn-kubernetes-troubleshooting-sources.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="nw-ovn-kubernetes-change-log-levels_{context}"]
7+
= Changing the OVN-Kubernetes log levels
8+
9+
The default log level for OVN-Kubernetes is 2. To debug OVN-Kubernetes set the log level to 5.
10+
Follow this procedure to increase the log level of the OVN-Kubernetes to help you debug an issue.
11+
12+
.Prerequisites
13+
14+
* You have access to the cluster with `cluster-admin` privileges.
15+
* You have access to the OpenShift Container Platform web console.
16+
17+
.Procedure
18+
19+
. Run the following command to get detailed information for all pods in the OVN-Kubernetes project:
20+
+
21+
[source,terminal]
22+
----
23+
$ oc get po -o wide -n openshift-ovn-kubernetes
24+
----
25+
+
26+
.Example output
27+
[source,terminal]
28+
----
29+
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
30+
ovnkube-master-84nc9 6/6 Running 0 50m 10.0.134.156 ip-10-0-134-156.ec2.internal <none> <none>
31+
ovnkube-master-gmlqv 6/6 Running 0 50m 10.0.209.180 ip-10-0-209-180.ec2.internal <none> <none>
32+
ovnkube-master-nhts2 6/6 Running 1 (48m ago) 50m 10.0.147.31 ip-10-0-147-31.ec2.internal <none> <none>
33+
ovnkube-node-2cbh8 5/5 Running 0 43m 10.0.217.114 ip-10-0-217-114.ec2.internal <none> <none>
34+
ovnkube-node-6fvzl 5/5 Running 0 50m 10.0.147.31 ip-10-0-147-31.ec2.internal <none> <none>
35+
ovnkube-node-f4lzz 5/5 Running 0 24m 10.0.146.76 ip-10-0-146-76.ec2.internal <none> <none>
36+
ovnkube-node-jf67d 5/5 Running 0 50m 10.0.209.180 ip-10-0-209-180.ec2.internal <none> <none>
37+
ovnkube-node-np9mf 5/5 Running 0 40m 10.0.165.191 ip-10-0-165-191.ec2.internal <none> <none>
38+
ovnkube-node-qjldg 5/5 Running 0 50m 10.0.134.156 ip-10-0-134-156.ec2.internal <none> <none>
39+
----
40+
41+
. Create a `ConfigMap` file similar to the following example and use a filename such as `env-overrides.yaml`:
42+
+
43+
[source,yaml]
44+
.Example `ConfigMap` file
45+
----
46+
kind: ConfigMap
47+
apiVersion: v1
48+
metadata:
49+
name: env-overrides
50+
namespace: openshift-ovn-kubernetes
51+
data:
52+
ip-10-0-217-114.ec2.internal: | <1>
53+
# This sets the log level for the ovn-kubernetes node process:
54+
OVN_KUBE_LOG_LEVEL=5
55+
# You might also/instead want to enable debug logging for ovn-controller:
56+
OVN_LOG_LEVEL=dbg
57+
ip-10-0-209-180.ec2.internal: |
58+
# This sets the log level for the ovn-kubernetes node process:
59+
OVN_KUBE_LOG_LEVEL=5
60+
# You might also/instead want to enable debug logging for ovn-controller:
61+
OVN_LOG_LEVEL=dbg
62+
_master: | <2>
63+
# This sets the log level for the ovn-kubernetes master process as well as the ovn-dbchecker:
64+
OVN_KUBE_LOG_LEVEL=5
65+
# You might also/instead want to enable debug logging for northd, nbdb and sbdb on all masters:
66+
OVN_LOG_LEVEL=dbg
67+
----
68+
<1> Specify the name of the node you want to set the debug log level on.
69+
<2> Specify `_master` to set the log levels of `ovnkube-master` components.
70+
71+
. Apply the `ConfigMap` file by using the following command:
72+
+
73+
[source,terminal]
74+
----
75+
$ oc create configmap env-overrides.yaml -n openshift-ovn-kubernetes
76+
----
77+
+
78+
.Example output
79+
[source,terminal]
80+
----
81+
configmap/env-overrides.yaml created
82+
----
83+
84+
. Restart the `ovnkube` pods to apply the new log level by using the following commands:
85+
+
86+
[source,terminal]
87+
----
88+
$ oc delete pod -n openshift-ovn-kubernetes \
89+
--field-selector spec.nodeName=ip-10-0-217-114.ec2.internal -l app=ovnkube-node
90+
----
91+
+
92+
[source,terminal]
93+
----
94+
$ oc delete pod -n openshift-ovn-kubernetes \
95+
--field-selector spec.nodeName=ip-10-0-209-180.ec2.internal -l app=ovnkube-node
96+
----
97+
+
98+
[source,terminal]
99+
----
100+
$ oc delete pod -n openshift-ovn-kubernetes -l app=ovnkube-master
101+
----
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/ovn_kubernetes_network_provider/ovn-kubernetes-architecture.adoc
4+
5+
:_content-type: REFERENCE
6+
[id="nw-ovn-kubernetes-examine-nb-database-contents-ref_{context}"]
7+
= Command line arguments for ovn-nbctl to examine northbound database contents
8+
9+
The following table describes the command line arguments that can be used with `ovn-nbctl` to examine the contents of the northbound database.
10+
11+
.Command line arguments to examine northbound database contents
12+
[cols="30%,70%",options="header"]
13+
|===
14+
|Argument |Description
15+
16+
|`ovn-nbctl show`
17+
|An overview of the northbound database contents.
18+
19+
|`ovn-nbctl show <switch_or_router>`
20+
|Show the details associated with the specified switch or router.
21+
22+
|`ovn-nbctl lr-list`
23+
|Show the logical routers.
24+
25+
|`ovn-nbctl lrp-list <router>`
26+
|Using the router information from `ovn-nbctl lr-list` to show the router ports.
27+
28+
|`ovn-nbctl lr-nat-list <router>`
29+
|Show network address translation details for the specified router.
30+
31+
|`ovn-nbctl ls-list`
32+
|Show the logical switches
33+
34+
|`ovn-nbctl lsp-list <switch>`
35+
|Using the switch information from `ovn-nbctl ls-list` to show the switch port.
36+
37+
|`ovn-nbctl lsp-get-type <port>`
38+
|Get the type for the logical port.
39+
40+
|`ovn-nbctl lb-list`
41+
|Show the load balancers.
42+
|===
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/ovn_kubernetes_network_provider/ovn-kubernetes-architecture.adoc
4+
5+
:_content-type: REFERENCE
6+
[id="nw-ovn-kubernetes-examine-sb-database-contents-ref_{context}"]
7+
= Command line arguments for ovn-sbctl to examine northbound database contents
8+
9+
The following table describes the command line arguments that can be used with `ovn-sbctl` to examine the contents of the southbound database.
10+
11+
.Command line arguments to examine southbound database contents
12+
[cols="30%,70%",options="header"]
13+
|===
14+
|Argument |Description
15+
16+
|`ovn-sbctl show`
17+
|Overview of the southbound database contents.
18+
19+
|`ovn-sbctl list Port_Binding <port>`
20+
|List the contents of southbound database for a the specified port .
21+
22+
|`ovn-sbctl dump-flows`
23+
|List the logical flows.
24+
25+
|===
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/ovn_kubernetes_network_provider/ovn-kubernetes-architecture.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="nw-ovn-kubernetes-install-ovnkube-trace-local_{context}"]
7+
= Installing the ovnkube-trace on local host
8+
9+
The `ovnkube-trace` tool traces packet simulations for arbitrary UDP or TCP traffic between points in a OVN-Kubernetes driven {product-title} cluster. Copy the `ovnkube-trace` binary to your local host making it available to run against the cluster.
10+
11+
.Prerequisites
12+
13+
* You installed the OpenShift CLI (`oc`).
14+
* You are logged in to the cluster with a user with `cluster-admin` privileges.
15+
16+
.Procedure
17+
18+
. Create a pod variable by using the following command:
19+
+
20+
[source,terminal]
21+
----
22+
$ POD=$(oc get pods -n openshift-ovn-kubernetes -l app=ovnkube-master -o name | head -1 | awk -F '/' '{print $NF}')
23+
----
24+
25+
. Run the following command on your local host to copy the binary from the `ovnkube-master` pods:
26+
+
27+
[source,terminal]
28+
----
29+
$ oc cp -n openshift-ovn-kubernetes $POD:/usr/bin/ovnkube-trace ovnkube-trace
30+
----
31+
32+
. Make `ovnkube-trace` executable by running the following command:
33+
+
34+
[source,terminal]
35+
----
36+
$ chmod +x ovnkube-trace
37+
----
38+
39+
. Display the options available with `ovnkube-trace` by running the following command:
40+
+
41+
[source,terminal]
42+
----
43+
$ ./ovnkube-trace -help
44+
----
45+
+
46+
.Expected output
47+
+
48+
[source,terminal]
49+
----
50+
I0111 15:05:27.973305 204872 ovs.go:90] Maximum command line arguments set to: 191102
51+
Usage of ./ovnkube-trace:
52+
-dst string
53+
dest: destination pod name
54+
-dst-ip string
55+
destination IP address (meant for tests to external targets)
56+
-dst-namespace string
57+
k8s namespace of dest pod (default "default")
58+
-dst-port string
59+
dst-port: destination port (default "80")
60+
-kubeconfig string
61+
absolute path to the kubeconfig file
62+
-loglevel string
63+
loglevel: klog level (default "0")
64+
-ovn-config-namespace string
65+
namespace used by ovn-config itself
66+
-service string
67+
service: destination service name
68+
-skip-detrace
69+
skip ovn-detrace command
70+
-src string
71+
src: source pod name
72+
-src-namespace string
73+
k8s namespace of source pod (default "default")
74+
-tcp
75+
use tcp transport protocol
76+
-udp
77+
use udp transport protocol
78+
----
79+
+
80+
The command-line arguments supported are familiar Kubernetes constructs, such as namespaces, pods, services so you do not need to find the MAC address, the IP address of the destination nodes, or the ICMP type.
81+
+
82+
The log levels are:
83+
84+
* 0 (minimal output)
85+
* 2 (more verbose output showing results of trace commands)
86+
* 5 (debug output)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/ovn_kubernetes_network_provider/ovn-kubernetes-architecture.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="nw-ovn-kubernetes-installing-network-tools_{context}"]
7+
= Installing network-tools on local host
8+
9+
Install `network-tools` on your local host to make a collection of tools available for debugging {product-title} cluster network issues.
10+
11+
.Procedure
12+
13+
. Clone the `network-tools` repository onto your workstation with the following command:
14+
+
15+
[source,terminal]
16+
----
17+
$ git clone [email protected]:openshift/network-tools.git
18+
----
19+
20+
. Change into the directory for the repository you just cloned:
21+
+
22+
[source,terminal]
23+
----
24+
$ cd network-tools
25+
----
26+
27+
. Optional: List all available commands:
28+
+
29+
[source,terminal]
30+
----
31+
$ ./debug-scripts/network-tools -h
32+
----

0 commit comments

Comments
 (0)