Skip to content

Commit 32f2d6e

Browse files
authored
Merge pull request #35540 from aireilly/fix-35299-edit-sriovnetwork-typo
Updates to fix #35299 BZ1996069
2 parents 41541cc + 95f5939 commit 32f2d6e

File tree

2 files changed

+48
-28
lines changed

2 files changed

+48
-28
lines changed

modules/cnf-assigning-a-secondary-network-to-a-vrf.adoc

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,16 @@ The Cluster Network Operator (CNO) manages additional network definitions. When
2323
Do not edit the `NetworkAttachmentDefinition` CRs that the Cluster Network Operator manages. Doing so might disrupt network traffic on your additional network.
2424
====
2525

26+
To create an additional network attachment with the CNI VRF plug-in, perform the following procedure.
27+
2628
.Prerequisites
2729

2830
* Install the {product-title} CLI (oc).
2931
* Log in to the OpenShift cluster as a user with cluster-admin privileges.
3032

3133
.Procedure
3234

33-
. Create the CNO CR by running the following command:
34-
+
35-
[source,terminal]
36-
----
37-
$ oc edit networks.operator.openshift.io cluster
38-
----
39-
. Extend the CR that you are creating by adding the `rawCNIConfig` configuration for the additional network, as in the example CR below. The following YAML configures the CNI VRF plug-in:
35+
. Create the `Network` custom resource (CR) for the additional network attachment and insert the `rawCNIConfig` configuration for the additional network, as in the following example CR. Save the YAML as the file `additional-network-attachment.yaml`.
4036
+
4137
[source,yaml]
4238
----
@@ -47,7 +43,7 @@ metadata:
4743
spec:
4844
additionalNetworks:
4945
- name: test-network-1
50-
namespace: test-1
46+
namespace: additional-network-1
5147
type: Raw
5248
rawCNIConfig: '{
5349
"cniVersion": "0.3.1",
@@ -72,17 +68,24 @@ metadata:
7268
}]
7369
}'
7470
----
75-
<1> `plugins` must be a list. The first item in the list must be secondary network underpinning the VRF network. The second item in the list is the VRF plugin configuration.
71+
<1> `plugins` must be a list. The first item in the list must be the secondary network underpinning the VRF network. The second item in the list is the VRF plugin configuration.
7672
<2> `type` must be set to `vrf`.
7773
<3> `vrfname` is the name of the VRF that the interface is assigned to. If it does not exist in the pod, it is created.
78-
<4> `table` is the routing table ID. Optional. By default, the `tableid` parameter is used. If it is not specified, the CNI assigns a free routing table ID to the VRF.
74+
<4> Optional. `table` is the routing table ID. By default, the `tableid` parameter is used. If it is not specified, the CNI assigns a free routing table ID to the VRF.
7975
+
8076
[NOTE]
8177
====
82-
VRF will function correctly only when the resource is of type `netdevice`.
78+
VRF functions correctly only when the resource is of type `netdevice`.
8379
====
84-
. Save your changes and quit the text editor to commit your changes.
85-
. Confirm that the CNO created the `NetworkAttachmentDefinition` CR by running the following command. Replace `<namespace>` with the namespace that you specified when configuring the network attachment. There might be a delay before the CNO creates the CR.
80+
81+
. Create the `Network` resource:
82+
+
83+
[source,terminal]
84+
----
85+
$ oc create -f additional-network-attachment.yaml
86+
----
87+
88+
. Confirm that the CNO created the `NetworkAttachmentDefinition` CR by running the following command. Replace `<namespace>` with the namespace that you specified when configuring the network attachment, for example, `additional-network-1`.
8689
+
8790
[source,terminal]
8891
----
@@ -95,14 +98,19 @@ $ oc get network-attachment-definitions -n <namespace>
9598
NAME AGE
9699
additional-network-1 14m
97100
----
101+
+
102+
[NOTE]
103+
====
104+
There might be a delay before the CNO creates the CR.
105+
====
98106

99107
.Verifying that the additional VRF network attachment is successful
100108

101109
To verify that the VRF CNI is correctly configured and the additional network attachment is attached, do the following:
102110

