Skip to content

Commit 0070c3b

Browse files
authored
Merge pull request #59891 from orelmisan/update_dpdk_cluster_config
Virt: Update DPDK cluster configuration instructions
2 parents 125af3d + fdbb5ab commit 0070c3b

File tree

1 file changed

+32
-24
lines changed

1 file changed

+32
-24
lines changed

modules/virt-configuring-cluster-dpdk.adoc

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,10 @@ $ oc label node <node_name> node-role.kubernetes.io/worker-dpdk=""
3434
apiVersion: machineconfiguration.openshift.io/v1
3535
kind: MachineConfigPool
3636
metadata:
37-
name: dpdk-workers
37+
name: worker-dpdk
3838
labels:
39-
machineconfiguration.openshift.io/role: dpdk-workers
40-
pools.operator.machineconfiguration.openshift.io/dpdk-workers: ""
39+
machineconfiguration.openshift.io/role: worker-dpdk
4140
spec:
42-
configuration:
4341
machineConfigSelector:
4442
matchExpressions:
4543
- key: machineconfiguration.openshift.io/role
@@ -63,24 +61,48 @@ metadata:
6361
name: profile-1
6462
spec:
6563
cpu:
66-
isolated: 20,22,24,26,28,30,32,34,36,38,60,62,64,66,68,70,72,74,76,78
67-
reserved: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,21,23,25,27,29,31,33,35,37,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,61,63,65,67,69,71,73,75,77,79
64+
isolated: 4-39,44-79
65+
reserved: 0-3,40-43
6866
hugepages:
6967
defaultHugepagesSize: 1G
7068
pages:
71-
- count: 32
72-
size: 1G
69+
- count: 32
70+
node: 0
71+
size: 1G
72+
net:
73+
userLevelNetworking: true
74+
nodeSelector:
75+
node-role.kubernetes.io/worker-dpdk: ""
7376
numa:
7477
topologyPolicy: single-numa-node
75-
nodeSelector:
76-
node-role.kubernetes.io/worker-dpdk: ""
7778
----
7879
+
7980
[NOTE]
8081
====
8182
The compute nodes automatically restart after you apply the `MachineConfigPool` and `PerformanceProfile` manifests.
8283
====
8384

85+
. Retrieve the name of the generated `RuntimeClass` resource from the `status.runtimeClass` field of the `PerformanceProfile` object:
86+
+
87+
[source,terminal]
88+
----
89+
$ oc get performanceprofiles.performance.openshift.io profile-1 -o=jsonpath='{.status.runtimeClass}{"\n"}'
90+
----
91+
92+
. Set the previously obtained `RuntimeClass` name as the default container runtime class for the `virt-launcher` pods by adding the following annotation to the `HyperConverged` custom resource (CR):
93+
+
94+
[source,terminal]
95+
----
96+
$ oc annotate --overwrite -n openshift-cnv hco kubevirt-hyperconverged \
97+
kubevirt.kubevirt.io/jsonpatch='[{"op": "add", "path": "/spec/configuration/defaultRuntimeClass", "value": <runtimeclass_name>}]'
98+
----
99+
+
100+
[NOTE]
101+
====
102+
Adding the annotation to the `HyperConverged` CR changes a global setting that affects all VMs that are created after the annotation is applied.
103+
Setting this annotation breaches support of the {VirtProductName} instance and must be used only on test clusters. For best performance, apply for a support exception.
104+
====
105+
84106
. Create an `SriovNetworkNodePolicy` object with the `spec.deviceType` field set to `vfio-pci`:
85107
+
86108
.Example `SriovNetworkNodePolicy` manifest
@@ -107,17 +129,3 @@ spec:
107129
nodeSelector:
108130
feature.node.kubernetes.io/network-sriov.capable: "true"
109131
----
110-
111-
. Set the container runtime configuration for the `virt-launcher` pod by adding the following annotation to the `HyperConverged` custom resource (CR):
112-
+
113-
[source,terminal]
114-
----
115-
$ oc annotate --overwrite -n openshift-cnv hco kubevirt-hyperconverged \
116-
kubevirt.kubevirt.io/jsonpatch='[{"op": "add", "path": "/spec/configuration/defaultRuntimeClass", "value": <runtimeclass-name>}]'
117-
----
118-
+
119-
[NOTE]
120-
====
121-
Adding the annotation to the `HyperConverged` CR changes a global setting that affects all VMs that are created after the annotation is applied.
122-
====
123-

0 commit comments

Comments
 (0)