Updating a cluster that includes the Special Resource Operator
When updating a cluster that includes the Special Resource Operator (SRO), it is important to consider whether the new kernel module version is compatible with the kernel modules currently loaded by the SRO. You can run a preflight check to confirm if the SRO will be able to upgrade the kernel modules.
Custom resource and verification status information
The preflight check provides information on the status of the custom resource (CR) and the status of the verification.
Possible CR statuses
The possible CR statuses are as follows:
True
The Special Resource Operator (SRO) CR will upgrade without kernel compatibility issues.
False
There is an issue with kernel compatibility for the CR. The Status Reason
field provides additional information on this.
Error
The status check was not completed due to an internal error. The Status Reason
field provides additional information on debugging this.
Unknown
The check has not yet verified the status of the CR. This might be because the process has not yet reached the specific CR or not enough time has elapsed for the check to complete.
Possible verification statuses
The possible verification statuses are as follows:
True
The image exists and is compatible, or the image does not exist but there is a BuildConfig
resource in place.
False
The image does not exist and there is no BuildConfig
resource in place, or an image exists but it is not compatible with the new kernel version.
If the verification status is False
, you can take one of the following steps:
Create a prebuilt image with the correct name and check the status field again.
Change the CR to include a
BuildConfig
reosurce.
Running a preflight check for the Special Resource Operator
You can use the following example procedure to check the compatibility of a kernel module version before updating a cluster that includes the Special Resource Operator (SRO).
Prerequisites
You have a running OKD cluster.
You installed the OpenShift CLI (
oc
).You are logged in to the OpenShift CLI as a user with
cluster-admin
privileges.You installed the SRO.
Procedure
Create the following preflight validation custom resource definition (CRD) and save the YAML as
prevalidation.yaml
.apiVersion: sro.openshift.io/v1beta1
kind: PreflightValidation
metadata:
name: preflight
namespace: preflight
spec:
updateImage: quay.io/openshift-release-dev/ocp-release@sha256:f7f252c39b64601c8ac3de737a584ba4f6016b1f4b17801d726ca2fd15492878 (1)
1 Specify the name of the update image here. Start the validation check by running the following command:
$ oc apply -f prevalidation.yaml
Verification
Check the status of the custom resource (CR) by running the following command:
$ oc describe preflightvalidations.sro.openshift.io/v1beta1 preflight
Example output
The following is an example output in which
simple-oot
is aSpecialResource
CR that is deployed on the cluster.Status:
Cr Statuses:
Last Transition Time: 2022-08-02T08:48:45Z
Name: simple-oot
Status Reason: Verification successful, all driver-containers for the next kernel version are present
Verification Stage: Image
Verification Status: True
Events: <none>
The preflight check continues to run until all CRs are verified. You can repeat the preceding command to check the status. After all CRs are verified, you should delete the preflight CR.