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

openshift-logging namespace can not be deleted directly when use lokistack as default store.

XMLWordPrintable

    • False
    • None
    • False
    • NEW
    • VERIFIED
    • Before this update, the openshift-logging namespace could not be deleted directly because of a pending finalizer. With this update, the finalizer is no longer used allowing for direct namespace deletion.
    • Bug Fix
    • Log Collection - Sprint 235, Log Collection - Sprint 236

      Description of problem:

      The openshift-logging namespace can not be deleted when use lokistack as default store. "message": "Some content in the namespace has finalizers remaining: logging.openshift.io/lokistack-rbac in 1 resource instances".

      The workaround is to delete the "finalizers": ["logging.openshift.io/lokistack-rbac"] from clusterlogging/instance

      Refer to  https://github.com/openshift/cluster-logging-operator/pull/1641

      Steps to Reproduce:

      1. Deploy lokistack and use lokistack as default store
      2. oc delete project openshift-logging 

      Actual results:

      The openshift-logging namespace can not be deleted as the clusterlogging instance can not be deleted which is blocked by finalizers: logging.openshift.io/lokistack-rbac.

       

      {
          "apiVersion": "v1",
          "kind": "Namespace",
          .....
          "spec": {
              "finalizers": [
                  "kubernetes"
              ]
          },
          "status": {
              "conditions": [
                  {
                      "lastTransitionTime": "2022-11-25T02:44:27Z",
                      "message": "All resources successfully discovered",
                      "reason": "ResourcesDiscovered",
                      "status": "False",
                      "type": "NamespaceDeletionDiscoveryFailure"
                  },
                  {
                      "lastTransitionTime": "2022-11-25T02:44:27Z",
                      "message": "All legacy kube types successfully parsed",
                      "reason": "ParsedGroupVersions",
                      "status": "False",
                      "type": "NamespaceDeletionGroupVersionParsingFailure"
                  },
                  {
                      "lastTransitionTime": "2022-11-25T02:44:54Z",
                      "message": "All content successfully deleted, may be waiting on finalization",
                      "reason": "ContentDeleted",
                      "status": "False",
                      "type": "NamespaceDeletionContentFailure"
                  },
                  {
                      "lastTransitionTime": "2022-11-25T02:44:27Z",
                      "message": "Some resources are remaining: clusterloggings.logging.openshift.io has 1 resource instances",
                      "reason": "SomeResourcesRemain",
                      "status": "True",
                      "type": "NamespaceContentRemaining"
                  },
                  {
                      "lastTransitionTime": "2022-11-25T02:44:27Z",
                      "message": "Some content in the namespace has finalizers remaining: logging.openshift.io/lokistack-rbac in 1 resource instances",
                      "reason": "SomeFinalizersRemain",
                      "status": "True",
                      "type": "NamespaceFinalizersRemaining"
                  }
              ],
              "phase": "Terminating"
          }
      }
       
      

       

      apiVersion: logging.openshift.io/v1
      kind: ClusterLogging
      metadata:
        creationTimestamp: "2022-11-25T03:22:15Z"
        deletionGracePeriodSeconds: 0
        deletionTimestamp: "2022-11-25T03:28:52Z"
        finalizers:
        - logging.openshift.io/lokistack-rbac
        generation: 3
        name: instance
        namespace: openshift-logging
        resourceVersion: "108313"
        uid: b13af251-a4e0-4dc5-973d-a81bced4889d
      spec:
        collection:
          logs:
            fluentd:
              resources: null
            type: ""
          resources: null
          type: vector
        logStore:
          elasticsearch:
            nodeCount: 0
            proxy:
              resources: null
            resources: null
            storage: {}
          lokistack:
            name: lokistack-sample
          type: lokistack
        managementState: Managed
      status:
        collection:
          logs:
            fluentdStatus: {}
        conditions:
        - lastTransitionTime: "2022-11-25T03:22:28Z"
          status: "False"
          type: CollectorDeadEnd
        curation: {}
        logStore: {}
        visualization: {}

      Expected results:

      Additional info:

       

       

       

            rh-ee-calee Calvin Lee
            rhn-support-anli Anping Li
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: