Bug 1640843

Summary: "oc set image-lookup" with no arguments sets all image streams to be lookup
Product: OpenShift Container Platform Reporter: Clayton Coleman <ccoleman>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.11.0CC: aos-bugs, jokerman, mfojtik, mmccomas, smunilla, xxia, yinzhou
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: All images were selected in oc set image-lookup invocation. Consequence: Image lookup was applied to all image streams. Fix: Properly pass --all flag value to command responsible for matching imagestreams. Result: oc set image-lookup works correctly against specified image streams.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-04 10:40:48 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 Clayton Coleman 2018-10-18 22:12:10 UTC
It should require `--all` to do that, like delete does.  User should never operate on "all resources" with explicit consent.

Comment 1 Juan Vallejo 2018-10-19 18:49:58 UTC
Origin PR: https://github.com/openshift/origin/pull/21313

Comment 2 Juan Vallejo 2018-10-26 17:51:42 UTC
Origin PR has merged

Comment 4 zhou ying 2018-11-02 06:08:33 UTC
Checked with the latest 'openshift v3.11.36', the issue still exist, the PR still not merged with ocp3.11.x.

Comment 6 zhou ying 2018-11-07 05:46:15 UTC
Confirmed with openshift v4.0.0-0.48.0, the issue has fixed。

[root@dhcp-140-138 roottest]# oc set image-lookup
error: resource(s) were provided, but no name, label selector, or --all flag specified
[root@dhcp-140-138 roottest]# oc version
oc v4.0.0-0.48.0
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://host-8-246-192.host.centralci.eng.rdu2.redhat.com:8443
openshift v4.0.0-0.48.0
kubernetes v1.11.0+d4cacc0

Comment 7 zhou ying 2018-11-07 06:00:56 UTC
Samuel Munilla: 
     Could you help drop this bug from advisory RHBA-2018:37662-01, the bug only fixed with ocp 4.0.

Comment 12 errata-xmlrpc 2019-06-04 10:40:48 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, 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/RHBA-2019:0758