Bug 1719454 - must-gather does not collect all non-core CRs in the given namespace
Summary: must-gather does not collect all non-core CRs in the given namespace
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.1.z
Assignee: Luis Sanchez
QA Contact: zhou ying
URL:
Whiteboard:
Depends On: 1720321
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-11 20:49 UTC by Aravindh Puthiyaparambil
Modified: 2019-07-31 02:45 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1720321 (view as bug list)
Environment:
Last Closed: 2019-07-31 02:44:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift must-gather pull 107 0 None closed [release-4.1] Bug 1719454: must-gather does not collect all non-core CRs in the given namespace 2020-05-13 07:46:48 UTC
Red Hat Product Errata RHBA-2019:1866 0 None None None 2019-07-31 02:45:02 UTC

Description Aravindh Puthiyaparambil 2019-06-11 20:49:44 UTC
Description of problem:
If a cluster operator like the marketplace operator has a RelatedObject like the following:
{
    Group:     "operators.coreos.com",
    Resource:  "OperatorSource",
    Namespace: "openshift-marketplace",
}
running the must-gather tool does not collect all the CRs of that kind. This issue extends to all non-core kinds.

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

How reproducible: Always

Steps to Reproduce:
1. Add the object in the description to the RelatedObjects field in the marketplace operator's ClusterOperator CR 
2. Run "openshift-must-gather inspect clusteroperator/marketplace"

Actual results:
No resources of that kind are collected

Expected results:
All the resources of that kind in the namespace should be collected

Comment 2 zhou ying 2019-07-18 06:30:33 UTC
Confirmed with the latest payload: 4.1.0-0.nightly-2019-07-18-023612 , the issue still not fixed: the must-gather tool does not collect the openshift-marketplace namespace.
[root@192 namespaces]# oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.1.0-0.nightly-2019-07-18-023612   True        False         143m    Cluster version is 4.1.0-0.nightly-2019-07-18-023612
[root@192 namespaces]# oc version --short
Client Version: v4.1.7
Server Version: v1.13.4+3a25c9b


[root@192 namespaces]# oc get all -n openshift-marketplace 
NAME                                        READY   STATUS    RESTARTS   AGE
pod/certified-operators-78d5d66c5d-9dp8w    1/1     Running   0          155m
pod/community-operators-586ff8679f-97vdc    1/1     Running   0          155m
pod/marketplace-operator-7fccbf9b4f-z7t5f   1/1     Running   0          156m
pod/redhat-operators-7b87bcdb49-v2fxc       1/1     Running   0          155m

NAME                          TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)     AGE
service/certified-operators   ClusterIP   172.30.216.147   <none>        50051/TCP   155m
service/community-operators   ClusterIP   172.30.189.59    <none>        50051/TCP   155m
service/redhat-operators      ClusterIP   172.30.85.74     <none>        50051/TCP   155m

NAME                                   READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/certified-operators    1/1     1            1           155m
deployment.apps/community-operators    1/1     1            1           155m
deployment.apps/marketplace-operator   1/1     1            1           160m
deployment.apps/redhat-operators       1/1     1            1           155m

NAME                                              DESIRED   CURRENT   READY   AGE
replicaset.apps/certified-operators-78d5d66c5d    1         1         1       155m
replicaset.apps/community-operators-586ff8679f    1         1         1       155m
replicaset.apps/marketplace-operator-7fccbf9b4f   1         1         1       160m
replicaset.apps/redhat-operators-7b87bcdb49       1         1         1       155m


[root@192 must-gather.local.3513752412656142253]# cd namespaces/
[root@192 namespaces]# ll 
total 140
drwxr-xr-x. 10 root root 4096 Jul 18 14:06 default
drwxr-xr-x. 10 root root 4096 Jul 18 14:06 kube-system
drwxr-xr-x. 10 root root 4096 Jul 18 14:08 openshift
drwxr-xr-x. 11 root root 4096 Jul 18 14:06 openshift-apiserver
drwxr-xr-x. 11 root root 4096 Jul 18 14:06 openshift-apiserver-operator
drwxr-xr-x. 11 root root 4096 Jul 18 14:06 openshift-authentication
drwxr-xr-x. 12 root root 4096 Jul 18 14:06 openshift-cluster-node-tuning-operator
drwxr-xr-x. 11 root root 4096 Jul 18 14:06 openshift-cluster-samples-operator
drwxr-xr-x. 11 root root 4096 Jul 18 14:06 openshift-cluster-storage-operator
drwxr-xr-x. 11 root root 4096 Jul 18 14:06 openshift-cluster-version
drwxr-xr-x. 10 root root 4096 Jul 18 14:07 openshift-config
drwxr-xr-x. 10 root root 4096 Jul 18 14:07 openshift-config-managed
drwxr-xr-x. 11 root root 4096 Jul 18 14:07 openshift-console
drwxr-xr-x. 11 root root 4096 Jul 18 14:07 openshift-console-operator
drwxr-xr-x. 11 root root 4096 Jul 18 14:07 openshift-controller-manager
drwxr-xr-x. 11 root root 4096 Jul 18 14:07 openshift-controller-manager-operator
drwxr-xr-x. 11 root root 4096 Jul 18 14:07 openshift-dns
drwxr-xr-x. 11 root root 4096 Jul 18 14:07 openshift-dns-operator
drwxr-xr-x. 11 root root 4096 Jul 18 14:07 openshift-etcd
drwxr-xr-x.  4 root root 4096 Jul 18 14:00 openshift-image-registry
drwxr-xr-x. 11 root root 4096 Jul 18 14:07 openshift-ingress
drwxr-xr-x. 11 root root 4096 Jul 18 14:07 openshift-ingress-operator
drwxr-xr-x. 11 root root 4096 Jul 18 14:07 openshift-kube-apiserver
drwxr-xr-x. 11 root root 4096 Jul 18 14:07 openshift-kube-apiserver-operator
drwxr-xr-x. 11 root root 4096 Jul 18 14:07 openshift-kube-controller-manager
drwxr-xr-x. 11 root root 4096 Jul 18 14:07 openshift-kube-controller-manager-operator
drwxr-xr-x. 11 root root 4096 Jul 18 14:07 openshift-kube-scheduler
drwxr-xr-x. 11 root root 4096 Jul 18 14:07 openshift-kube-scheduler-operator
drwxr-xr-x. 11 root root 4096 Jul 18 14:07 openshift-machine-api
drwxr-xr-x. 11 root root 4096 Jul 18 14:08 openshift-machine-config-operator
drwxr-xr-x. 11 root root 4096 Jul 18 14:08 openshift-monitoring
drwxr-xr-x. 11 root root 4096 Jul 18 14:08 openshift-service-ca
drwxr-xr-x. 11 root root 4096 Jul 18 14:08 openshift-service-ca-operator
drwxr-xr-x. 11 root root 4096 Jul 18 14:08 openshift-service-catalog-apiserver-operator
drwxr-xr-x. 11 root root 4096 Jul 18 14:08 openshift-service-catalog-controller-manager-operator

