Bug 2049889

Summary: oc new-app --search nodejs warns about access to sample content on quay.io
Product: OpenShift Container Platform Reporter: Mike Fiedler <mifiedle>
Component: BuildAssignee: Gabe Montero <gmontero>
Status: CLOSED ERRATA QA Contact: Jitendar Singh <jitsingh>
Severity: medium Docs Contact: Rolfe Dlugy-Hegwer <rdlugyhe>
Priority: medium    
Version: 4.10CC: gmontero, pbhattac, pkumari, spandura
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Before this update, using the `$ oc new-app --search <image_stream_name> threw a warning that `you may not have access to the container image "docker.io/library/<image_name>:<tag>"`, which caused concern or confusion about {product-title} having image streams that pointed to `docker.io`. This update fixes the issue by adding code checks to prevent that confusing reference to 'docker.io'. Now, the output from that command makes sense and does not include distracting messages about `docker.io`.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 10:46:42 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 Mike Fiedler 2022-02-02 20:47:33 UTC
Description of problem:

oc new-app --search nodejs throws a warning that "you may not have access to the container image "docker.io/library/nodejs:latest"

Why are we still going to docker.io for sample content?  Shouldn't this be quay.io or registry.redhat.io?

oc new-app --search ruby does not throw the warning.

# oc new-app --search nodejs
W0202 20:37:38.073924 2400977 dockerimagelookup.go:300] container image remote registry lookup failed: you may not have access to the container image "docker.io/library/nodejs:latest"
Templates (oc new-app --template=<template>)
-----
nodejs-postgresql-example
  Project: openshift
  An example Node.js application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.

WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.
nodejs-postgresql-persistent
  Project: openshift
  An example Node.js application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.

Image streams (oc new-app --image-stream=<image-stream> [--code=<source>])
-----
nodejs
  Project: openshift
  Tags:    14-ubi8, 14-ubi8-minimal, 16-ubi8, 16-ubi8-minimal, latest
jenkins-agent-nodejs
  Project: openshift


Version-Release number of selected component (if applicable): 4.10.0-rc.0


How reproducible: always


Steps to Reproduce:
1. oc new-app --search nodejs
2.
3.

Comment 1 David Peraza 2022-03-02 18:48:58 UTC
Hum, checking on this, I would also expect it to be quay.io or registry.redhat.io

Comment 2 David Peraza 2022-03-02 18:56:06 UTC
I do see a few image streams that still use docker.io but nodejs is not one of them: https://github.com/openshift/cluster-samples-operator/search?q=docker.io

Could this be a tag that was added after Samples was installed?

Comment 3 Gabe Montero 2022-03-02 22:42:38 UTC
This is a build thing, not samples, and I believe is related to https://github.com/openshift/oc/pull/742 and https://bugzilla.redhat.com/show_bug.cgi?id=1928850 which I handled last year

It is EOB here but I'll refresh my memory with this PR/BZ ^^ tomorrow and see if we either missed something there, or if there is some working as designed elements, were we still have to check docker.io based on how the docker client works, even if we ultimately also check quay.io, registry.redhat.io, etc.

Comment 8 Priti Kumari 2022-03-14 07:12:51 UTC
Verified with 4.11 image

==================

$ oc new-app --search nodejs
Templates (oc new-app --template=<template>)
-----
nodejs-postgresql-example
  Project: openshift
  An example Node.js application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.

WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.
nodejs-postgresql-persistent
  Project: openshift
  An example Node.js application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.

Image streams (oc new-app --image-stream=<image-stream> [--code=<source>])
-----
nodejs
  Project: openshift
  Tags:    14-ubi8, 14-ubi8-minimal, 16-ubi8, 16-ubi8-minimal, latest
jenkins-agent-nodejs
  Project: openshift
  Tags:    latest, v4.0

Comment 13 errata-xmlrpc 2022-08-10 10:46:42 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