103111
. Create a network that uses the VRF CNI.
104112
. Assign the network to a pod.
105-
. Verify that the pod network attachment is connected to the VRF additional network. SSH into the pod and run the following command:
113+
. Verify that the pod network attachment is connected to the VRF additional network. Remote shell into the pod and run the following command:
106114
+
107115
[source,terminal]
108116
----

modules/cnf-assigning-a-sriov-network-to-a-vrf.adoc

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,16 @@ The SR-IOV Network Operator manages additional network definitions. When you spe
2424
Do not edit `NetworkAttachmentDefinition` custom resources that the SR-IOV Network Operator manages. Doing so might disrupt network traffic on your additional network.
2525
====
2626

27+
To create an additional SR-IOV network attachment with the CNI VRF plug-in, perform the following procedure.
28+
2729
.Prerequisites
30+
2831
* Install the {product-title} CLI (oc).
2932
* Log in to the {product-title} cluster as a user with cluster-admin privileges.
3033

3134
.Procedure
32-
. Create the `SriovNetwork` CR by running the following command:
33-
+
34-
[source,terminal]
35-
----
36-
$ oc create sriovnetwork.openshift.io cluster
37-
----
38-
. Extend the CR that you are creating by adding the `metaPlugins` configuration for the additional network you are creating, as in the following example CR.
39-
. Save your changes and quit the text editor to commit your changes. The following YAML configures the `SriovNetwork` object:
35+
36+
. Create the `SriovNetwork` custom resource (CR) for the additional SR-IOV network attachment and insert the `metaPlugins` configuration, as in the following example CR. Save the YAML as the file `sriov-network-attachment.yaml`.
4037
+
4138
[source,yaml]
4239
----
@@ -68,28 +65,42 @@ spec:
6865
<1> `type` must be set to `vrf`.
6966
<2> `vrfname` is the name of the VRF that the interface is assigned to. If it does not exist in the pod, it is created.
7067

71-
.Verify the `NetworkAttachmentDefinition` CR is successfully created
72-
Confirm that the SR-IOV Network Operator created the `NetworkAttachmentDefinition` CR by running the following command. Replace `<namespace>` with the namespace that you specified when configuring the network attachment. There might be a delay before the SR-IOV Network Operator creates the CR.
73-
68+
. Create the `SriovNetwork` resource:
69+
+
7470
[source,terminal]
7571
----
76-
$ oc get network-attachment-definitions -n <namespace>
72+
$ oc create -f sriov-network-attachment.yaml
7773
----
7874

75+
.Verifying that the `NetworkAttachmentDefinition` CR is successfully created
76+
77+
* Confirm that the SR-IOV Network Operator created the `NetworkAttachmentDefinition` CR by running the following command.
78+
+
79+
[source,terminal]
80+
----
81+
$ oc get network-attachment-definitions -n <namespace> <1>
82+
----
83+
<1> Replace `<namespace>` with the namespace that you specified when configuring the network attachment, for example, `additional-sriov-network-1`.
84+
+
7985
.Example output
8086
[source,terminal]
8187
----
8288
NAME AGE
8389
additional-sriov-network-1 14m
8490
----
91+
+
92+
[NOTE]
93+
====
94+
There might be a delay before the SR-IOV Network Operator creates the CR.
95+
====
8596

8697
.Verifying that the additional SR-IOV network attachment is successful
8798

8899
To verify that the VRF CNI is correctly configured and the additional SR-IOV network attachment is attached, do the following:
89100

90101
. Create an SR-IOV network that uses the VRF CNI.
91102
. Assign the network to a pod.
92-
. Verify that the pod network attachment is connected to the SR-IOV additional network. SSH into the pod and run the following command:
103+
. Verify that the pod network attachment is connected to the SR-IOV additional network. Remote shell into the pod and run the following command:
93104
+
94105
[source,terminal]
95106
----
@@ -113,6 +124,7 @@ $ ip link
113124
.Example output
114125
[source,terminal]
115126
----
127+
...
116128
5: net1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master red state UP mode
129+
...
117130
----
118-

0 commit comments

Comments
 (0)