Uploaded image for project: 'OpenShift Logging'
  1. OpenShift Logging
  2. LOG-2999

[ClusterLogging] elasticsearchStatus in ClusterLogging instance CR is not updated when Elasticsearch status is changed

XMLWordPrintable

    • False
    • None
    • False
    • NEW
    • VERIFIED
    • Log Collection - Sprint 227, Log Collection - Sprint 229

      Version of components:

      Cluster-logging.5.5.1

      Elasticsearch-operator.5.5.1

      Server Version: 4.11.0-0.nightly-2022-08-26-162248

      Kubernetes Version: v1.24.0+b62823b

      Description of the problem:

      When the Elasticsearch instance status is changed, for example due to node scale down, the status is not updated in the ClusterLogging instance CR.

      Steps to reproduce the issue:

      *Create a ClusterLogging instance with ES nodeCount 3.

      apiVersion: "logging.openshift.io/v1"
      kind: "ClusterLogging"
      metadata:
        name: "instance" 
        namespace: "openshift-logging"
      spec:
        managementState: "Managed"  
        logStore:
          type: "elasticsearch"  
          retentionPolicy: 
            application:
              maxAge: 10h
            infra:
              maxAge: 10h
            audit:
              maxAge: 10h
          elasticsearch:
            nodeCount: 3 
            storage:
              storageClassName: "standard" 
              size: 20G 
            resources: 
                limits:
                  memory: "4Gi"
                requests:
                  memory: "1Gi"
            proxy: 
              resources:
                limits:
                  memory: 256Mi
                requests:
                  memory: 256Mi
            redundancyPolicy: "SingleRedundancy"
        visualization:
          type: "kibana"  
          kibana:
            replicas: 1
        collection:
          logs:
            type: "fluentd"  
            fluentd: {} 
      • Change the nodeCount for Elasticsearch to 2 in the ClusterLogging instance.
      • Wait for the indices to turn green.
        $ oc rsh elasticsearch-cdm-9pdbe47y-1-6467859854-kp2s9
        Defaulted container "elasticsearch" out of: elasticsearch, proxy
        sh-4.4$ indices
        Mon Aug 29 11:15:12 UTC 2022
        health status index        uuid                   pri rep docs.count docs.deleted store.size pri.store.size
        green  open   audit-000001 -7RidHFeTnK2Ggcs6iGEuA   3   1          0            0          0              0
        green  open   .kibana_1    337Q1R49RPGoXN-z37LFdg   1   1          0            0          0              0
        green  open   infra-000001 QoBRgKsYTm-MKHosIKMC6w   3   1      76069            0        105             52
        green  open   app-000001   7OzTPNgXSWmpwAhVQAvKdQ   3   1          0            0          0              0
        green  open   app-000002   uIn8nSusRG69jL6xtEgQtQ   2   1          0            0          0              0
        green  open   audit-000002 felVYxxNTwqdm38nZRkT0A   2   1          0            0          0              0
        green  open   .security    9MdlNfesQq-8HnqJy76x2g   1   1          6            0          0              0
        green  open   infra-000002 JF0N7HmWQSK6BRo-0QSEGg   2   1      23657            0         33             16 

        *Check the status in Elasticsearch and ClusterLogging CR.

        oc get elasticsearch elasticsearch -o yaml
        
        status:
          cluster:
            activePrimaryShards: 17
            activeShards: 34
            initializingShards: 0
            numDataNodes: 2
            numNodes: 2
            pendingTasks: 0
            relocatingShards: 0
            status: green
            unassignedShards: 0
        
        oc get clusterlogging instance -o yaml
        
          logStore:
            elasticsearchStatus:
            - cluster:
                activePrimaryShards: 11
                activeShards: 14
                initializingShards: 0
                numDataNodes: 2
                numNodes: 2
                pendingTasks: 0
                relocatingShards: 0
                status: yellow
                unassignedShards: 8
         

        *The Elasticsearch status in ClusterLogging instance does not match with the Elasticsearch instance CR.

       

            jcantril@redhat.com Jeffrey Cantrill
            rhn-support-ikanse Ishwar Kanse
            Ishwar Kanse Ishwar Kanse
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: