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

Bug 1948640

Summary: [Descheduler] operator log reports key failed with : kubedeschedulers.operator.openshift.io "cluster" not found
Product: OpenShift Container Platform Reporter: RamaKasturi <knarra>
Component: kube-schedulerAssignee: Jan Chaloupka <jchaloup>
Status: CLOSED ERRATA QA Contact: RamaKasturi <knarra>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.8CC: aos-bugs, mfojtik
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 22:59:27 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 RamaKasturi 2021-04-12 16:38:30 UTC
Description of problem:
When trying to verify descheduler metrics, i could not verify the same and below error is being logged in the operator log.

E0412 16:19:07.075445       1 target_config_reconciler.go:349] key failed with : kubedeschedulers.operator.openshift.io "cluster" not found
I0412 16:21:48.590577       1 event.go:282] Event(v1.ObjectReference{Kind:"Deployment", Namespace:"openshift-kube-descheduler-operator", Name:"descheduler-operator", UID:"4ce5eaea-8e43-4d65-aa8a-294d3f87b315", APIVersion:"apps/v1", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'DeploymentUpdated' Updated Deployment.apps/cluster -n openshift-kube-descheduler-operator because it changed


Version-Release number of selected component (if applicable):
[knarra@knarra ~]$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.8.0-0.nightly-2021-04-09-222447   True        False         10h     Cluster version is 4.8.0-0.nightly-2021-04-09-222447


How reproducible:
Always

Steps to Reproduce:
1. Install descheduler on 4.8 cluster
2. 

Actual results:
Try to view metrics, but could not find them, when checking operator logs saw error as below
I0412 16:21:48.590577       1 event.go:282] Event(v1.ObjectReference{Kind:"Deployment", Namespace:"openshift-kube-descheduler-operator", Name:"descheduler-operator", UID:"4ce5eaea-8e43-4d65-aa8a-294d3f87b315", APIVersion:"apps/v1", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'DeploymentUpdated' Updated Deployment.apps/cluster -n openshift-kube-descheduler-operator because it changed
E0412 16:21:48.599450       1 target_config_reconciler.go:349] key failed with : kubedeschedulers.operator.openshift.io "cluster" not found


Expected results:
should be able to view metrics and operator log should not report errors as above.

Additional info:
Not sure if not being able to view descheduler metrics is due to the error reported in operator logs.

Comment 1 Jan Chaloupka 2021-04-14 09:15:35 UTC
```
diff --git a/manifests/4.8/kube-descheduler-operator.crd.yaml b/manifests/4.8/kube-descheduler-operator.crd.yaml
index 90cc0626..9322b5e9 100644
--- a/manifests/4.8/kube-descheduler-operator.crd.yaml
+++ b/manifests/4.8/kube-descheduler-operator.crd.yaml
@@ -138,6 +138,8 @@ spec:
         type: object
     served: true
     storage: true
+    subresources:
+      status: {}
   - name: v1beta1
     schema:
       openAPIV3Schema:
@@ -292,6 +294,8 @@ spec:
         type: object
     served: true
     storage: false
+    subresources:
+      status: {}
 status:
   acceptedNames:
     kind: ""
```

Comment 3 RamaKasturi 2021-04-15 10:26:21 UTC
Do not have a new operator yet

Comment 4 RamaKasturi 2021-04-23 14:07:15 UTC
Moving bug to assigned state as i see that even with the newly built operator error is still seen in the log file.

[knarra@knarra flexy-templates]$ oc get csv -n openshift-kube-descheduler-operator
NAME                                                   DISPLAY                     VERSION                 REPLACES   PHASE
clusterkubedescheduleroperator.4.8.0-202104221622.p0   Kube Descheduler Operator   4.8.0-202104221622.p0              Succeeded

E0423 14:01:38.302939       1 target_config_reconciler.go:349] key failed with : kubedeschedulers.operator.openshift.io "cluster" not found
I0423 14:01:38.541563       1 event.go:282] Event(v1.ObjectReference{Kind:"Deployment", Namespace:"openshift-kube-descheduler-operator", Name:"descheduler-operator", UID:"96040070-5b72-4141-9e79-1e5f9027ca1b", APIVersion:"apps/v1", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'DeploymentUpdated' Updated Deployment.apps/cluster -n openshift-kube-descheduler-operator because it changed
E0423 14:01:39.102737       1 target_config_reconciler.go:349] key failed with : kubedeschedulers.operator.openshift.io "cluster" not found
I0423 14:01:39.339690       1 event.go:282] Event(v1.ObjectReference{Kind:"Deployment", Namespace:"openshift-kube-descheduler-operator", Name:"descheduler-operator", UID:"96040070-5b72-4141-9e79-1e5f9027ca1b", APIVersion:"apps/v1", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'DeploymentUpdated' Updated Deployment.apps/cluster -n openshift-kube-descheduler-operator because it changed
E0423 14:01:39.906222       1 target_config_reconciler.go:349] key failed with : kubedeschedulers.operator.openshift.io "cluster" not found
I0423 14:01:40.264422       1 event.go:282] Event(v1.ObjectReference{Kind:"Deployment", Namespace:"openshift-kube-descheduler-operator", Name:"descheduler-operator", UID:"96040070-5b72-4141-9e79-1e5f9027ca1b", APIVersion:"apps/v1", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'DeploymentUpdated' Updated Deployment.apps/cluster -n openshift-kube-descheduler-operator because it changed
E0423 14:01:40.702998       1 target_config_reconciler.go:349] key failed with : kubedeschedulers.operator.openshift.io "cluster" not found
I0423 14:01:41.397207       1 event.go:282] Event(v1.ObjectReference{Kind:"Deployment", Namespace:"openshift-kube-descheduler-operator", Name:"descheduler-operator", UID:"96040070-5b72-4141-9e79-1e5f9027ca1b", APIVersion:"apps/v1", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'DeploymentUpdated' Updated Deployment.apps/cluster -n openshift-kube-descheduler-operator because it changed
E0423 14:01:41.503163       1 target_config_reconciler.go:349] key failed with : kubedeschedulers.operator.openshift.io "cluster" not found
I0423 14:01:42.818221       1 event.go:282] Event(v1.ObjectReference{Kind:"Deployment", Namespace:"openshift-kube-descheduler-operator", Name:"descheduler-operator", UID:"96040070-5b72-4141-9e79-1e5f9027ca1b", APIVersion:"apps/v1", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'DeploymentUpdated' Updated Deployment.apps/cluster -n openshift-kube-descheduler-operator because it changed
E0423 14:01:42.827035       1 target_config_reconciler.go:349] key failed with : kubedeschedulers.operator.openshift.io "cluster" not found
I0423 14:01:45.422096       1 event.go:282] Event(v1.ObjectReference{Kind:"Deployment", Namespace:"openshift-kube-descheduler-operator", Name:"descheduler-operator", UID:"96040070-5b72-4141-9e79-1e5f9027ca1b", APIVersion:"apps/v1", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'DeploymentUpdated' Updated Deployment.apps/cluster -n openshift-kube-descheduler-operator because it changed
E0423 14:01:45.434576       1 target_config_reconciler.go:349] key failed with : kubedeschedulers.operator.openshift.io "cluster" not found
I0423 14:01:50.632750       1 event.go:282] Event(v1.ObjectReference{Kind:"Deployment", Namespace:"openshift-kube-descheduler-operator", Name:"descheduler-operator", UID:"96040070-5b72-4141-9e79-1e5f9027ca1b", APIVersion:"apps/v1", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'DeploymentUpdated' Updated Deployment.apps/cluster -n openshift-kube-descheduler-operator because it changed
E0423 14:01:50.657985       1 target_config_reconciler.go:349] key failed with : kubedeschedulers.operator.openshift.io "cluster" not found

Comment 9 errata-xmlrpc 2021-07-27 22:59:27 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.8.2 bug fix and security 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-2021:2438