Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1357825 - [infrastructure_public_287]eviction-hard/soft parameters should not accept negative values
[infrastructure_public_287]eviction-hard/soft parameters should not accept ne...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
3.3.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Avesh Agarwal
DeShuai Ma
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-19 06:23 EDT by DeShuai Ma
Modified: 2017-03-08 13 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously it was possible to configure resource (CPU, memory) eviction thresholds (hard and soft) to a negative value and kubelet started successfully. As eviction thresholds can not be negative, this erroneous behavior has been fixed now. The result is that kubelet fails to start if a negative eviction threshold is configured.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-01-18 07:51:25 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0066 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.4 RPM Release Advisory 2017-01-18 12:23:26 EST

  None (edit)
Description DeShuai Ma 2016-07-19 06:23:17 EDT
Description of problem:
When config eviction-hard/soft parameters with negative values, kubelet still can start successfully.

Version-Release number of selected component (if applicable):
[root@ip-172-18-4-118 log]# openshift version
openshift v3.3.0.7
kubernetes v1.3.0+57fb9ac
etcd 2.3.0+git

How reproducible:
Always

Steps to Reproduce:
1.Configure node with negative eviction-hard or eviction-soft value and restart atomic-openshift-node
kubeletArguments:
  eviction-hard:
    - "memory.available<-100Mi"

or

kubeletArguments:
  eviction-soft:
    - "memory.available<-300Mi"
  eviction-soft-grace-period:
    - "memory.available=30s"

$ systemctl restart atomic-openshift-node

Actual results:
1. restart node successfully

Expected results:
1. eviction-hard/soft parameters should not accept negative values

Additional info:
Comment 1 Avesh Agarwal 2016-07-26 10:46:48 EDT
I have reproduced it and will send a PR soon upstream.
Comment 2 Avesh Agarwal 2016-07-26 11:00:57 EDT
https://github.com/kubernetes/kubernetes/pull/29618
Comment 3 Avesh Agarwal 2016-08-08 09:52:29 EDT
The PR https://github.com/kubernetes/kubernetes/pull/29618 is merged in kube upstream. I will create a cherry-pick PR to origin.
Comment 4 Avesh Agarwal 2016-08-08 14:00:20 EDT
Cherry pick PR: https://github.com/openshift/origin/pull/10281
Comment 5 Avesh Agarwal 2016-09-22 14:46:52 EDT
I noticed that the changes are already in ose repo, so moving it to ON_QA.
Comment 6 Troy Dawson 2016-09-22 14:55:58 EDT
Code has been merged into ose and is in version 3.3.0.31 or newer.
Comment 8 DeShuai Ma 2016-09-23 01:58:48 EDT
Test on atomic-openshift-3.3.0.32-1.git.0.37bd7ea.el7.x86_64
This is not fixed.
I review the change code, it's in v3.4.0.1
https://github.com/openshift/ose/blob/v3.4.0.1/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/helpers.go#L203-L205
But not in ose 3.3.0.x

Fix this in 3.4?
Comment 9 Avesh Agarwal 2016-09-23 07:54:42 EDT
Hi DeShuai,

I think I messed it up. Yesterday I saw the changes in the https://github.com/openshift/ose in the master repo not really checking the actual version and then claimed that it is fixed in OSE. Others (Eric Paris) concluded it as fixed in 3.3.
Comment 11 Derek Carr 2016-10-25 16:21:33 EDT
This is in 3.4, moved to ON_QA and updated target release.
Comment 12 DeShuai Ma 2016-10-27 02:16:10 EDT
Verify on openshift v3.4.0.16+cc70b72

Start node with invalid value for eviction:
Oct 27 02:12:05 ip-172-18-5-208.ec2.internal atomic-openshift-node[42133]: I1027 02:12:05.680509   42133 reflector.go:200] Starting reflector *api.Pod (0s) from pkg/kubelet/config/apiserver.go:43
Oct 27 02:12:05 ip-172-18-5-208.ec2.internal atomic-openshift-node[42133]: F1027 02:12:05.680567   42133 node.go:322] failed to run Kubelet: failed to create kubelet: eviction threshold memory.available must be positive: -100Mi

Oct 27 02:14:39 ip-172-18-5-208.ec2.internal atomic-openshift-node[44353]: I1027 02:14:39.708205   44353 reflector.go:200] Starting reflector *api.Pod (0s) from pkg/kubelet/config/apiserver.go:43
Oct 27 02:14:39 ip-172-18-5-208.ec2.internal atomic-openshift-node[44353]: F1027 02:14:39.708289   44353 node.go:322] failed to run Kubelet: failed to create kubelet: eviction threshold memory.available must be positive: -300Mi
Comment 14 errata-xmlrpc 2017-01-18 07:51:25 EST
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-2017:0066

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