Skip to content

Commit 3147b80

Browse files
author
Michael Burke
committed
edits
1 parent 8c4436f commit 3147b80

File tree

2 files changed

+44
-62
lines changed

2 files changed

+44
-62
lines changed

machine_configuration/machine-config-pin-preload-images-about.adoc

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,50 +14,16 @@ Pinning and preloading images can benefit a cluster that has a low bandwidth or
1414

1515
Preloading and pinning images prevents image garbage collection from removing the pinned images.
1616

17-
You can preload and pin images by using a a `PinnedImageSet` custom resource (CR) as described in the following section. Pinned images are stored in a file inside the `/etc/crio/crio.conf.d` directory. The name of this file is a concatenation of the name of the `PinnedImageSet` object and the UUID assigned to the object.
18-
19-
For example, the name of a pinned image file would be similar to the following name: `my-pinned-images-550a1d88-2976-4447-9fc7-b65e457a7f42.conf`. The contents of the file appear similar to the following example:
17+
You can preload and pin images by using a a `PinnedImageSet` custom resource (CR) as described in the following section. Pinned images are stored in the file inside the `/etc/crio/crio.conf.d/50-pinned-iamges` directory. The contents of the file appear similar to the following example:
2018

2119
[source,terminal]
2220
----
23-
pinned_images=[
24-
"quay.io/openshift-release-dev/ocp-release@sha256:...",
25-
"quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:...",
26-
"quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:...",
27-
...
28-
]
29-
----
30-
31-
Before pulling the images, the Machine Config Operator (MCO) verifies that there is enough space available on each affected node to store the images. If the node has sufficient space, the MCO creates the pinned image file, pulls the images, and reloads CRI-O.
32-
33-
The `PinnedImageSet` object reports if the images have been pinned and pulled successfully or lists error conditions if the pin and pull fails.
34-
35-
.Example successful `PinnedImageSet` status
36-
[source,yaml]
37-
----
38-
status:
39-
conditions:
40-
- type: Ready
41-
status: "True"
42-
- type: Failed
43-
status: "False"
44-
----
45-
46-
.Example filaed `PinnedImageSet` status
47-
[source,yaml]
48-
----
49-
50-
status:
51-
conditions:
52-
- type: Ready
53-
status: "False"
54-
- type: Failed
55-
status: "True"
56-
message: |
57-
Pulling the images in `node12` requires at least 16 GiB of disk
58-
space, but there are only 10 GiB available
21+
[crio]
22+
[crio.image]
23+
pinned_images = ["quay.io/openshift-release-dev/ocp-release@sha256:4198606580b69c8335ad7ae531c3a74e51aee25db5faaf368234e8c8dae5cbea", "quay.io/openshift-release-dev/ocp-release@sha256:513cf1028aa1a021fa73d0601427a0fbcf6d212b88aaf9d76d4e4841a061e44e", "quay.io/openshift-release-dev/ocp-release@sha256:61eae2d261e54d1b8a0e05f6b5326228b00468364563745eed88460af04f909b"]
5924
----
6025

26+
Before pulling the images, the Machine Config Operator (MCO) verifies that there is enough space available on each affected node to store the images. If the node has sufficient space, the MCO creates the pinned image file, pulls the images, and reloads CRI-O.
6127

6228
include::modules/machine-config-pin-preload-images.adoc[leveloffset=+1]
6329

modules/machine-config-pin-preload-images.adoc

Lines changed: 39 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ metadata:
2424
name: worker-pinned-images
2525
spec:
2626
pinnedImages: <2>
27-
- name: quay.io/openshifttest/busybox@sha256:0415f56ccc05526
28-
- name: quay.io/openshifttest/alpine@sha256:be92b18a369e989a
27+
- name: quay.io/openshift-release-dev/ocp-release@sha256:513cf1028aa1a021fa73d0601427a0fbcf6d212b88aaf9d76d4e4841a061e44e
28+
- name: quay.io/openshift-release-dev/ocp-release@sha256:61eae2d261e54d1b8a0e05f6b5326228b00468364563745eed88460af04f909b
2929
----
3030
+
3131
where:
@@ -66,18 +66,45 @@ kind: MachineConfigNode
6666
metadata:
6767
creationTimestamp: "2025-04-28T18:40:29Z"
6868
generation: 3
69-
name: <machine_config_node_name> <1>
69+
name: <machine_config_node_name>
7070
# ...
7171
status
7272
pinnedImageSets:
73-
- desiredGeneration: 1
73+
- currentGeneration: 1
74+
desiredGeneration: 1
7475
name: worker-pinned-images
7576
----
7677
+
77-
[NOTE]
78-
====
79-
It can take a few moments for the object to be fully updated.
80-
====
78+
Any failures or error messages would appear in the `MachineConfigNode` object status fields.
79+
+
80+
.Example output
81+
+
82+
[source,terminal]
83+
----
84+
apiVersion: machineconfiguration.openshift.io/v1
85+
kind: MachineConfigNode
86+
metadata:
87+
creationTimestamp: "2025-04-28T18:40:29Z"
88+
generation: 3
89+
name: <machine_config_node_name>
90+
# ...
91+
- lastTransitionTime: "2025-04-29T19:37:23Z"
92+
message: One or more PinnedImageSet is experiencing an error. See PinnedImageSet
93+
list for more details
94+
reason: PrefetchFailed
95+
status: "True"
96+
type: PinnedImageSetsDegraded
97+
configVersion:
98+
current: rendered-worker-cef1b52c532e19a20add12e369261fba
99+
desired: rendered-worker-cef1b52c532e19a20add12e369261fba
100+
observedGeneration: 3
101+
pinnedImageSets:
102+
- desiredGeneration: 1
103+
lastFailedGeneration: 1
104+
lastFailedGenerationError: 'failed to execute podman manifest inspect for "quay.io/rh-ee/machine-config-operator@sha256:65d3a308767b1773b6e3499dde6ef085753d7e20e685f78841079":
105+
exit status 125'
106+
name: worker-pinned-images
107+
----
81108
82109
* Check that the pinned image file is created and contains the correct images. The contents of the file appear similar to the following example:
83110
@@ -105,25 +132,14 @@ $ cat /etc/crio/crio.conf.d/<pinned_image_set_name>
105132
.Example command
106133
[source,terminal]
107134
----
108-
$ cat /etc/crio/crio.conf.d/worker-pinned-images-0b38991f-90d4-4d54-b111
135+
$ cat /etc/crio/crio.conf.d/50-pinned-images
109136
----
110137
+
111138
.Example output
112139
+
113140
[source,terminal]
114141
----
115-
pinned_images=[
116-
"quay.io/openshift-release-dev/ocp-release@sha256:...",
117-
"quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:...",
118-
"quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:...",
119-
...
120-
]
142+
[crio]
143+
[crio.image]
144+
pinned_images = ["quay.io/openshift-release-dev/ocp-release@sha256:4198606580b69c8335ad7ae531c3a74e51aee25db5faaf368234e8c8dae5cbea", "quay.io/openshift-release-dev/ocp-release@sha256:513cf1028aa1a021fa73d0601427a0fbcf6d212b88aaf9d76d4e4841a061e44e", "quay.io/openshift-release-dev/ocp-release@sha256:61eae2d261e54d1b8a0e05f6b5326228b00468364563745eed88460af04f909b"]
121145
----
122-
123-
* Verify that the that pin and pull was successful by checking the `PinnedImageSet` object status:
124-
+
125-
[source,terminal]
126-
----
127-
$ oc describe PinnedImageSet worker-pinned-images
128-
----
129-

0 commit comments

Comments
 (0)