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

Logging CRs and configurations are not well gathered in logging must-gather after multiple-CLF is enabled.

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • NEW
    • VERIFIED
    • Log Collection - Sprint 242

      Description of problem:

      Create some logging CRs and wait for all logging pods to be ready:

      c get clf -A
      NAMESPACE                      NAME                 AGE
      e2e-test-multiple-clfs-zmkjg   clf-65409-6lsue0km   40m
      openshift-logging              instance             58m
      openshift-logging              test-66038           37m
      $ oc get cl -A
      NAMESPACE                      NAME                 MANAGEMENT STATE
      e2e-test-multiple-clfs-zmkjg   clf-65409-6lsue0km   Managed
      openshift-logging              instance             Managed
      openshift-logging              test-66038           Managed
      $ oc get lfme -A
      NAMESPACE           NAME       AGE
      openshift-logging   instance   20m

      then run must-gather to gather some resources:

      $ tree cluster-logging/clo/
      cluster-logging/clo/
      ├── e2e-test-multiple-clfs-zmkjg
      │   ├── clusterlogforwarder_\012clf-65409-6lsue0km.yaml
      │   ├── clusterlogging_\012clf-65409-6lsue0km.yaml
      │   ├── daemonsets.txt
      │   ├── deployments.txt
      │   ├── secrets.yaml
      │   ├── vector.toml
      │   └── version
      └── openshift-logging
          ├── admin-ca
          ├── admin-cert
          ├── admin-key
          ├── cluster-logging-operator-6d7848f8d4-fkkt2
          ├── clusterlogforwarder_\012instance\012test-66038.yaml
          ├── clusterlogging_\012instance\012test-66038.yaml
          ├── clusterserviceversion.operators.coreos.com
          │   ├── cluster-logging.v5.8.0.yaml
          │   ├── elasticsearch-operator.v5.8.0.yaml
          │   └── loki-operator.v5.8.0.yaml
          ├── daemonsets.txt
          ├── deployment
          ├── deployments.txt
          ├── elasticsearch.crt
          ├── elasticsearch.key
          ├── logging-es.crt
          ├── logging-es.key
          ├── secrets.yaml
          └── version

      seeing below issues:

      1. The content of LFME CR is not gathered

      2. The content of clusterlogging and clusterlogforwarder CR is not well formatted, besides, the file name contains some special charactors:

      $ cat cluster-logging/clo/e2e-test-multiple-clfs-zmkjg/clusterlogforwarder_?clf-65409-6lsue0km.yaml
      apiVersion: v1 items: - apiVersion: logging.openshift.io/v1 kind: ClusterLogForwarder metadata: creationTimestamp: "2023-09-20T05:05:14Z" generation: 1 name: clf-65409-6lsue0km namespace: e2e-test-multiple-clfs-zmkjg resourceVersion: "165383" uid: 79e5eda3-b70b-426a-bbc9-9cfb27086dce spec: outputs: - elasticsearch: version: 6 name: es-created-by-user type: elasticsearch url: http://elasticsearch-server.e2e-test-multiple-clfs-zmkjg.svc:9200 pipelines: - inputRefs: - application - infrastructure - audit name: forward-to-external-es outputRefs: - es-created-by-user serviceAccountName: clf-65409 status: conditions: - lastTransitionTime: "2023-09-20T05:28:04Z" status: "True" type: Ready kind: List metadata: resourceVersion: ""
      
      $ cat cluster-logging/clo/e2e-test-multiple-clfs-zmkjg/clusterlogging_?clf-65409-6lsue0km.yaml
      apiVersion: v1 items: - apiVersion: logging.openshift.io/v1 kind: ClusterLogging metadata: annotations: kubectl.kubernetes.io/last-applied-configuration: | {"apiVersion":"logging.openshift.io/v1","kind":"ClusterLogging","metadata":{"annotations":{},"name":"clf-65409-6lsue0km","namespace":"e2e-test-multiple-clfs-zmkjg"},"spec":{"collection":{"nodeSelector":{},"resources":{"requests":{"cpu":"100m","memory":"500Mi"}},"tolerations":[],"type":"vector"},"managementState":"Managed"}} creationTimestamp: "2023-09-20T05:05:35Z" generation: 1 name: clf-65409-6lsue0km namespace: e2e-test-multiple-clfs-zmkjg resourceVersion: "154460" uid: 3dc26a53-44eb-4a43-aee2-cc6624352b86 spec: collection: nodeSelector: {} resources: requests: cpu: 100m memory: 500Mi tolerations: [] type: vector managementState: Managed status: conditions: - lastTransitionTime: "2023-09-20T05:05:35Z" status: "True" type: Ready logStore: {} visualization: {} kind: List metadata: resourceVersion: "" 

      3. When there are more than 1 CL and CLF in the same namespace, the content of each CLs/CLFs is stored in the same file.

      4. When there are more than 1 CL and CLF in the same namespace, `vector.toml` is not extracted. 

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

      openshift-logging/cluster-logging-rhel9-operator/images/v5.8.0-160

      How reproducible:

      Always

      Steps to Reproduce:

      1. Create several multiple-CLF and deploy legacy CL
      2. Run logging must-gather
      3. Check the gathered files

      Actual results:

      See Description part

      Expected results:

      1. The content of LFME CR should be gathered

      2. File name should not contain special characters

      3. CRs should be well formatted

      4. CRs in same namespace should be stored into different files

      5. `vector.toml` should be extracted to different files if there are 2 or more secrets contain this file in one project

      Additional info:

              cahartma@redhat.com Casey Hartman
              qitang@redhat.com Qiaoling Tang
              Qiaoling Tang Qiaoling Tang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: