Skip to content

Commit c26b550

Browse files
authored
Merge pull request #35283 from mburke5678/BZ-1976328
BZ1976328: Document the CRI-O can logs the image pull source in the info level log
2 parents 5237fc5 + 21c4741 commit c26b550

File tree

6 files changed

+66
-1
lines changed

6 files changed

+66
-1
lines changed

installing/installing-mirroring-installation-images.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ If you have an entitlement to Red Hat Quay, see the documentation on deploying R
3131

3232
include::modules/installation-about-mirror-registry.adoc[leveloffset=+1]
3333

34+
.Additional information
35+
36+
For information on viewing the CRI-O logs to view the image source, see xref:../installing/validating-an-installation.html#viewing-the-image-pull-source_validating-an-installation[Viewing the image pull source].
37+
3438
[id="installing-preparing-mirror"]
3539
== Preparing your mirror host
3640

installing/validating-an-installation.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ You can check the status of an {product-title} cluster after an installation by
1010
//Reviewing the installation log
1111
include::modules/reviewing-the-installation-log.adoc[leveloffset=+1]
1212

13+
//Viewing the image pull source
14+
include::modules/viewing-the-image-pull-source.adoc[leveloffset=+1]
15+
1316
//Getting cluster version, status, and update details
1417
include::modules/getting-cluster-version-status-and-update-details.adoc[leveloffset=+1]
1518

modules/installation-about-mirror-registry.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// Module included in the following assemblies:
22
//
3-
// * installing/install_config/installing-restricted-networks-preparations.adoc
3+
// * installing/installing-mirroring-installation-images.adoc
44
// * openshift_images/samples-operator-alt-registry.adoc
5+
// * scalability_and_performance/ztp-deploying-disconnected.adoc
56

67
[id="installation-about-mirror-registry_{context}"]
78
= About the mirror registry
@@ -13,3 +14,6 @@ The mirror registry can be any container registry that supports link:https://doc
1314
The mirror registry must be reachable by every machine in the clusters that you provision. If the registry is unreachable installation, updating, or normal operations such as workload relocation might fail. For that reason, you must run mirror registries in a highly available way, and the mirror registries must at least match the production availability of your {product-title} clusters.
1415

1516
When you populate a mirror registry with {product-title} images, you can follow two scenarios. If you have a host that can access both the internet and your mirror registry, but not your cluster nodes, you can directly mirror the content from that machine. This process is referred to as _connected mirroring_. If you have no such host, you must mirror the images to a file system and then bring that host or removable media into your restricted environment. This process is referred to as _disconnected mirroring_.
17+
18+
For mirrored registries, to view the source of pulled images, you must review the `Trying to access` log entry in the CRI-O logs. Other methods to view the image pull source, such as using the `crictl images` command on a node, show the non-mirrored image name, even though the image is pulled from the mirrored location.
19+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// Module included in the following assemblies:
2+
//
3+
// *installing/validating-an-installation.adoc
4+
5+
[id="viewing-the-image-pull-source_{context}"]
6+
= Viewing the image pull source
7+
8+
For clusters with unrestricted network connectivity, you can view the source of your pulled images by using a command on a node, such as `crictl images`.
9+
10+
However, for disconnected installations, to view the source of pulled images, you must review the CRI-O logs to locate the `Trying to access` log entry, as shown in the following procedure. Other methods to view the image pull source, such as the `crictl images` command, show the non-mirrored image name, even though the image is pulled from the mirrored location.
11+
12+
.Prerequisites
13+
14+
* You have access to the cluster as a user with the `cluster-admin` role.
15+
16+
.Procedure
17+
18+
* Review the CRI-O logs for a master or worker node:
19+
+
20+
[source,terminal]
21+
----
22+
$ oc adm node-logs <node_name> -u crio
23+
----
24+
+
25+
.Example output
26+
+
27+
The `Trying to access` log entry indicates where the image is being pulled from.
28+
+
29+
[source,terminal]
30+
----
31+
...
32+
Mar 17 02:52:50 ip-10-0-138-140.ec2.internal crio[1366]: time="2021-08-05 10:33:21.594930907Z" level=info msg="Pulling image: quay.io/openshift-release-dev/ocp-release:4.8.4-ppc64le" id=abcd713b-d0e1-4844-ac1c-474c5b60c07c name=/runtime.v1alpha2.ImageService/PullImage
33+
Mar 17 02:52:50 ip-10-0-138-140.ec2.internal crio[1484]: time="2021-03-17 02:52:50.194341109Z" level=info msg="Trying to access \"li0317gcp1.mirror-registry.qe.gcp.devcluster.openshift.com:5000/ocp/release@sha256:1926eae7cacb9c00f142ec98b00628970e974284b6ddaf9a6a086cb9af7a6c31\""
34+
Mar 17 02:52:50 ip-10-0-138-140.ec2.internal crio[1484]: time="2021-03-17 02:52:50.226788351Z" level=info msg="Trying to access \"li0317gcp1.mirror-registry.qe.gcp.devcluster.openshift.com:5000/ocp/release@sha256:1926eae7cacb9c00f142ec98b00628970e974284b6ddaf9a6a086cb9af7a6c31\""
35+
...
36+
----
37+
+
38+
The log might show the image pull source twice, as shown in the preceding example.
39+
+
40+
If your `ImageContentSourcePolicy` object lists multiple mirrors, {product-title} attempts to pull the images in the order listed in the configuration, for example:
41+
+
42+
----
43+
Trying to access \"li0317gcp1.mirror-registry.qe.gcp.devcluster.openshift.com:5000/ocp/release@sha256:1926eae7cacb9c00f142ec98b00628970e974284b6ddaf9a6a086cb9af7a6c31\"
44+
Trying to access \"li0317gcp2.mirror-registry.qe.gcp.devcluster.openshift.com:5000/ocp/release@sha256:1926eae7cacb9c00f142ec98b00628970e974284b6ddaf9a6a086cb9af7a6c31\"
45+
----
46+

openshift_images/samples-operator-alt-registry.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ You must have access to the internet to obtain the necessary container images. I
1414

1515
include::modules/installation-about-mirror-registry.adoc[leveloffset=+1]
1616

17+
.Additional information
18+
19+
For information on viewing the CRI-O logs to view the image source, see xref:../installing/validating-an-installation.html#viewing-the-image-pull-source_validating-an-installation[Viewing the image pull source].
20+
1721
[id="samples-preparing-bastion"]
1822
=== Preparing the mirror host
1923

scalability_and_performance/ztp-deploying-disconnected.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ Before you perform the mirror registry procedure, you must prepare the mirror ho
3535

3636
include::modules/installation-about-mirror-registry.adoc[leveloffset=+2]
3737

38+
.Additional information
39+
40+
For information on viewing the CRI-O logs to view the image source, see xref:../installing/validating-an-installation.html#viewing-the-image-pull-source_validating-an-installation[Viewing the image pull source].
41+
3842
[IMPORTANT]
3943
====
4044
You must have access to the internet to obtain the necessary container images.

0 commit comments

Comments
 (0)