Bug 1667255 - storageClass definition in clusterlogging cr not honored - EmptyDir is used.
Summary: storageClass definition in clusterlogging cr not honored - EmptyDir is used.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Logging
Version: 4.1.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: 4.1.0
Assignee: ewolinet
QA Contact: Anping Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-17 21:00 UTC by Mike Fiedler
Modified: 2019-06-04 10:42 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2019-06-04 10:42:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
resource definitions and pod logs (4.19 KB, application/gzip)
2019-01-17 21:02 UTC, Mike Fiedler
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0758 0 None None None 2019-06-04 10:42:09 UTC

Description Mike Fiedler 2019-01-17 21:00:15 UTC
Description of problem:

I'm specifying a valid (I think) storageClass configuration in my clusterlogging cr definition, but it is not being honored.  After oc create, the clusterlogging cr shows storage: {}


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

registry.reg-aws.openshift.com:443/openshift/ose-cluster-logging-operator   v4.0                d30f397c70ae        17 hours ago        273 MB
registry.reg-aws.openshift.com:443/openshift/ose-elasticsearch-operator     v4.0                b35c5b1efb46        17 hours ago        261 MB

The operator images are the latest built by ART

How reproducible: Always


Steps to Reproduce:
1. Deploy the operators with make deploy
2. Create a clusterlogging cr with the following definitions

apiVersion: logging.openshift.io/v1alpha1
kind: ClusterLogging
metadata:
  generation: 1
  name: example
  namespace: ""
  resourceVersion: ""
  selfLink: /apis/logging.openshift.io/v1alpha1/namespaces/openshift-logging/clusterloggings/example
  uid: ""
spec:
  collection:
    logs:
      fluentd:
        resources: {}
      rsyslog:
        resources: {}
      type: fluentd
  curation:
    curator:
      resources: {}
      schedule: 30 3 * * *
    type: curator
  logStore:
    elasticsearch:
      nodeCount: 1
      redundancyPolicy: SingleRedundancy
      resources: {}
      storage:
        storageClass:
          name: gp2
          size: 10G
    type: elasticsearch
  managementState: Managed
  visualization:
    kibana:
      proxy:
        resources: {}
      replicas: 1
      resources: {}
    type: kibana



Actual results:

After creation, the clusterlogging example object looks like this:

apiVersion: logging.openshift.io/v1alpha1                                                                                                                                                                                                                                                 
kind: ClusterLogging                                                                                                                                                                                                                                                                      
metadata:                                                                                                                                                                                                                                                                                 
  creationTimestamp: 2019-01-17T20:51:30Z                                                                                                                                                                                                                                                 
  generation: 1                                                                                                                                                                                                                                                                           
  name: example                                                                                                                                                                                                                                                                           
  namespace: openshift-logging                                                                                                                                                                                                                                                            
  resourceVersion: "33451"                                                                                                                                                                                                                                                                
  selfLink: /apis/logging.openshift.io/v1alpha1/namespaces/openshift-logging/clusterloggings/example                                                                                                                                                                                      
  uid: aad16c1f-1a99-11e9-923f-069e767444b0                                                                                                                                                                                                                                               
spec:                                                                                                                                                                                                                                                                                     
  collection:                                                                                                                                                                                                                                                                             
    logs:                                                                                                                                                                                                                                                                                 
      fluentd:                                                                                                                                                                                                                                                                            
        resources: {}                                                                                                                                                                                                                                                                     
      rsyslog:                                                                                                                                                                                                                                                                            
        resources: {}                                                                                                                                                                                                                                                                     
      type: fluentd                                                                                                                                                                                                                                                                       
  curation:                                                                                                                                                                                                                                                                               
    curator:                                                                                                                                                                                                                                                                              
      resources: {}                                                                                                                                                                                                                                                                       
      schedule: 30 3 * * *                                                                                                                                                                                                                                                                
    type: curator                                                                                                                                                                                                                                                                         
  logStore:                                                                                                                                                                                                                                                                               
    elasticsearch:                                                                                                                                                                                                                                                                        
      nodeCount: 1                                                                                                                                                                                                                                                                        
      redundancyPolicy: SingleRedundancy                                                                                                                                                                                                                                                  
      resources: {}                                                                                                                                                                                                                                                                       
      storage: {}                                                                                                                                                                                                                                                                         
    type: elasticsearch                                                                                                                                                                                                                                                                   
  managementState: Managed                                                                                                                                                                                                                                                                
  visualization:                                                                                                                                                                                                                                                                          
    kibana:                                                                                                                                                                                                                                                                               
      proxy:                                                                                                                                                                                                                                                                              
        resources: {}                                                                                                                                                                                                                                                                     
      replicas: 1                                                                                                                                                                                                                                                                         
      resources: {}                                                                                                                                                                                                                                                                       
    type: kibana


No PVC created.

Expected results:

PVC created and gp2 storage used for ES persistence.

Additional info:

CR before/after create and pod logs will be attached.

Comment 1 Mike Fiedler 2019-01-17 21:02:20 UTC
Created attachment 1521373 [details]
resource definitions and pod logs

Comment 2 Mike Fiedler 2019-01-18 13:26:45 UTC
I was following the doc here for the storage definition:  https://github.com/openshift/cluster-logging-operator/blob/master/docs/configuration.md

Per @ewolinet, I also tried:

logStore:
   elasticsearch:
     storage:
       storageClassName: gp2
       size: 10Gi
   type: elasticsearch

and the hybrid of the two:

logStore:
   elasticsearch:
     storage:
       storageClass:
         storageClassName: gp2
         size: 10Gi
   type: elasticsearch

But, the results were the same - the values were overwritten with storage: {}.  I believe Eric saw the same behavior when he tested it as well.

Comment 5 Mike Fiedler 2019-01-22 19:46:40 UTC
Verified with upstream - waiting for official OCP images.

Comment 6 Mike Fiedler 2019-01-25 19:56:19 UTC
Verified on 4.0-art-latest-2019-01-25-045028

  logStore:
    elasticsearch:
      nodeCount: 3
      redundancyPolicy: SingleRedundancy
      resources: {}
      storage:
        storageClassName: gp2
        size: 50G
    type: elasticsearch

3 PVCs created with gp2 storageclass and used as /elasticsearch/persistent in the pod

Comment 9 errata-xmlrpc 2019-06-04 10:42:02 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:0758


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