Skip to content

Commit 19069a3

Browse files
author
Michael Burke
committed
edits from testing
1 parent 3147b80 commit 19069a3

File tree

2 files changed

+15
-23
lines changed

2 files changed

+15
-23
lines changed

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
:_mod-docs-content-type: ASSEMBLY
22
[id="machine-config-pin-preload-images-about"]
3-
= About preloading and pinning images
3+
= About pinning and preloading images
44
include::_attributes/common-attributes.adoc[]
55
:context: machine-config-operator
66

77
toc::[]
88

9-
Slow and unreliable connections to an image registry can interfere with operations that require pulling images, such as updating a cluster or deploying an application. This can be helpful in cluster with low bandwidth, unreliable internet connectivity, or in a disconnected environment.
9+
Slow and unreliable connections to an image registry can interfere with operations that require pulling images, such as updating a cluster or deploying an application. This can include clusters that have low bandwidth, unreliable internet connectivity, or clusters in a disconnected environment.
1010

11-
For example, an cluster update might require pulling more than one hundred images. Failure to pull those images causes retries that can interfere with the upgrade process and might cause the update fail. One way to improve that is to _preload_ the required images by pulling them in advance, before they are actually needed. Then, ensuring that the images are available when needed by _pinning_ them to a machine config pool. Pinning and preloading images can provide a more consistent upgrade, which is important when scheduling upgrades into maintenance windows.
11+
For example, a cluster update might require pulling more than one hundred images. Failure to pull those images could cause retries that can interfere with the upgrade process and might cause the update to fail. One way to improve that is to _preload_ the required images by pulling them in advance, before they are actually needed. Then, ensuring that the images are available when needed by _pinning_ them to a machine config pool. Pinning and preloading images can provide a more consistent upgrade, which is important when scheduling upgrades into maintenance windows.
1212

13-
Pinning and preloading images can benefit a cluster that has a low bandwidth or an unreliable connection to an image registry server when deploying applications, ensuring that the images are available and application will successfully deploy in a predictable time.
13+
Pinning and preloading images ensures that the images are available and application can successfully deploy in a predictable time. Another benefit to pinning and preloading images is that image garbage collection does not remove the pinned images.
1414

15-
Preloading and pinning images prevents image garbage collection from removing the pinned images.
16-
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:
15+
You can pin and preload images by using a a `PinnedImageSet` custom resource (CR) as described in the following section. Pinned images are stored on the nodes in the `/etc/crio/crio.conf.d/50-pinned-iamges` file. The contents of the file appear similar to the following example:
1816

1917
[source,terminal]
2018
----
@@ -23,7 +21,7 @@ You can preload and pin images by using a a `PinnedImageSet` custom resource (CR
2321
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"]
2422
----
2523

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.
24+
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. If there is not sufficient space, the MCO does not pull the images and presents an error message.
2725

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

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

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
:_mod-docs-content-type: PROCEDURE
66
[id="machine-config-pin-preload-images_{context}"]
7-
= Preloading and pinning and images
7+
= Pinning and preloading images
88

9-
You can preload and pin images by using a `PinnedImageSet` custom resource (CR). The pinned image set defines the list of images to preload and the machine config pool that the images should be pinned to.
9+
You can pin and preload images by using a `PinnedImageSet` custom resource (CR). The pinned image set defines the list of images to preload and the machine config pool that the images should be pinned to.
1010

11-
The file is stored in the the `/etc/crio/crio.conf.d` directory under a name that is a concatenation of the name of the `PinnedImageSet` object and the UUID assigned to the object.
11+
The images are stored in the the `/etc/crio/crio.conf.d/50-pinned-images` file on the nodes.
1212

1313
.Procedure
1414

@@ -19,8 +19,8 @@ The file is stored in the the `/etc/crio/crio.conf.d` directory under a name tha
1919
apiVersion: machineconfiguration.openshift.io/v1
2020
kind: PinnedImageSet
2121
metadata:
22-
labels:
23-
machineconfiguration.openshift.io/role: worker <1>
22+
labels: <1>
23+
machineconfiguration.openshift.io/role: worker
2424
name: worker-pinned-images
2525
spec:
2626
pinnedImages: <2>
@@ -31,7 +31,7 @@ spec:
3131
where:
3232
+
3333
--
34-
`labels`:: Specifies an optional node selector to specify the machine config pool to pin the images to. If not specified, the images are pinned to all nodes in the cluster. the relative path to the downloaded ISO file, for example, `rhcos-live.iso`.
34+
`labels`:: Specifies an optional node selector to specify the machine config pool to pin the images to. If not specified, the images are pinned to all nodes in the cluster.
3535
`pinnedImages`:: Specifies a list of one or more images to preload.
3636
--
3737

@@ -57,7 +57,7 @@ $ oc describe machineconfignode <machine_confignode_name>
5757
$ oc describe machineconfignode ci-ln-25hlkvt-72292-jrs48-worker-a-2bdj
5858
----
5959
+
60-
.Example output
60+
.Example output for a successful image pull and pin
6161
+
6262
[source,terminal]
6363
----
@@ -75,9 +75,9 @@ status
7575
name: worker-pinned-images
7676
----
7777
+
78-
Any failures or error messages would appear in the `MachineConfigNode` object status fields.
78+
Any failures or error messages would appear in the `MachineConfigNode` object status fields, as shown in the following example:
7979
+
80-
.Example output
80+
.Example output for a failed image pull and pin
8181
+
8282
[source,terminal]
8383
----
@@ -126,12 +126,6 @@ sh-5.1# chroot /host
126126
+
127127
[source,terminal]
128128
----
129-
$ cat /etc/crio/crio.conf.d/<pinned_image_set_name>
130-
----
131-
+
132-
.Example command
133-
[source,terminal]
134-
----
135129
$ cat /etc/crio/crio.conf.d/50-pinned-images
136130
----
137131
+

0 commit comments

Comments
 (0)