Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1717738

Summary: clusteroperator/machine-config does not define enough related resources
Product: OpenShift Container Platform Reporter: Luis Sanchez <sanchezl>
Component: Machine Config OperatorAssignee: Antonio Murdaca <amurdaca>
Status: CLOSED ERRATA QA Contact: Micah Abbott <miabbott>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: sponnaga
Target Milestone: ---Keywords: OSE41z_next
Target Release: 4.1.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: 4.1.3
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-26 08:50:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Luis Sanchez 2019-06-06 03:31:06 UTC
Description of problem:

The machine-config ClusterOperator resource does not specify enough related resources. This hinders problem-determination as tools cannot automatically collect the information needed to debug issues.

The operator should specify, at minimum, a namespace and a configuration resource to collect.

Here is an example from kube-apisever:

kind: ClusterOperator
metadata:
  name: kube-apiserver
status:
  relatedObjects:
    - group: operator.openshift.io
      name: cluster
      resource: kubeapiservers
    - group: ''
      name: openshift-config
      resource: namespaces
    - group: ''
      name: openshift-config-managed
      resource: namespaces
    - group: ''
      name: openshift-kube-apiserver-operator
      resource: namespaces
    - group: ''
      name: openshift-kube-apiserver
      resource: namespaces


A new e2e test designed to catch this deficiency will white-list this component initially. This component should be removed from the white-list as part of resolving this issue.

https://github.com/openshift/origin/blob/master/test/extended/operators/clusteroperators.go (link will be active once https://github.com/openshift/origin/pull/23044 merges)

Comment 1 Antonio Murdaca 2019-06-06 07:26:32 UTC
The MCO has namespace as related resource to collect but we don't have any MCO config as of today (and I'm having an hard time understanding why we mandate that in any way). Commented on the PR as well.

Comment 2 Antonio Murdaca 2019-06-06 08:45:48 UTC
I've added some additional resources meanwhile here: https://github.com/openshift/machine-config-operator/pull/825

Comment 3 Antonio Murdaca 2019-06-06 15:14:00 UTC
https://github.com/openshift/machine-config-operator/pull/830 is the 4.1 backport

Comment 5 Antonio Murdaca 2019-06-06 17:09:45 UTC
The backport isn't merged yet :|

moving back to POST

Comment 8 Micah Abbott 2019-06-19 19:31:48 UTC
Verified with 4.1.0-0.nightly-2019-06-19-033215

```
$ oc get clusterversion                                                                                           
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS                                                                                                                              
version   4.1.0-0.nightly-2019-06-19-033215   True        False         168m    Cluster version is 4.1.0-0.nightly-2019-06-19-033215 

$ ./openshift-must-gather inspect clusteroperator/machine-config                                                    
2019/06/19 15:29:20 Gathering config.openshift.io resource data...                                                                                                                                                  
2019/06/19 15:29:22 Gathering kubeapiserver.operator.openshift.io resource data...
2019/06/19 15:29:22 Gathering cluster operator resource data...
2019/06/19 15:29:22     Gathering related object reference information for ClusterOperator "machine-config"...
2019/06/19 15:29:22     Found related object "namespaces/openshift-machine-config-operator" for ClusterOperator "machine-config"...
2019/06/19 15:29:22     Found related object "machineconfigpools.machineconfiguration.openshift.io/master" for ClusterOperator "machine-config"...
2019/06/19 15:29:22     Found related object "machineconfigpools.machineconfiguration.openshift.io/worker" for ClusterOperator "machine-config"...
2019/06/19 15:29:22     Found related object "controllerconfigs.machineconfiguration.openshift.io/cluster" for ClusterOperator "machine-config"...
2019/06/19 15:29:22 Gathering data for ns/openshift-machine-config-operator...
2019/06/19 15:29:22     Collecting resources for namespace "openshift-machine-config-operator"...
2019/06/19 15:29:22     Gathering pod data for namespace "openshift-machine-config-operator"...
...
```

Comment 11 errata-xmlrpc 2019-06-26 08:50:23 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:1589