Bug 1836971 - [Descheduler] - Indicate in the cluster pod logs that --dry-run is enabled for descheduler
Summary: [Descheduler] - Indicate in the cluster pod logs that --dry-run is enabled fo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: kube-scheduler
Version: 4.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.5.0
Assignee: Jan Chaloupka
QA Contact: RamaKasturi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-18 15:06 UTC by RamaKasturi
Modified: 2020-07-13 17:40 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-13 17:39:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift descheduler pull 31 0 None closed bug 1836971: Sync with upstream 2020-08-04 06:41:33 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:40:17 UTC

Description RamaKasturi 2020-05-18 15:06:06 UTC
Description of problem:
When --dry-run flag is enabled i see that there is no indication of that in the cluster pod logs and also user seeing the messages below might think that the pod is actually getting evicted when it is not.

I0518 15:03:46.280744       1 evictions.go:99] Evicted pod: "initcontainer-db54dc85b-2szp7" in namespace "test"


Version-Release number of selected component (if applicable):
ramakasturinarra@dhcp35-60 ocp_files]$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.5.0-0.nightly-2020-05-17-235851   True        False         3h43m   Cluster version is 4.5.0-0.nightly-2020-05-17-235851


How reproducible:
Always

Steps to Reproduce:
1. Enable the --dry-run flag in the kubedescheduler cluster object
2. Verify that it propagates to the cluster pod by running oc describe pod <cluster-pod>
3. Add a strategy like toomanyrestarts

Actual results:
Descheduler does not evict anything since --dry-run flag is enabled but the cluster logs shows that the pod is actually evicted even if it is not. 

I0518 15:03:46.280744       1 evictions.go:99] Evicted pod: "initcontainer-db54dc85b-2szp7" in namespace "test"

Expected results:
There should be a indication in the log which says that this is a dry run.

Additional info:

Comment 1 Jan Chaloupka 2020-05-20 08:44:26 UTC
Upstream PR: https://github.com/kubernetes-sigs/descheduler/pull/287

Comment 6 RamaKasturi 2020-05-28 15:35:25 UTC
Verified bug with the payload below and i see that when ever dry run is enabled cluster logs indicate that "Evicted pod in dry run mode: <pod_name> in namespace <name>"

[ramakasturinarra@dhcp35-60 ~]$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.5.0-0.nightly-2020-05-27-234738   True        False         9h      Cluster version is 4.5.0-0.nightly-2020-05-27-234738

However for some of the strategies 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 and this might be creating confusion for the user, raised another bug(https://bugzilla.redhat.com/show_bug.cgi?id=1841187) to get this fixed and moving this to verified since the motto of this bug was to make sure that when in dry-run cluster logs are printed saying pods are getting evicted in dry run which works. 

Based on the above results moving the bug to verified state.

Comment 7 errata-xmlrpc 2020-07-13 17:39: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-2020:2409


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