Bug 2073113

Summary: Warning is logged to the console: W0407 Defaulting of registry auth file to "${HOME}/.docker/config.json" is deprecated.
Product: OpenShift Container Platform Reporter: Udi Kalifon <ukalifon>
Component: ocAssignee: Filip Krepinsky <fkrepins>
oc sub component: oc QA Contact: zhou ying <yinzhou>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: aos-bugs, mfojtik
Version: 4.10   
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 11:05:18 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 Udi Kalifon 2022-04-07 16:20:02 UTC
Description of problem:
When running "oc adm release info 4.10.0 --image-for=driver-toolkit" the client logs a warning to the terminal:

W0407 12:00:47.771950 1987240 helpers.go:151] Defaulting of registry auth file to "${HOME}/.docker/config.json" is deprecated. The default will be switched to podman config locations in the future version.

This doesn't happen with other oc adm commands. You get the same warning for other releases too, not just 4.10.0.


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


How reproducible:
100%


Steps to Reproduce:
1. on the command line, run:
oc adm release info 4.10.0 --image-for=driver-toolkit


Actual results:
W0407 12:00:47.771950 1987240 helpers.go:151] Defaulting of registry auth file to "${HOME}/.docker/config.json" is deprecated. The default will be switched to podman config locations in the future version.


Expected results:
No errors or warnings


Additional info:
I don't have a .docker directory in my $HOME at all. I don't understand if this warning is logged by the client or it comes from the server.

Comment 1 Filip Krepinsky 2022-04-08 20:29:22 UTC
Yes, such a warning is unnecessary if a user is not using docker. And the warning is coming from the client and not a server.

I have posted a fix for both of these issue.

Comment 4 zhou ying 2022-04-24 02:00:36 UTC
Confirmed with latest oc client, the issue has fixed:

oc version --client
Client Version: 4.11.0-202204222057.p0.gbd47bad.assembly.stream-bd47bad
Kustomize Version: v4.5.4



oc adm release info quay.io/openshift-release-dev/ocp-release:4.10.11-x86_64
Name:      4.10.11
Digest:    sha256:0dc1a4b4d9ea7954987f63e506474a4f0dc55e5f1ea5c1f6f1179e2c09eaffda
Created:   2022-04-20T06:55:41Z
OS/Arch:   linux/amd64
Manifests: 542

Pull From: quay.io/openshift-release-dev/ocp-release@sha256:0dc1a4b4d9ea7954987f63e506474a4f0dc55e5f1ea5c1f6f1179e2c09eaffda

....



compared with older oc , still could reproduce :

oc adm release info quay.io/openshift-release-dev/ocp-release:4.10.11-x86_64
Warning: the default reading order of registry auth file will be changed from "${HOME}/.docker/config.json" to podman registry config locations in the future version. "${HOME}/.docker/config.json" is deprecated, but can still be used for storing credentials as a fallback. See https://github.com/containers/image/blob/main/docs/containers-auth.json.5.md for the order of podman registry config locations.
Name:      4.10.11
Digest:    sha256:0dc1a4b4d9ea7954987f63e506474a4f0dc55e5f1ea5c1f6f1179e2c09eaffda
Created:   2022-04-20T06:55:41Z
OS/Arch:   linux/amd64
Manifests: 542

Pull From: quay.io/openshift-release-dev/ocp-release@sha256:0dc1a4b4d9ea7954987f63e506474a4f0dc55e5f1ea5c1f6f1179e2c09eaffda

.....

Comment 6 errata-xmlrpc 2022-08-10 11:05:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5069