|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * updating/updating-clusters-sro.adoc |
| 4 | + |
| 5 | +:_content-type: PROCEDURE |
| 6 | +[id="updating-running-a-preflight-check-for-sro_{context}"] |
| 7 | += Running a preflight check for the Special Resource Operator |
| 8 | + |
| 9 | +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). |
| 10 | + |
| 11 | +.Prerequisites |
| 12 | + |
| 13 | +* You have a running {product-title} cluster. |
| 14 | +* You installed the OpenShift CLI (`oc`). |
| 15 | +* You are logged in to the OpenShift CLI as a user with `cluster-admin` privileges. |
| 16 | +* You installed the SRO. |
| 17 | +
|
| 18 | +.Procedure |
| 19 | + |
| 20 | +. Create the following preflight validation custom resource definition (CRD) and save the YAML as `prevalidation.yaml`. |
| 21 | ++ |
| 22 | +[source,yaml] |
| 23 | +---- |
| 24 | +apiVersion: sro.openshift.io/v1beta1 |
| 25 | +kind: PreflightValidation |
| 26 | +metadata: |
| 27 | + name: preflight |
| 28 | + namespace: preflight |
| 29 | +spec: |
| 30 | + updateImage: quay.io/openshift-release-dev/ocp-release@sha256:f7f252c39b64601c8ac3de737a584ba4f6016b1f4b17801d726ca2fd15492878 <1> |
| 31 | +---- |
| 32 | +<1> Specify the name of the update image here. |
| 33 | ++ |
| 34 | +. Start the validation check by running the following command: |
| 35 | ++ |
| 36 | +[source,terminal] |
| 37 | +---- |
| 38 | +$ oc apply -f prevalidation.yaml |
| 39 | +---- |
| 40 | + |
| 41 | +.Verification |
| 42 | +* Check the status of the custom resource (CR) by running the following command: |
| 43 | ++ |
| 44 | +[source,terminal] |
| 45 | +---- |
| 46 | +$ oc describe preflightvalidations.sro.openshift.io/v1beta1 preflight |
| 47 | +---- |
| 48 | ++ |
| 49 | +.Example output |
| 50 | +The following is an example output in which `simple-oot` is a `SpecialResource` CR that is deployed on the cluster. |
| 51 | ++ |
| 52 | +[source,terminal] |
| 53 | +---- |
| 54 | +Status: |
| 55 | + Cr Statuses: |
| 56 | + Last Transition Time: 2022-08-02T08:48:45Z |
| 57 | + Name: simple-oot |
| 58 | + Status Reason: Verification successful, all driver-containers for the next kernel version are present |
| 59 | + Verification Stage: Image |
| 60 | + Verification Status: True |
| 61 | +Events: <none> |
| 62 | +---- |
| 63 | ++ |
| 64 | +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. |
0 commit comments