Bug 1781038 - [must gather] openshift-must-gather has been DEPRECATED. Use `oc adm inspect` instead.
Summary: [must gather] openshift-must-gather has been DEPRECATED. Use `oc adm inspect`...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Providers
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 2.2.0
Assignee: Avram Levitter
QA Contact: Ying Cui
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-09 07:11 UTC by Ying Cui
Modified: 2020-01-30 16:27 UTC (History)
8 users (show)

Fixed In Version: cnv-must-gather-container-v2.2.0-11
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-30 16:27:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2020:0307 0 None None None 2020-01-30 16:27:48 UTC

Description Ying Cui 2019-12-09 07:11:56 UTC
Description of problem:
openshift-must-gather has been DEPRECATED. Use `oc adm inspect` instead.

Version-Release number of selected component (if applicable):
oc version: Client Version: openshift-clients-4.3.0-201910250623-70-g0ed83003
Server Version: 4.3.0-0.nightly-2019-11-28-103851
Kubernetes Version: v1.16.2

How reproducible:
100%


Steps to Reproduce:
1. oc adm must-gather --image=registry-proxy.engineering.redhat.com/rh-osbs/container-native-virtualization-cnv-must-gather-rhel8:v2.2.0-6 --dest-dir=/tmp/pytest-of-cnv-qe-jenkins/pytest-1/must_gather0


Actual results:
In screen output shows as the following: 

<snip>
[must-gather-fbwz2] POD WARNING: openshift-must-gather has been DEPRECATED. Use `oc adm inspect` instead.
[must-gather-fbwz2] POD error: there is no need to specify a resource type as a separate argument when passing arguments in resource/name form (e.g. 'oc get resource/<resource_name>' instead of 'oc get resource resource/<resource_name>'
</snip>


Expected results:
Use `oc adm inspect` instead.  

$ oc adm inspect --help
Gather debugging information for a resource.

 This command downloads the specified resource and any related resources for the purpose of gathering debugging
information.

 Experimental: This command is under active development and may change without notice.

Usage:
  oc adm inspect (TYPE[.VERSION][.GROUP] [NAME] | TYPE[.VERSION][.GROUP]/NAME ...) [flags]

Examples:
  # Collect debugging data for the "openshift-apiserver" clusteroperator
  oc adm inspect clusteroperator/openshift-apiserver
  
  # Collect debugging data for all clusteroperators
  oc adm inspect clusteroperator

Options:
  -A, --all-namespaces=false: If present, list the requested object(s) across all namespaces. Namespace in current
context is ignored even if specified with --namespace.
      --dest-dir='': Root directory used for storing all gathered cluster operator data. Defaults to
$(PWD)/inspect.local.<rand>

Use "oc adm options" for a list of global command-line options (applies to all commands).


Additional info:
In upstream, the issue https://github.com/kubevirt/must-gather/issues/56, we need one bug OR Jira issue in downstream to get status and verify this fix.

Comment 1 Avram Levitter 2019-12-12 13:55:05 UTC
There's a pending pull request that should fix this in upstream: https://github.com/kubevirt/must-gather/pull/59

Comment 2 Nelly Credi 2019-12-30 07:31:36 UTC
Please add 'fixed in version'

Comment 3 Nelly Credi 2020-01-01 12:17:29 UTC
I saw the PR, the fix is clear, 
but how are we supposed to call CNV must gather now, if we are not to use oc must-gather --image=....cnv-must-gather?
and I also assume this requires doc change, so adding doc contact

without the above we cannot verify this bug

Comment 4 Avram Levitter 2020-01-01 13:06:13 UTC
The fix is on the image, not on the client. The new must-gather image has the fix, so once that's uploaded it will probably be something of the form "oc adm must-gather --image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel8:2.2.0"

Comment 5 Nelly Credi 2020-01-01 14:36:53 UTC
according to Avram, 
the client is not affected - 
oc adm must-gather is not deprecated and will continue to work
removing doc contact 
keeping the bug ON QA for verification

Comment 6 Stephen Gordon 2020-01-06 19:56:52 UTC
(In reply to Nelly Credi from comment #5)
> according to Avram, 
> the client is not affected - 
> oc adm must-gather is not deprecated and will continue to work
> removing doc contact 
> keeping the bug ON QA for verification

Sorry, can someone explain to me if it's not in fact depecrated how/why a message indicating it was deprecated was introduced? I feel like there is other context not explained here.

Comment 7 Avram Levitter 2020-01-07 06:46:52 UTC
The pod that executes must-gather runs a different copy of oc than the one on the client. That version comes from the ose-must-gather image that is used to build the kubevirt must-gather image. Until the addition of "inspect" in oc 4.3, must-gather used completely separate command (present only on the pod): openshift-must-gather. With the release of 4.3, that command was deprecated, and that's what was causing the messages (again, from execution of a command on the pod). The fix was to update the code running on the image used so that the new method of inspecting elements was used, but as the original issue was entirely on the image, no changes were needed to anything on the client-side (as long as the --image argument supplied is up to date).

Comment 8 Nelly Credi 2020-01-16 11:37:48 UTC
I believe the target release is incorrect. setting to 2.2.0 as this was fixed a while ago with ocp4.3 (which matches cnv2.2)

Comment 10 Ying Cui 2020-01-20 06:40:50 UTC
VERIFIED 

Version:
Client Version: 4.3.0-0.nightly-2020-01-05-041541
Server Version: 4.3.0-0.nightly-2020-01-05-041541
Kubernetes Version: v1.16.2
cnv-must-gather-container-v2.2.0-13

Test Steps:
as comment #4, Changed `openshift-must-gather` to `oc adm inspect`, fixed on the image, not on the client
$ oc adm must-gather --image=registry-proxy.engineering.redhat.com/rh-osbs/container-native-virtualization-cnv-must-gather-rhel8:v2.2.0-13 --dest-dir=/tmp

the dir can be generated, and there is no error pop up to show openshift-must-gather has been DEPRECATED.

Comment 12 errata-xmlrpc 2020-01-30 16:27:33 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/RHEA-2020:0307


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