mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-07 00:48:01 +01:00
112 lines
3.7 KiB
Plaintext
112 lines
3.7 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * nodes/nodes/nodes-nodes-working.adoc
|
|
// * post_installation_configuration/machine-configuration-tasks.adoc
|
|
|
|
[id="nodes-nodes-rtkernel-arguments_{context}"]
|
|
|
|
= Adding a real-time kernel to nodes
|
|
|
|
Some {product-title} workloads require a high degree of determinism.
|
|
While Linux is not a real-time operating system, the Linux real-time
|
|
kernel includes a preemptive scheduler that provides the operating
|
|
system with real-time characteristics.
|
|
|
|
If your {product-title} workloads require these real-time characteristics,
|
|
you can switch your compute (worker) and/or master machines to the Linux
|
|
real-time kernel. For {product-title}, {product-version} you can make this
|
|
switch using a MachineConfig object. Although making the change is as simple
|
|
as changing a MachineConfig `kernelType` setting to `realtime`, there are a few
|
|
other considerations before making the change:
|
|
|
|
[NOTE]
|
|
====
|
|
This procedure is fully supported with bare metal installations using
|
|
systems that are certified for Red Hat Enterprise Linux for Real Time 8.
|
|
Real time support in {product-title} is also limited to specific subscriptions.
|
|
This procedure is also supported for use with Google Cloud Platform
|
|
====
|
|
|
|
.Prerequisites
|
|
* Have a running {product-title} cluster (version 4.4 or later).
|
|
* Log in to the cluster as a user with administrative privileges.
|
|
|
|
.Procedure
|
|
|
|
. Create a MachineConfig for the real-time kernel: Create a YAML file
|
|
(for example, `99-worker-realtime.yaml`) that contains a MachineConfig
|
|
object for the `realtime` kernelType. This example tells the cluster to
|
|
use a real-time kernel for all worker nodes:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ cat << EOF > 99-worker-realtime.yaml
|
|
apiVersion: machineconfiguration.openshift.io/v1
|
|
kind: MachineConfig
|
|
metadata:
|
|
labels:
|
|
machineconfiguration.openshift.io/role: "worker"
|
|
name: 99-worker-realtime
|
|
spec:
|
|
kernelType: realtime
|
|
EOF
|
|
----
|
|
+
|
|
You can change `worker` to `master` to add kernel arguments to master nodes instead.
|
|
Create a separate YAML file to add to both master and worker nodes.
|
|
|
|
. Add the MachineConfig to the cluster. Type the following to add the MachineConfig
|
|
to the cluster:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc create -f 99-worker-realtime.yaml
|
|
----
|
|
|
|
. Check the real-time kernel: Once each impacted node reboots, log in to the cluster
|
|
and run the following commands to make sure that the real-time kernel has
|
|
replaced the regular kernel for the set of worker or master nodes you
|
|
configured:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get nodes
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
NAME STATUS ROLES AGE VERSION
|
|
ip-10-0-139-200.us-east-2.compute.internal Ready master 111m v1.19.0
|
|
ip-10-0-143-147.us-east-2.compute.internal Ready worker 103m v1.19.0
|
|
ip-10-0-146-92.us-east-2.compute.internal Ready worker 101m v1.19.0
|
|
ip-10-0-156-255.us-east-2.compute.internal Ready master 111m v1.19.0
|
|
ip-10-0-164-74.us-east-2.compute.internal Ready master 111m v1.19.0
|
|
ip-10-0-169-2.us-east-2.compute.internal Ready worker 102m v1.19.0
|
|
----
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc debug node/ip-10-0-143-147.us-east-2.compute.internal
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
Starting pod/ip-10-0-143-147us-east-2computeinternal-debug ...
|
|
To use host binaries, run `chroot /host`
|
|
|
|
sh-4.4# uname -a
|
|
Linux <worker_node> 4.18.0-147.3.1.rt24.96.el8_1.x86_64 #1 SMP PREEMPT RT
|
|
Wed Nov 27 18:29:55 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
|
|
----
|
|
+
|
|
The kernel name contains `rt` and text “PREEMPT RT” indicates that this is a real-time kernel.
|
|
|
|
. To go back to the regular kernel, delete the MachineConfig object:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc delete -f 99-worker-realtime.yaml
|
|
----
|