Comment 3 zhou ying 2019-07-18 06:32:54 UTC
Hi : 

   The issue not in origin/enterprise-4.1. please drop this bug from errata. thanks。

Comment 5 Luis Sanchez 2019-07-19 17:31:46 UTC
This just added the capability needed for operators like marketplace to add a RelatedObject as shown in the description that would capture all objects of a certain type. https://github.com/operator-framework/operator-marketplace/pull/205 fixed the marketplace specific issue, but it has not been back-ported to 4.1 (looks like there was a failed attempt to cherry-pick it).

There is no good way to verify without an operator that takes advantage of it.

Comment 7 Luis Sanchez 2019-07-19 17:41:08 UTC
Please wait until https://github.com/operator-framework/operator-marketplace/pull/211 is merged to verify.

Comment 9 zhou ying 2019-07-25 05:16:25 UTC
The issue his fixed:
[root@dhcp-140-138 namespaces]# oc version --short
Client Version: v4.1.8
Server Version: v1.13.4+8dc9d65
[root@dhcp-140-138 namespaces]# oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.1.0-0.nightly-2019-07-24-213555   True        False         167m    Cluster version is 4.1.0-0.nightly-2019-07-24-213555


[root@dhcp-140-138 namespaces]# tree openshift-marketplace/
openshift-marketplace/
├── apps
│   ├── daemonsets.yaml
│   ├── deployments.yaml
│   ├── replicasets.yaml
│   └── statefulsets.yaml
├── apps.openshift.io
│   └── deploymentconfigs.yaml
├── autoscaling
│   └── horizontalpodautoscalers.yaml
├── batch
│   ├── cronjobs.yaml
│   └── jobs.yaml
├── build.openshift.io
│   ├── buildconfigs.yaml
│   └── builds.yaml
├── core
│   ├── configmaps.yaml
│   ├── events.yaml
│   ├── pods.yaml
│   ├── replicationcontrollers.yaml
│   ├── secrets.yaml
│   └── services.yaml
├── image.openshift.io
│   └── imagestreams.yaml
├── openshift-marketplace.yaml
├── operators.coreos.com
│   ├── catalogsourceconfigs
│   │   ├── certified-operators.yaml
│   │   ├── community-operators.yaml
│   │   └── redhat-operators.yaml
│   ├── catalogsources
│   │   ├── certified-operators.yaml
│   │   ├── community-operators.yaml
│   │   └── redhat-operators.yaml
│   └── operatorsources
│       ├── certified-operators.yaml
│       ├── community-operators.yaml
│       └── redhat-operators.yaml
├── pods
│   ├── certified-operators-68f79495c-bjzxz
│   │   ├── certified-operators
│   │   │   └── certified-operators
│   │   │       ├── healthz
│   │   │       └── logs
│   │   │           ├── current.log
│   │   │           └── previous.log
│   │   └── certified-operators-68f79495c-bjzxz.yaml
│   ├── community-operators-68dfc87c56-4zpr2
│   │   ├── community-operators
│   │   │   └── community-operators
│   │   │       ├── healthz
│   │   │       └── logs
│   │   │           ├── current.log
│   │   │           └── previous.log
│   │   └── community-operators-68dfc87c56-4zpr2.yaml
│   ├── marketplace-operator-86874977b8-lhztc
│   │   ├── marketplace-operator
│   │   │   └── marketplace-operator
│   │   │       ├── healthz
│   │   │       └── logs
│   │   │           ├── current.log
│   │   │           └── previous.log
│   │   └── marketplace-operator-86874977b8-lhztc.yaml
│   └── redhat-operators-895d9967f-x76lr
│       ├── redhat-operators
│       │   └── redhat-operators
│       │       ├── healthz
│       │       └── logs
│       │           ├── current.log
│       │           └── previous.log
│       └── redhat-operators-895d9967f-x76lr.yaml
└── route.openshift.io
    └── routes.yaml

33 directories, 40 files

Comment 11 errata-xmlrpc 2019-07-31 02:44:55 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:1866


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