Bug 1853116 - `--to` option does not work with `--credentials-requests` flag.
Summary: `--to` option does not work with `--credentials-requests` flag.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.6
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.7.0
Assignee: Maciej Szulik
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks: 2028280
TreeView+ depends on / blocked
 
Reported: 2020-07-02 02:55 UTC by Yunfei Jiang
Modified: 2021-12-01 21:52 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-24 15:13:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 482 0 None closed Bug 1853116: write to files instead of stdout 2021-01-07 17:14:00 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:15:16 UTC

Description Yunfei Jiang 2020-07-02 02:55:35 UTC
Description of problem:

execute command `oc adm release extract registry.svc.ci.openshift.org/ocp/release:4.6.0-0.nightly-2020-06-30-020342 --credentials-requests --to ./extract_content`

All CRs in current release is shown in STDOUT, at the sametime, the directory `./extract_content` is created, and there is nothing in it.

the help text of `--to` option:
`--to='.': Directory to write release contents to, defaults to the current directory.`

if `--to` option is not designed to work with `--credentials-requests` option, a clear message should be shown to user, otherwise the user is confused by the empty folder.

if `--to` option is designed to work with `--credentials-requests` option, as mentioned above, there is nothing in the folder.


Version-Release number of selected component (if applicable):
oc client Version: 4.6.0-0.nightly-2020-06-30-020342

How reproducible:
always

Steps to Reproduce:
1. execute command `oc adm release extract registry.svc.ci.openshift.org/ocp/release:4.6.0-0.nightly-2020-06-30-020342 --credentials-requests --to ./extract_content`
2.
3.

Actual results:
All CRs in current release is shown in STDOUT
the directory `./extract_content` is created and with nothing in it.

Expected results:
1. a clear error/warning message like `--to option is not supported with --credentials-requests option`
* or *
2. make `--to` option work with `--credentials-requests`, the save the content to directory.

Comment 1 Maciej Szulik 2020-07-09 11:09:01 UTC
I’m adding UpcomingSprint, because I was occupied by fixing bugs with higher priority/severity, developing new features with higher priority, or developing new features to improve stability at a macro level. I will revisit this bug next sprint.

Comment 2 Maciej Szulik 2020-08-21 13:59:55 UTC
I’m adding UpcomingSprint, because I was occupied by fixing bugs with higher priority/severity, developing new features with higher priority, or developing new features to improve stability at a macro level. I will revisit this bug next sprint.

Comment 3 Maciej Szulik 2020-09-11 11:29:19 UTC
I’m adding UpcomingSprint, because I was occupied by fixing bugs with higher priority/severity, developing new features with higher priority, or developing new features to improve stability at a macro level. I will revisit this bug next sprint.

Comment 4 Maciej Szulik 2020-10-01 14:23:18 UTC
Moving to 4.7, the PR is in the queue.

Comment 5 Maciej Szulik 2020-10-23 10:39:11 UTC
I’m adding UpcomingSprint, because I was occupied by fixing bugs with higher priority/severity, developing new features with higher priority, or developing new features to improve stability at a macro level. I will revisit this bug next sprint.

Comment 7 zhou ying 2020-11-03 07:55:23 UTC
Can't reproduce the issue now: 

[root@dhcp-140-138 home]#  oc version 
Client Version: 4.7.0-0.nightly-2020-11-03-040426


[root@dhcp-140-138 home]# ll extract_content
ls: cannot access 'extract_content': No such file or directory
[root@dhcp-140-138 home]# oc adm release extract registry.svc.ci.openshift.org/ocp/release:4.7.0-0.nightly-2020-11-03-040426  --credentials-requests --to ./extract_content
[root@dhcp-140-138 home]# ll extract_content/
total 3708
-rw-rw-r--. 1 root root  1820 Nov  3 15:52 0000_03_authorization-openshift_01_rolebindingrestriction.crd.yaml
-rw-rw-r--. 1 root root  1820 Nov  3 15:52 0000_03_config-operator_01_operatorhub.crd.yaml
-rw-rw-r--. 1 root root  1820 Nov  3 15:52 0000_03_config-operator_01_proxy.crd.yaml

Comment 10 errata-xmlrpc 2021-02-24 15:13:57 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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement 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-2020:5633


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