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:
Upstream PR to fix this: https://github.com/kubernetes-sigs/descheduler/pull/319
Currently blocked on verifying the bug due to https://bugzilla.redhat.com/show_bug.cgi?id=1858292, once resolved will verify it !!
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
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