Bug 1827101

Summary: oc adm release extract tries to pull image from quay.io even when local registry is specified
Product: OpenShift Container Platform Reporter: Leonid Titov <ltitov>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED DUPLICATE QA Contact: zhou ying <yinzhou>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.3.zCC: aos-bugs, jokerman, mfojtik
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-23 11:33:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Leonid Titov 2020-04-23 09:37:18 UTC
Description of problem:

When try to do 'oc adm release extract' from local registry in disconnected environment, tool is trying to reach public 'quay.io' instead of local registry

Version-Release number of selected component (if applicable):

Detected on 4.3.8

How reproducible:

Always.

Steps to Reproduce:
1. Deploy local registry and mirror public content there according to the doc [1]
2. Issue a 'oc adm -a ${LOCAL_SECRET_JSON} release extract -v=7 --command=openshift-install "${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}" 2>&1 | tee oc-release-extract.log' command 


Actual results:

it will eventually pull quay.io: 

I0423 10:02:58.869971    7170 extract_tools.go:315] Skipping openshift-install-mac-%s.tar.gz, does not match current OS darwin
I0423 10:02:58.870024    7170 extract_tools.go:323] Will extract usr/bin/openshift-install from quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:958fb6dc2f5d44aaf34e073b0e69e38599df5fd4269c2bed96484aba8b388333
I0423 10:02:58.870205    7170 config.go:137] looking for config.json at /home/ltitov/.docker/config.json
I0423 10:02:58.870603    7170 config.go:145] found valid config.json at /home/ltitov/.docker/config.json
I0423 10:02:58.871040    7170 workqueue.go:54] worker 0 stopping
I0423 10:02:58.871073    7170 workqueue.go:60] work queue exiting
I0423 10:02:58.871237    7170 round_trippers.go:420] GET https://quay.io/v2/



Expected results:

All necessary things should be pulled from local registry.

Additional info:

Used environment vars and full log will be uploaded here shortly.
The 'oc adm release extract' will fail if the host machine can't access quay.io. This scenario is shown in full log.

1. https://docs.openshift.com/container-platform/4.3/installing/install_config/installing-restricted-networks-preparations.html#cli-installing-cli_installing-restricted-networks-preparations

Comment 3 Leonid Titov 2020-04-23 09:43:40 UTC
oc version --client=true
Client Version: 4.3.9

Comment 4 Maciej Szulik 2020-04-23 11:33:53 UTC

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