Bug 1841187 - [Descheduler] - Log messages printed in cluster logs when dry run mode enabled for scheduler could be confusing
Summary: [Descheduler] - Log messages printed in cluster logs when dry run mode enable...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: kube-scheduler
Version: 4.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.6.0
Assignee: Mike Dame
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-28 15:34 UTC by RamaKasturi
Modified: 2020-10-27 16:02 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Certain Descheduler strategies printed eviction notifications whether in dry run or not Consequence: Confusion in logs as to whether the pod was actually evicted Fix: Remove redundant messages Result: Logs should be clearer now
Clone Of:
Environment:
Last Closed: 2020-10-27 16:01:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift descheduler pull 33 0 None closed Bug 1841187: Sync with upstream 2020-10-22 13:44:24 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:02:36 UTC

Description RamaKasturi 2020-05-28 15:34:10 UTC
Description of problem:
When enabled RemovePodsViolatingInterPodAntiAffinity strategy cluster logs shows below 
I0528 09:23:48.664691       1 evictions.go:100] Evicted pod in dry run mode:
> "hello1-54d7977cd-l8wx7" in namespace "test"
> I0528 09:23:48.664700       1 pod_antiaffinity.go:50] Evicted pod:
> "hello1-54d7977cd-l8wx7"
>  because of existing anti-affinity
> 
When dry run is enabled two log messages are shown where in which first one
indicates it is a dry run but second one shows the pod is evicted, we should  just print one of them as this might be confusing for users

Version-Release number of selected component (if applicable):
4.5.0-0.nightly-2020-05-27-234738

How reproducible:
Always

Steps to Reproduce:
1. Install latest 4.5 cluster
2. Enable descheduler strategy RemovePodsViolatingInterPodAntiAffinity
3. Enable --dry-run flag for scheduler

Actual results:
When dry run is enabled two log messages are shown where in which first one
indicates it is a dry run but second one shows the pod is evicted, we should  just print one of them as this might be confusing for users
I0528 09:23:48.664691       1 evictions.go:100] Evicted pod in dry run mode:
> "hello1-54d7977cd-l8wx7" in namespace "test"
> I0528 09:23:48.664700       1 pod_antiaffinity.go:50] Evicted pod:
> "hello1-54d7977cd-l8wx7"
>  because of existing anti-affinity

Expected results:
Just print one message as below
> I0528 09:23:48.664700       1 pod_antiaffinity.go:50] Evicted pod in dry run mode "hello1-54d7977cd-l8wx7" because of existing anti-affinity


Additional info:

Comment 1 Mike Dame 2020-06-09 16:22:38 UTC
Upstream PR to fix this: https://github.com/kubernetes-sigs/descheduler/pull/319

Comment 5 RamaKasturi 2020-07-17 12:41:34 UTC
Currently blocked on verifying the bug due to https://bugzilla.redhat.com/show_bug.cgi?id=1858292, once resolved will verify it !!

Comment 6 zhou ying 2020-08-04 07:07:01 UTC
Checked with payload: 4.6.0-0.nightly-2020-08-04-002217, the issue has fixed:

oc logs -f po/cluster-68d8597f6b-m5zv4 |grep  testzy-2-dnzl8

I0804 07:01:47.932165       1 evictions.go:146] Evicted pod in dry run mode: "testzy-2-dnzl8" in namespace "zhouy" (InterPodAntiAffinity)
[root@dhcp-140-138 ~]# oc get csv
NAME                                                   DISPLAY                     VERSION                 REPLACES   PHASE
clusterkubedescheduleroperator.4.6.0-202008031851.p0   Kube Descheduler Operator   4.6.0-202008031851.p0              Succeeded

Comment 8 errata-xmlrpc 2020-10-27 16:01:56 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 (OpenShift Container Platform 4.6 GA Images), 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-2020:4196


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