Skip to content

Commit c8c5ec4

Browse files
authored
Merge pull request #98829 from mburke5678/mco-ocl-make-errors-easier
OSDOCS15909: On Cluster Layering: Make it easier to see errors
2 parents 795a0e9 + 9852848 commit c8c5ec4

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

modules/coreos-layering-configuring-on-proc.adoc

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,37 @@ machine-os-builder-6fb66cfb99-zcpvq 1/1
132132
<1> This is the build pod where the custom layered image is building, named in the `build-<MachineOSConfig_CR_name>-<hash>` format.
133133
<2> This pod can be used for troubleshooting.
134134

135+
. Verify the custom layered image build by running a command similar to the following:
136+
+
137+
[source,terminal]
138+
----
139+
$ oc get machineconfigpool <mcp_name> -o yaml
140+
----
141+
+
142+
.Example output
143+
[source,terminal]
144+
----
145+
apiVersion: machineconfiguration.openshift.io/v1
146+
kind: MachineConfigPool
147+
metadata:
148+
labels:
149+
machineconfiguration.openshift.io/mco-built-in: ""
150+
pools.operator.machineconfiguration.openshift.io/layered: ""
151+
name: layered
152+
# ...
153+
status:
154+
# ...
155+
conditions
156+
# ...
157+
- lastTransitionTime: "2025-09-09T13:43:35Z"
158+
message: 'Failed to build OS image for pool worker (MachineOSBuild: worker-2d03dc921ff0c242c5892a3ef1ed1608):
159+
Failed: Build Failed'
160+
reason: BuildFailed
161+
status: "True" <1>
162+
type: ImageBuildDegraded
163+
----
164+
<1> Indicates whether the custom layered image build failed. If `False`, the build succeeded. If `True`, the build failed. You can use the build pod logs to troubleshoot any build failures.
165+
135166
. Verify the current stage of your layered build by running the following command:
136167
+
137168
[source,terminal]
@@ -143,7 +174,7 @@ $ oc get machineosbuilds
143174
[source,terminal]
144175
----
145176
NAME PREPARED BUILDING SUCCEEDED INTERRUPTED FAILED AGE
146-
layered-image-ad5a3cad36303c363cf458ab0524e7c0 False True False False False 12m <1>
177+
layered-image-ad5a3cad36303c363cf458ab0524e7c0 False True False False False 12m <1>
147178
----
148179
<1> The `MachineOSBuild` is named in the `<MachineOSConfig_CR_name>-<hash>` format.
149180

modules/coreos-layering-configuring-on.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ For {sno} clusters, you can apply a custom layered image to the control plane no
5858

5959
include::snippets//coreos-layering-configuring-on-pause.adoc[]
6060

61-
In the case of a build failure, for example due to network issues or an invalid secret, the MCO retries the build three additional times before the job fails. The MCO creates a different build pod for each build attempt. You can use the build pod logs to troubleshoot any build failures. Note that the MCO automatically removes these build pods after a short period of time.
61+
In the case of a build failure, for example due to network issues or an invalid secret, the MCO retries the build three additional times before the job fails. The MCO creates a different build pod for each build attempt. Note that the MCO automatically removes these build pods after a short period of time. Also, the affected machine config pool reports a build failure through the `ImageBuildDegraded` status condition. You can use the build pod logs to troubleshoot any build failures.
6262

6363
.Example failed `MachineOSBuild` object
6464
[source,terminal]

0 commit comments

Comments
 (0)