Bug 1725249

Summary: Elasticsearch Operator sets resource limits when not requested
Product: OpenShift Container Platform Reporter: ewolinet
Component: LoggingAssignee: ewolinet
Status: CLOSED ERRATA QA Contact: Anping Li <anli>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.1.zCC: anli, aos-bugs, ewolinet, jcantril, rmeggins, stwalter, vlaad
Target Milestone: ---   
Target Release: 4.1.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: 1725148 Environment:
Last Closed: 2019-08-28 19:54:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1725148    
Bug Blocks:    

Description ewolinet 2019-06-28 20:13:53 UTC
+++ This bug was initially created as a clone of Bug #1725148 +++

Description of problem:While standing up Cluster Logging, the Elasticsearch instance was under resourced because it was given an artificial CPU limit.  This led to issues like:

[2019-06-28T13:38:19,931][WARN ][c.f.s.s.t.SearchGuardSSLNettyTransport] [elasticsearch-cdm-yh9fg40h-1] write and flush on the network layer failed (channel: [id: 0x32462b90, L:/10.128.2.11:56430 - R:elasticsearch-cluster.openshift-logging.svc/172.30.143.44:9300])
javax.net.ssl.SSLException: SSLEngine closed already
	at io.netty.handler.ssl.SslHandler.wrap(...)(Unknown Source) ~[?:?]
[2019-06-28T13:38:26,634][ERROR][c.f.s.s.t.SearchGuardSSLNettyTransport] [elasticsearch-cdm-yh9fg40h-1] SSL Problem Received close_notify during handshake
javax.net.ssl.SSLException: Received close_notify during handshake



Version-Release number of selected component (if applicable):

cluster logging operator 4.1.3


How reproducible:

Always

Steps to Reproduce:
1.
2.
3.

Actual results:

EO created resource spec of:

    resources:
      limits:
        cpu: 100m
        memory: 4Gi
      requests:
        cpu: 100m
        memory: 4Gi

from the CLO generated ES instance of:

    resources:
      requests:
        cpu: 100m
        memory: 4Gi


Expected results:

The pod spec should only define resource request values


Additional info:

Comment 1 Steven Walter 2019-07-18 14:55:43 UTC
As discussed with Eric Rich: in my opinion this is worth fixing in 4.1; or else we should specify in the documentation that it is required to be explicit on the limit.

Comment 3 Anping Li 2019-08-02 10:13:20 UTC
Verified using v4.1.9-201907311355.  CPU limit is null without explicitly set.
  nodeSpec:
    image: image-registry.openshift-image-registry.svc:5000/openshift/ose-logging-elasticsearch5:v4.1.9-201907311355
    resources:
      limits:
        memory: 2Gi
      requests:
        memory: 2Gi

Comment 8 Anping Li 2019-08-16 05:52:35 UTC
Test blocked by https://bugzilla.redhat.com/show_bug.cgi?id=1741753

Comment 9 Anping Li 2019-08-19 06:40:00 UTC
Verified in 4.1.12

Comment 13 Anping Li 2019-08-23 06:05:24 UTC
Verified in 4.1.13
Case 1) 
When no resource in specified
    resources: {}
No CPU limit in ES deployment.
    resources:
      limits:
        memory: 4Gi
      requests:
        cpu: 100m
        memory: 1Gi
Case 2) 
When CPU limit is not set in CRD elasticsearch
      resources:
        limits:
          memory: 2Gi
        requests:
          cpu: 200m
          memory: 2Gi
No CPU limit in ES deployment  
        resources:
          limits:
            memory: 2Gi
          requests:
            cpu: 200m
            memory: 2Gi
Case 3) 
When CPU limit is set in CRD elasticsearch
    resources:
      limits:
        cpu: 200m
        memory: 2Gi
      requests:
        cpu: 200m
        memory: 2Gi

The CPU limit is specified in ES deployment 
        resources:
          limits:
            cpu: 200m
            memory: 2Gi
          requests:
            cpu: 200m
            memory: 2Gi


Case 4) 
When CPU limit is set as number in CRD elasticsearch
    resources:
      limits:
        cpu: 1
        memory: 2Gi
      requests:
        cpu: 200m
        memory: 2Gi

The CPU limit is specified in ES deployment 
     resources:
          limits:
            cpu: "1"
            memory: 2Gi
          requests:
            cpu: 200m
            memory: 2Gi

Comment 15 errata-xmlrpc 2019-08-28 19:54:45 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-2019:2547