Bug 1972660 - instructions for mirror hosts without internet access for `oc adm release extract` are wrong
Summary: instructions for mirror hosts without internet access for `oc adm release ext...
Keywords:
Status: CLOSED DUPLICATE of bug 1823143
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 4.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Vikram Goyal
QA Contact: Xiaoli Tian
Vikram Goyal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-16 11:46 UTC by Andreas Karis
Modified: 2021-06-16 11:55 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-16 11:55:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Andreas Karis 2021-06-16 11:46:59 UTC
Document URL: 
https://docs.openshift.com/container-platform/4.6/installing/installing-mirroring-installation-images.html#installation-mirror-repository_installing-mirroring-installation-images
https://docs.openshift.com/container-platform/4.7/installing/installing-mirroring-installation-images.html#installation-mirror-repository_installing-mirroring-installation-images

Section Number and Name: 
4.

Describe the issue: 

The instructions for mirror hosts without internet access for `oc adm release extract` are difficult to understand at best, or simply wrong at worst [0]

Here is what happens when running the following on the mirror host without internet access:
~~~
[root@openshift-jumpserver-0 ~]# oc adm release extract -a ${LOCAL_SECRET_JSON} --command=openshift-install "${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}"
error: unable to connect to image repository quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:cd948cbb88ad5b4659f7c029d1f0046cf3fef6d0a603328ce70dc72e17c78c13: Get "https://quay.io/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
~~~

That's logical, the adm release extract command tries to get the image from quay.io and it fails because this is a disconnected image mirror. 

The instructions right below that are also wrong and seem to refer to something else (different indentation) [1]
~~~
[root@openshift-jumpserver-0 ~]# oc adm release extract -a ${LOCAL_SECRET_JSON} --command=openshift-install "${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}" --image
Error: unknown flag: --image
See 'oc adm release extract --help' for usage.
~~~

Suggestions for improvement: 

Additional information: 


[0]
---
To create the installation program that is based on the content that you mirrored, extract it and pin it to the release:

    If your mirror host does not have Internet access, run the following command:

    $ oc adm release extract -a ${LOCAL_SECRET_JSON} --command=openshift-install "${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}"

    If the local container registry is connected to the mirror host, run the following command:

    $ oc adm release extract -a ${LOCAL_SECRET_JSON} --command=openshift-install "${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}-${ARCHITECTURE}"
---

[1]
---
 	

To ensure that you use the correct images for the version of OpenShift Container Platform that you selected, you must extract the installation program from the mirrored content.

You must perform this step on a machine with an active Internet connection.

If you are in a disconnected environment, use the --image flag as part of must-gather and point to the payload image.
---

Comment 1 Andreas Karis 2021-06-16 11:55:29 UTC

*** This bug has been marked as a duplicate of bug 1823143 ***


Note You need to log in before you can comment on or make changes to this bug.